Skip to content

Deployment

hasnaina955 edited this page Sep 3, 2026 · 1 revision

Deployment

YatraFlow deploys to Vercel from main (auto-deploy). Preview builds come from other branches.


Environment variables

Variable Required Notes
VITE_SUPABASE_URL yes (preview + production) build-time — Vite bakes it into the bundle
VITE_SUPABASE_ANON_KEY yes (preview + production) same
VITE_GOOGLE_MAPS_API_KEY optional enables Places/Routes; absent ⇒ free stack
VITE_MAPPLS_KEY optional India-grade place search

The classic trap: Vercel env vars are per-environment and per-git-branch. A var ticked for Preview but pinned to branch test gives every other branch a build with no backend — the app renders, then login dies with a bare Failed to fetch. vite.config.ts now aborts a Vercel build when Supabase vars are missing or template-valued. Editing a var never fixes an existing deployment — Redeploy it.

Verifying a deploy is real

  1. vercel env ls — trust its environments (git branch) column, not the dashboard checkboxes
  2. Grep the live bundle for the real .supabase.co project ref (the localhost:54321 fallback string is in every bundle and proves nothing); use the canonical alias yatraflow-blond.vercel.app — deployment-specific URLs sit behind Vercel SSO
  3. Strongest proof: the alias's index-*.js hash equals your local npm run build's

Full recipe (with all three traps documented): docs/DEPLOYMENT.md.

Database

Supabase schema lives in supabase/schema.sql. Realtime publications are managed via Dashboard → Database → Publications (the SQL editor can run read-only). See AGENTS.md §5 for the operational playbook.


Related: Release Process · Data Sources and Limits

Canonical doc: docs/DEPLOYMENT.md

Clone this wiki locally