Backend Architecture
Account projects combine a Laravel admin panel with a profile-compatible Go mobile API; Guest projects are local-first.
Profiles and generated folders
The CLI generates one shared mobile 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 the mobile Paywall/RevenueCat and AdMob integrations. 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 admin resources for users, roles, FAQs, contacts, operating hours, feedback, and settings.
Go API backend
Go is the protected mobile resource service. It validates Laravel Sanctum tokens and serves the shared /api/v1/app/* contract. It does not issue tokens, run Laravel migrations, handle uploads/webhooks, or own destructive account operations. It reads the shared schema and writes only through the implemented mobile resource handlers; Laravel remains the schema owner.
Laravel is the compatibility default when you configure a reverse proxy. Start with Laravel for local development, then route /api/v1/app/* to Go only after verifying the shared contract and deployment environment.
Routing quick reference
| Route | Owner | Notes |
|---|---|---|
/api/v1/auth/* | Laravel | Auth, social login, verification, password, connected accounts |
/api/v1/auth/security/* | Laravel | Session revocation and account deletion |
/api/v1/uploads | Laravel | Authenticated file upload |
/api/v1/webhooks/revenuecat | Laravel | RevenueCat webhook and entitlement sync |
/api/v1/app/* | Laravel or Go | Shared authenticated mobile resource contract |
/admin/* | Laravel | Filament admin panel |
/ | Profile-specific | Account uses the admin-panel built-in landing/SEO surface; Guest uses the standalone landing-page/ site |
The mobile client sets EXPO_PUBLIC_API_URL to the host root and appends /api/v1 itself.
Recommended startup order
- Configure
admin-panel/.envand provision PostgreSQL and Redis. - Run Laravel migrations/seeders and start Laravel.
- Point the Account mobile app at the Laravel host and verify login plus
/api/v1/app/me. - Start Go with the same DB/Redis configuration when you need performance-mode routing.
- 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 for implementation details.
