Skip to main content

Environment Variables

Required Variables

VariableDescriptionExample
SUPABASE_URLSupabase project URLhttps://xxx.supabase.co
SUPABASE_ANON_KEYSupabase anonymous keyeyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
SUPABASE_SERVICE_ROLE_KEYSupabase service role keyeyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
GOOGLE_API_KEYGoogle API key for AI servicesAIzaSy...

Optional Variables

VariableDescriptionDefault
ENVIRONMENTEnvironment (development/production)development
DEBUGDebug modefalse
TAVILY_API_KEYTavily search API key-
VISION_AGENT_API_KEYVision Agent API key-
MAX_FILE_SIZEMaximum file upload size100MB
RATE_LIMIT_PER_MINUTEAPI rate limit100

Celery/Redis Configuration

VariableDescriptionDefault
USE_CELERYEnable Celery for background tasksfalse
REDIS_URLRedis connection URLredis://localhost:6379/0
CELERY_BROKER_URLCelery broker URLredis://localhost:6379/0
CELERY_RESULT_BACKENDCelery result backendredis://localhost:6379/0

Configuration File

Create a .env file in the conformly-backend directory:
# Environment
ENVIRONMENT=development
DEBUG=true

# Supabase
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_ANON_KEY=your-anon-key
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key

# AI Services
GOOGLE_API_KEY=your-google-api-key
TAVILY_API_KEY=your-tavily-key
VISION_AGENT_API_KEY=your-vision-agent-key

# Celery (Optional)
USE_CELERY=true
REDIS_URL=redis://localhost:6379/0
CELERY_BROKER_URL=redis://localhost:6379/0
CELERY_RESULT_BACKEND=redis://localhost:6379/0

# File Upload
MAX_FILE_SIZE=104857600  # 100MB in bytes

# Rate Limiting
RATE_LIMIT_PER_MINUTE=100

Production Configuration

For production deployments:
  1. Set ENVIRONMENT=production
  2. Set DEBUG=false
  3. Use secure, environment-specific API keys
  4. Configure proper Redis connection pooling
  5. Set up database connection pooling
  6. Enable rate limiting
  7. Configure CORS properly

Next: API Endpoints

View available API endpoints