Skip to Content
DeploymentConfiguration

Configuration

The Curate-Me platform uses environment variables for all configuration. Each service reads from its own .env file, and sensitive values should never be committed to the repository.

Backend Environment Variables

Create services/backend/.env with the following variables:

LLM API Keys

# Required — at least one provider must be configured for gateway fallback ANTHROPIC_API_KEY=sk-ant-xxx # Claude OPENAI_API_KEY=sk-xxx # OpenAI DEEPSEEK_API_KEY=sk-xxx # DeepSeek GOOGLE_API_KEY=xxx # Gemini

Database and Cache

# MongoDB connection MONGO_URI=mongodb://localhost:27017/ MONGO_DATABASE_NAME_B2B=curate_dashboard # B2B dashboard + gateway database # PostgreSQL (optional, for relational data) DATABASE_URL=postgresql://user:password@localhost:5432/curateme # Redis REDIS_URL=redis://localhost:6379

Security

# JWT signing key (generate with: openssl rand -hex 32) JWT_SECRET_KEY=your-secret-key-here # Application secret key SECRET_KEY=your-application-secret # Error logging API key (for production error CLI) ERROR_LOG_API_KEY=your-error-log-key

Application Settings

# Environment ENVIRONMENT=development # development | staging | production # CORS origins (comma-separated) CORS_ORIGINS=http://localhost:3000,http://localhost:3001 # Rate limiting RATE_LIMIT_PER_MINUTE=60

Frontend Environment Variables

Dashboard (apps/dashboard/.env.local)

NEXT_PUBLIC_API_URL=http://localhost:8001 NEXTAUTH_URL=http://localhost:3001 NEXTAUTH_SECRET=your-nextauth-secret

Documentation (apps/docs/.env.local)

# No required environment variables for the docs site # Optional: analytics NEXT_PUBLIC_POSTHOG_KEY=phc_xxx

Feature Flags

Runtime feature flags are defined in services/backend/src/config/feature_flags.py. These control agent behavior, prompt versions, and experimental features without requiring a deployment.

from src.config.feature_flags import FeatureFlag, is_feature_enabled if is_feature_enabled(FeatureFlag.USE_V3_STYLE): # Use the v3 style agent prompt ...

See the Feature Flags guide for details on available flags and how to use them.

Production Configuration

In production, environment variables are set in the Docker Compose file or passed via a .env file on the VPS:

# On the VPS: ~/platform/.env MONGO_URI=mongodb://mongo:27017/ REDIS_URL=redis://redis:6379 CORS_ORIGINS=https://dashboard.curate-me.ai ENVIRONMENT=production

Docker Compose services reference this file:

services: gateway: env_file: - .env - services/backend/.env

Validating Configuration

The backend validates required environment variables at startup. If a required variable is missing, the application logs an error and exits. Check the startup logs to diagnose configuration issues:

docker compose -f docker-compose.production.yml logs gateway | head -20