Skip to main content

Environment Variables

All configuration is managed through the .env file in the conformly-core/ directory. Copy env.example to get started:
cp env.example .env

Supabase (Required)

VariableDescriptionExample
SUPABASE_URLSupabase project URLhttps://xxx.supabase.co
SUPABASE_ANON_KEYSupabase anonymous keyeyJhbGci...
SUPABASE_SERVICE_ROLE_KEYSupabase service role key (server-side only)eyJhbGci...

AI/ML Services

VariableDescriptionRequired
GOOGLE_API_KEYGoogle Gemini API keyYes
OPENAI_API_KEYOpenAI GPT-4o API keyYes
TAVILY_API_KEYTavily web search agentOptional
VISION_AGENT_API_KEYLandingAI ADE for PDF parsingOptional

CORS and Networking

VariableDescriptionLocal Default
ALLOWED_ORIGINSComma-separated origins for CORShttp://localhost:5173,http://localhost:8080,http://localhost:3000,http://localhost:8501
ALLOWED_HOSTSAllowed host headerslocalhost,127.0.0.1
The backend will reject requests from origins not listed in ALLOWED_ORIGINS. Make sure both the platform frontend (:8080) and marketing site (:5173) are included for local development.

Stripe Payments

VariableDescriptionLocal Default
STRIPE_API_KEYStripe secret key (sk_test_... or sk_live_...)
STRIPE_WEBHOOK_SECRETStripe webhook signing secret (whsec_...)
STRIPE_SUCCESS_URLRedirect URL after successful checkouthttp://localhost:8080/payment-success?session_id={CHECKOUT_SESSION_ID}
STRIPE_CANCEL_URLRedirect URL when checkout is cancelledhttp://localhost:5173/#pricing
{CHECKOUT_SESSION_ID} is a Stripe template literal — Stripe replaces it automatically on redirect.

Celery / Redis

VariableDescriptionDefault
USE_CELERYEnable Celery task queuetrue
REDIS_URLRedis connection URLredis://localhost:6379/0
CELERY_BROKER_URLCelery message brokerredis://localhost:6379/0
CELERY_RESULT_BACKENDCelery result backendredis://localhost:6379/0
When running via Docker Compose, Redis URLs are overridden to redis://redis:6379/0 in docker-compose.yml. You do not need to change these in .env.

Application Settings

VariableDescriptionDefault
ENVIRONMENTdevelopment or productiondevelopment
DEBUGEnable debug loggingtrue
SECRET_KEYJWT signing key (change in production)dev-secret-key-...
ACCESS_TOKEN_EXPIRE_MINUTESJWT access token lifetime30
REFRESH_TOKEN_EXPIRE_DAYSRefresh token lifetime7
MAX_FILE_SIZEMax upload size in bytes104857600 (100 MB)
ALLOWED_FILE_TYPESAccepted MIME typesapplication/pdf,...
LOG_LEVELLogging levelINFO
RATE_LIMIT_PER_MINUTEAPI rate limit100
RATE_LIMIT_BURSTRate limit burst200

Complete Example

# Environment
ENVIRONMENT=development
DEBUG=true
SECRET_KEY=your-secret-key-here

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

# CORS — include both frontend dev servers
ALLOWED_ORIGINS=http://localhost:5173,http://localhost:8080,http://localhost:3000
ALLOWED_HOSTS=localhost,127.0.0.1

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

# Stripe — local dev redirect URLs
STRIPE_API_KEY=sk_test_...
STRIPE_WEBHOOK_SECRET=whsec_...
STRIPE_SUCCESS_URL=http://localhost:8080/payment-success?session_id={CHECKOUT_SESSION_ID}
STRIPE_CANCEL_URL=http://localhost:5173/#pricing

# Redis / Celery
REDIS_URL=redis://localhost:6379/0
USE_CELERY=true
CELERY_BROKER_URL=redis://localhost:6379/0
CELERY_RESULT_BACKEND=redis://localhost:6379/0

Production Configuration

For production deployments, override these values in your deployment environment (EC2 env vars, Docker secrets, etc.):
ENVIRONMENT=production
DEBUG=false
ALLOWED_ORIGINS=https://www.conformly.ai,https://beta.conformly.ai
STRIPE_SUCCESS_URL=https://beta.conformly.ai/payment-success?session_id={CHECKOUT_SESSION_ID}
STRIPE_CANCEL_URL=https://www.conformly.ai/#pricing

Next: API Endpoints

View available API endpoints