Wearlo Docs

Environment Variables

Complete reference for all environment variables.

Required Variables

These variables are required for the application to function:

Database

DATABASE_URL="postgresql://user:password@host/db?sslmode=require"

Authentication

BETTER_AUTH_SECRET="at-least-32-characters-random-key"
BETTER_AUTH_URL="http://localhost:3000"

Application URL

NEXT_PUBLIC_APP_URL="http://localhost:3000"

Service Integrations

Volcano Engine (AI Features)

Required for chat, image generation, and video generation:

VOLCANO_ENGINE_API_KEY="your-volcano-engine-api-key"
VOLCANO_ENGINE_API_URL="https://ark.cn-beijing.volces.com/api/v3"

Creem (Payments)

Required for subscriptions and one-time purchases:

CREEM_API_KEY="your-creem-api-key"
CREEM_WEBHOOK_SECRET="whsec_..."
CREEM_MODE="test"
CREEM_API_BASE="https://test-api.creem.io"
WARDROBE_PAYMENT_INBOX_KEY="64-hex-characters-from-an-independent-random-32-byte-key"

Use matching test product IDs for test mode. Production uses CREEM_MODE="prod" and https://api.creem.io. Payment handlers require an HTTPS NEXT_PUBLIC_APP_URL origin. Keep the independent inbox encryption key available for the seven-day payload retention period. CREEM_SIMULATE=true is rejected; it does not simulate a successful payment. Unit and isolated database tests use synthetic provider adapters.

Resend (Email)

Required for authentication emails and notifications:

RESEND_API_KEY="re_your_api_key"
RESEND_FROM_EMAIL="Your App <noreply@yourdomain.com>"

Google OAuth (Optional)

AUTH_GOOGLE_ID="your-google-client-id"
AUTH_GOOGLE_SECRET="your-google-client-secret"

Cron Jobs

CRON_SECRET="your-cron-secret"

Optional Analytics

NEXT_PUBLIC_POSTHOG_KEY="phc_..."
NEXT_PUBLIC_GOOGLE_ANALYTICS_ID="G-..."
NEXT_PUBLIC_CLARITY_PROJECT_ID="..."

Optional Storage (S3-Compatible)

STORAGE_ENDPOINT="https://..."
STORAGE_BUCKET="your-bucket"
STORAGE_REGION="auto"
STORAGE_ACCESS_KEY_ID="..."
STORAGE_SECRET_ACCESS_KEY="..."
STORAGE_PUBLIC_URL="https://..."

On this page