Laravel backend plan
Stack
- Laravel 13.
- Laravel Sanctum for SPA authentication with cookie sessions.
- Database through Eloquent migrations.
- API responses in JSON only.
First modules
-
Auth
POST /api/registerPOST /api/loginPOST /api/logoutGET /api/userGET /sanctum/csrf-cookie
-
Dashboard
GET /api/dashboard/summaryGET /api/dashboard/activityGET /api/dashboard/system-status
-
Account
GET /api/profilePATCH /api/profileGET /api/subscription
-
Box management
GET /api/boxesPOST /api/boxesGET /api/boxes/{box}PATCH /api/boxes/{box}DELETE /api/boxes/{box}
-
API keys
GET /api/api-keysPOST /api/api-keysDELETE /api/api-keys/{key}
Sanctum SPA settings
Local development values expected in Laravel .env:
APP_URL=http://127.0.0.1:8000
FRONTEND_URL=http://127.0.0.1:5173
SESSION_DOMAIN=127.0.0.1
SANCTUM_STATEFUL_DOMAINS=127.0.0.1:5173,localhost:5173
Frontend requests must call /sanctum/csrf-cookie before login or other state-changing requests that require CSRF protection.