Skip to main content

Environment Variables

Copy .env.example to .env.local and fill in the values.

Required Variables

VariableDescriptionWhere to Get It
NEXT_PUBLIC_SUPABASE_URLSupabase project URLSupabase Dashboard > Settings > API
NEXT_PUBLIC_SUPABASE_ANON_KEYSupabase anonymous/public keySupabase Dashboard > Settings > API

Optional Variables

VariableDescriptionWhen Needed
SUPABASE_SERVICE_ROLE_KEYSupabase admin key (bypasses RLS)E2E test user setup, admin scripts
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEYStripe public key (test mode)Billing features
STRIPE_SECRET_KEYStripe secret key (test mode)Billing API calls
STRIPE_WEBHOOK_SECRETStripe webhook signing secretProcessing Stripe events
TEST_USER_EMAILE2E test user emailRunning Playwright tests
TEST_USER_PASSWORDE2E test user passwordRunning Playwright tests

Example .env.local

Never commit .env.local to git. It’s already in .gitignore. The SUPABASE_SERVICE_ROLE_KEY and STRIPE_SECRET_KEY are sensitive — never expose them in client-side code.

Vercel Deployment Variables

When deploying to Vercel, add these same variables in your Vercel project settings under Settings > Environment Variables. Use production Supabase and Stripe keys (not test keys) for the production environment.