Backend Architecture
Account projects combine Laravel with a profile-compatible Go mobile API; Guest projects are local-first.
Profiles and generated folders
The CLI generates one shared Flutter source and chooses a profile:
- Account —
mobile-app/,landing-page/,admin-panel/,api-backend/, andapi-collections/. - Guest —
mobile-app/,landing-page/, and project guidance only. No backend bundle is required.
Both profiles retain Paywall/RevenueCat and AdMob. Guest runtime gates disable BowlerKit account/network behavior.
Service ownership
Laravel admin panel
Laravel is the canonical owner of:
- Authentication, Google/Apple identity flows, Sanctum token issuance, and verification mail.
- Password reset/change, connected accounts, session revocation, and account deletion.
- Laravel migrations and the shared PostgreSQL schema.
- Uploads, RevenueCat webhooks, entitlement persistence, and admin notification send/broadcast.
- Filament resources for users, roles, FAQs, contacts, operating hours, feedback, and settings.
Go API backend
Go validates Laravel Sanctum tokens and serves the protected /api/v1/app/* mobile resource contract. It does not issue tokens, run migrations, handle uploads/webhooks, or own destructive account operations. Laravel owns the audit_logs schema and audit writes; Go reads security history as part of the mobile contract.
Laravel is the compatibility default when you configure a reverse proxy. Start with Laravel locally, then route /api/v1/app/* to Go only after verifying parity and deployment networking.
Routing quick reference
| Route | Owner | Notes |
|---|---|---|
/api/v1/auth/* | Laravel | Auth, social login, verification, password, connected accounts |
/api/v1/auth/security/* | Laravel | Session revoke and account deletion |
/api/v1/uploads | Laravel | Authenticated uploads |
/api/v1/webhooks/revenuecat | Laravel | RevenueCat webhook/entitlement sync |
/api/v1/app/* | Laravel or Go | Shared authenticated mobile resources |
/admin/* | Laravel | Filament admin panel |
/ | Profile-specific | Account uses the admin-panel built-in landing/SEO surface; Guest uses the standalone landing-page/ site |
DioService uses API_BASE_URL (Endpoints.baseURL) as the host root and appends /api/v1.
Recommended startup order
- Configure Laravel's DB/Redis/mail/Firebase/RevenueCat environment.
- Run Laravel migrations/seeders and start Laravel.
- Set
API_BASE_URLand verify login plus/api/v1/app/me. - Start Go with the same DB/Redis settings when needed.
- Switch the gateway's
/api/v1/app/*upstream only after route, response, ability, and error parity checks.
See Admin Panel, API Backend, and API Routes.
