Skip to main content

Environment Variables

Backend (backend/.env)

VariableRequiredDescription
DATABASE_URLYesPostgreSQL connection string
BETTER_AUTH_SECRETYesRandom secret for session encryption
GOOGLE_GEMINI_API_KEYFor GeminiGemini API key
OPENAI_API_KEYFor ChatGPTOpenAI API key
ANTHROPIC_API_KEYFor ClaudeAnthropic API key
PERPLEXITY_API_KEYFor PerplexityPerplexity API key
STRIPE_SECRET_KEYFor billingStripe secret key
STRIPE_WEBHOOK_SECRETFor webhooksStripe webhook signing secret
NEXT_PUBLIC_APP_URLYesFrontend URL (e.g. http://localhost:3000)
API_URLYesBackend URL (e.g. http://localhost:8000)
TEST_USER_EMAILSNoComma-separated emails that bypass plan limits (dev only)

Frontend (frontend/.env)

VariableRequiredDescription
NEXT_PUBLIC_API_URLYesBackend API URL

Database Migrations

After changing the schema:
cd backend
npx prisma migrate dev --name your_migration_name
npx prisma generate

Auth Providers (Optional)

GeoArk AI uses BetterAuth. Configure Google/GitHub OAuth in the auth config if needed.

Production Checklist

  • Set strong BETTER_AUTH_SECRET
  • Configure Stripe for billing
  • Add at least one AI API key
  • Use HTTPS for NEXT_PUBLIC_APP_URL and API_URL
  • Configure CORS if frontend/backend are on different domains
  • Remove or leave empty TEST_USER_EMAILS