Skip to main content

Architecture overview

The Expo app talks only to the FastAPI backend. The backend owns all business logic and is the only thing that touches Postgres or holds third-party keys.

Environments​

Today only local exists. Staging and prod are planned on AWS, following the infrastructure plan.

EnvironmentApp buildAPI runs onDatabaseSecrets
LocalExpo dev serveruvicorn on your PCPostgres in Docker Composeapps/backend/.env (git-ignored)
Staging (planned)EAS previewEC2 via KamalRDSSSM Parameter Store
Prod (planned)EAS productionEC2 via KamalRDSSSM Parameter Store

Repo layout​

.
├── apps/
│ ├── backend/ FastAPI app, models, migrations, tests
│ └── frontend/ Expo / React Native app
├── packages/ Shared TypeScript code (npm workspaces; empty for now)
├── docs/ This Docusaurus site (its own npm project)
├── docker-compose.yml Local Postgres
├── scripts/vesper.ps1 Dev tasks behind vesper.cmd
├── vesper.cmd Dev task runner: .\vesper <command>
└── CLAUDE.md Pointers for AI coding assistants

docs/ is deliberately not an npm workspace, so Docusaurus's React and webpack versions can never clash with the versions Expo pins.

Principles​

  • The backend is the only gatekeeper. Authorization is per trip (via trip_members) and is checked in the backend's service layer, never in the app.
  • No secrets in the app. Every EXPO_PUBLIC_* value is readable by anyone who downloads the app.
  • Old app builds stay alive for weeks. API and schema changes must stay backwards compatible: see the migration rules in Database.