Skip to content

Conversation

@kevalyq
Copy link
Contributor

@kevalyq kevalyq commented Oct 26, 2025

Changes

  • ✅ Remove Blade templates and frontend resources (API only)
  • ✅ Create API routes structure (routes/api.php)
  • ✅ Add health check endpoint (GET /health)
  • ✅ Clean up README.md from Laravel boilerplate
  • ✅ Fix markdown formatting errors in README
  • ✅ Ensure all files have proper REUSE license headers
  • ✅ Remove unnecessary frontend dependencies (Vite, resources)
  • ✅ All Config files have correct licenses (CC0-1.0)

REUSE Compliance

100% compliant - All 70 files have proper copyright and license information

Testing

  • REUSE lint: ✅ Passed
  • Prettier: ✅ Passed
  • Markdownlint: ✅ Passed
  • YAML lint: ✅ Passed

Related

This PR completes the initial setup of the API repository and ensures it's configured as API-only (no frontend).

- Fix multiple H1 heading errors
- Use proper heading hierarchy (H2, H3, H4)
- Fix bare URLs with angle brackets
- Remove duplicate content sections
- Ensure single H1 (title only)
Copilot AI review requested due to automatic review settings October 26, 2025 16:00
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR transforms the Laravel application from a full-stack setup to an API-only configuration by removing frontend scaffolding and ensuring REUSE compliance across all files.

  • Removed all Blade templates, frontend resources (Vite, CSS, JS), and the web routes file
  • Created a new API routes structure with a health check endpoint and placeholder routes for v1
  • Added SPDX license headers to all PHP, configuration, and infrastructure files

Reviewed Changes

Copilot reviewed 59 out of 62 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
vite.config.js Removed Vite configuration (frontend build tool)
package.json Removed all frontend dependencies and build scripts
routes/web.php Deleted web routes file (API-only)
routes/api.php Added new API routes with health check endpoint
resources/* Removed all Blade templates and frontend assets
tests/* Added SPDX license headers to test files
config/* Added SPDX license headers to all configuration files
README.md Cleaned up Laravel boilerplate and improved documentation
.yamllint.yml Added YAML linting configuration
storage/*/.gitignore Added SPDX license headers to gitignore files

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- Configure bootstrap/app.php to load API routes
- Simplify PHPStan config (remove invalid parameters)
- Update test to check /api/health endpoint
- Remove web.php (API-only application)

All quality checks passing:
✅ PEST (2/2 tests)
✅ PHPStan (level max)
✅ Laravel Pint
✅ Pre-commit hooks
✅ Pre-push hooks
@kevalyq kevalyq requested a review from Copilot October 26, 2025 16:31
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 63 out of 66 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@kevalyq kevalyq added the large-pr-approved Legitimate large PR (e.g., boilerplate templates, auto-generated code) label Oct 26, 2025
- Remove blank comment line between FileCopyrightText and License-Identifier
- Matches frontend repository format (no blank line)
- Fix README.md escaped backslash in URL
- Update phpstan.neon comment to be more accurate
- Addresses Copilot review feedback
- Add php -d memory_limit=512M to PHPStan commands
- Prevents memory exhaustion during static analysis
- Matches memory config in phpstan.neon (tmpDir, parallel config)
…headers

- Remove .github/workflows/codeql.yml (CodeQL 2.23.3 doesn't support PHP)
- Fix SPDX headers in .gitignore files (remove blank comment lines)
- Ensures consistent SPDX format across all file types
- Removed license-compatibility.yml (already in quality.yml)
- Removed reuse.yml (already in quality.yml)
- Updated branch protection to use correct check names from quality.yml
- Removed CodeQL (php) from required checks (unsupported language)
@kevalyq kevalyq merged commit 2d6ac25 into main Oct 26, 2025
9 checks passed
@kevalyq kevalyq deleted the refactor/api-only-setup branch October 26, 2025 17:48
kevalyq added a commit that referenced this pull request Nov 23, 2025
- Fix /v1/up -> /health in SecurityHeadersTest (actual health endpoint)
- Fix /v1/user -> /v1/me in CsrfProtectionTest (actual authenticated user endpoint)
- Clarify comment: security headers apply to API and Sanctum routes
- All 14 tests passing after fixes

Addresses Copilot review comments #1, #2, #3
kevalyq added a commit that referenced this pull request Nov 23, 2025
* feat: Configure httpOnly cookie authentication and CSRF protection

- Add SecurityHeaders middleware for X-Frame-Options, X-Content-Type-Options, X-XSS-Protection, Referrer-Policy
- Enable HSTS in production environment only
- Register SecurityHeaders middleware globally for all requests
- Verify CSRF token endpoint /sanctum/csrf-cookie accessibility
- Confirm session cookies configured as httpOnly with sameSite=lax
- Add 8 comprehensive CSRF protection tests
- Add 6 comprehensive security headers tests
- Update CHANGELOG.md with httpOnly cookie authentication features

Part of: Epic httpOnly Cookie Authentication Migration (frontend#208)
Fixes: #210

* fix: Correct test routes based on Copilot review

- Fix /v1/up -> /health in SecurityHeadersTest (actual health endpoint)
- Fix /v1/user -> /v1/me in CsrfProtectionTest (actual authenticated user endpoint)
- Clarify comment: security headers apply to API and Sanctum routes
- All 14 tests passing after fixes

Addresses Copilot review comments #1, #2, #3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

large-pr-approved Legitimate large PR (e.g., boilerplate templates, auto-generated code)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants