Skip to main content

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.

FeatureFirebaseSupabaseCustom
AuthenticationFirebase AuthSupabase AuthCookie from your domain
DatabaseFirestore (NoSQL)Postgres (SQL)Your API
Stripe checkoutstripeCheckout functionstripe-checkout functionYour API (stripe-checkout)
Stripe portalstripeManageSubscriptionstripe-manage-subscriptionYour API (stripe-manage-subscription)
Stripe webhookstripeWebhookhandle-stripe-webhookYour webhook
Welcome emailResend (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, or custom to 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_BACKEND is unset, backend is inferred from which keys are present (Supabase or Firebase only; custom requires VITE_BACKEND=custom).