Appearance
Environment Variables
File Strategy
| File | Git Tracked | Purpose |
|---|---|---|
.env.development | Yes | Local Supabase defaults (localhost) |
.env.production | Yes | Production key names only (values empty) |
.env.local | No | Personal overrides (Supabase Cloud keys, etc.) |
How It Works
next devautomatically loads.env.developmentnext buildautomatically loads.env.production.env.localoverrides all environments (highest priority)- Vercel deployment: set environment variables in Vercel dashboard
Variables
| Variable | Description |
|---|---|
NEXT_PUBLIC_SUPABASE_URL | Supabase API URL |
NEXT_PUBLIC_SUPABASE_ANON_KEY | Supabase anonymous key (public) |
SUPABASE_SERVICE_ROLE_KEY | Supabase service role key (server-only) |
DATABASE_URL | PostgreSQL connection string |