Skip to content

Configuration & env vars

What each app reads from the environment. .env.local / .env.prod files are git-ignored — copy from each app’s .env.example and fill in.

Vite inlines these at build time (they’re build args in the Docker image too).

VarPurpose
VITE_API_BASENestJS API base. client.ts normalises it to exactly one /v1.
VITE_SUPABASE_URLSupabase project URL (auth).
VITE_SUPABASE_ANON_KEYSupabase anon key.

npm run dev runs in prod mode by default (vite --mode prod, .env.prod). npm run dev:local uses .env.local.

Backend (apps/backend, NestJS) — .env.local

Section titled “Backend (apps/backend, NestJS) — .env.local”
VarPurpose
SUPABASE_URLInternal kong address in prod (public FQDN adds a ~20s cloudflared hairpin).
SUPABASE_ANON_KEY / service role keyAuth + RLS-bounded and service-role clients.
WORKERS_TOKENShared secret sent to workers as X-Workers-Token.

The backend verifies Supabase JWTs and forwards AI/geocode/media work to the workers.

Internal-only service (X-Workers-Token). Key settings:

VarPurpose
WORKERS_SHARED_SECRETAuth for backend → workers calls.
GEMINI_API_KEYVideo/reel extraction and chat web-search grounding.
SEARXNG_BASE_URLSelf-hosted SearXNG (geocode, media, itinerary discovery). Internal-only.
LITELLM_API_KEY / LITELLM_BASE_URLLLM proxy (chat, structuring).
chat_web_search_providergemini (default, Google grounding) or searxng.
chat_web_search_*Enabled / max-rounds / results / model.

Passed as --dart-define (or --dart-define-from-file=.env.prod). The app red-screens on launch (Supabase not initialised) if these are missing:

Terminal window
fvm flutter run \
--dart-define SUPABASE_URL=… \
--dart-define SUPABASE_ANON_KEY=… \
--dart-define API_BASE_URL=…
# or:
fvm flutter run --dart-define-from-file=.env.prod

Light/dark theme choice is persisted via shared_preferences (no env needed). For iOS share-extension + push config see iOS / Apple setup.

Run the CLI from infra/ (not the repo root — root hits a stray 54321 project): cd infra && supabase start → API :55321, DB :55322, Studio :55323, Mailpit :55324. Local has enable_confirmations=false (use email/password). Full local-dev recipe: Working conventions.