Environment Variables
Backend (backend/.env)
| Variable | Required | Description |
|---|---|---|
DATABASE_URL | Yes | PostgreSQL connection string |
BETTER_AUTH_SECRET | Yes | Random secret for session encryption |
GOOGLE_GEMINI_API_KEY | For Gemini | Gemini API key |
OPENAI_API_KEY | For ChatGPT | OpenAI API key |
ANTHROPIC_API_KEY | For Claude | Anthropic API key |
PERPLEXITY_API_KEY | For Perplexity | Perplexity API key |
STRIPE_SECRET_KEY | For billing | Stripe secret key |
STRIPE_WEBHOOK_SECRET | For webhooks | Stripe webhook signing secret |
NEXT_PUBLIC_APP_URL | Yes | Frontend URL (e.g. http://localhost:3000) |
API_URL | Yes | Backend URL (e.g. http://localhost:8000) |
TEST_USER_EMAILS | No | Comma-separated emails that bypass plan limits (dev only) |
Frontend (frontend/.env)
| Variable | Required | Description |
|---|---|---|
NEXT_PUBLIC_API_URL | Yes | Backend API URL |
Database Migrations
After changing the schema: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_URLandAPI_URL - Configure CORS if frontend/backend are on different domains
- Remove or leave empty
TEST_USER_EMAILS