Backend Options: Supabase, Firebase, or Custom
You can use one of three backends. Supabase and Firebase ship with the boilerplate; custom lets you bring your own API.
| Feature | Firebase | Supabase | Custom |
|---|---|---|---|
| Authentication | Firebase Auth | Supabase Auth | Cookie from your domain |
| Database | Firestore (NoSQL) | Postgres (SQL) | Your API |
| Stripe checkout | stripeCheckout function | stripe-checkout function | Your API (stripe-checkout) |
| Stripe portal | stripeManageSubscription | stripe-manage-subscription | Your API (stripe-manage-subscription) |
| Stripe webhook | stripeWebhook | handle-stripe-webhook | Your webhook |
| Welcome email | — | Resend (via webhook) | Your choice |
Backend Resolution
parseIntegrationEnv() in @repo/integrations validates env vars and determines which backend is active:
- VITE_BACKEND — Set to
supabase,firebase, orcustomto choose explicitly. - VITE_AUTH_PROVIDER — Legacy; use when both Supabase and Firebase keys are present and you want to pick one.
- Auto-detection — When
VITE_BACKENDis unset, backend is inferred from which keys are present (Supabase or Firebase only; custom requiresVITE_BACKEND=custom).