-
Notifications
You must be signed in to change notification settings - Fork 0
Configure API-only setup and cleanup Laravel scaffolding #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- 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)
There was a problem hiding this 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
There was a problem hiding this 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.
- 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)
- 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
* 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
Changes
routes/api.php)GET /health)REUSE Compliance
✅ 100% compliant - All 70 files have proper copyright and license information
Testing
Related
This PR completes the initial setup of the API repository and ensures it's configured as API-only (no frontend).