Environment Variables
Required Environment Variables
Ensure all environment variables are configured in Vercel Dashboard → Settings → Environment Variables:
Supabase
NEXT_PUBLIC_SUPABASE_URL
NEXT_PUBLIC_SUPABASE_ANON_KEY
SERVICE_ROLE_KEY
Directus (Common Search)
DIRECTUS_API_EMAIL_SEARCH
DIRECTUS_API_PASSWORD_SEARCH
DIRECTUS_URL_SEARCH
Redis
REDIS_URL
Setting Environment Variables in Vercel
- Go to Vercel Dashboard → Your Project
- Navigate to Settings → Environment Variables
- Add each variable for the appropriate environments:
- Production (main branch)
- Preview (all branches)
Environment Variable Best Practices
✅ Do:
- Set variables for all environments
- Use different credentials for dev/staging/production
- Keep
SERVICE_ROLE_KEYsecure (never commit) - Test with production-like values in staging
❌ Don't:
- Commit
.env.localfiles - Use production credentials in development
- Share environment variables in code or PRs