WordloopWordloop
Reference

Configuration

Every environment variable, config key, and feature flag, organised by service.

Configuration

Every service in the Wordloop platform loads its configuration from environment variables, following the Twelve-Factor App config principle. This page is the canonical catalogue of those variables — what they do, what their defaults are, and which service owns them.

Local defaults are generated by ./dev setup env. The variables listed here are the full contract; your local .env files typically override only the subset you need.

Common variables

Variables consumed by multiple services.

VariableService(s)Default (local)Purpose
APP_ENValldevelopmentdevelopment, test, staging, production. Controls auth mode, logging verbosity, and feature defaults.
DATABASE_URLcorederivedPostgres connection string.
PUBSUB_EMULATOR_HOSTcore, mllocalhost:8085Local Pub/Sub emulator. Unset in production.
OTEL_EXPORTER_OTLP_ENDPOINTallhttp://localhost:4318Collector endpoint for traces, metrics, and logs.
LOG_LEVELallinfodebug, info, warn, error.

wordloop-core

VariableDefaultPurpose
CORE_PORT4002HTTP + WebSocket port.
CLERK_SECRET_KEYBackend Clerk key for JWT verification.
CLERK_PUBLISHABLE_KEYFrontend-shared key; surfaced for debug.
STORAGE_BUCKETwordloop-local-audioGCS bucket for audio artefacts.

wordloop-ml

VariableDefaultPurpose
ML_PORT4003FastAPI port.
MODEL_PROVIDERanthropicChooses which model adapter to load.
ANTHROPIC_API_KEYSet when MODEL_PROVIDER=anthropic.
OPENAI_API_KEYSet when MODEL_PROVIDER=openai.
ML_CACHE_TTL_SECONDS3600Cache lifetime for deterministic model calls.

wordloop-app

VariableDefaultPurpose
NEXT_PUBLIC_CORE_URLhttp://localhost:4002URL the browser uses to reach Core.
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEYClerk frontend key.
APP_PORT4001Next.js port.

Feature flags

Feature flags are served dynamically — they are not environment variables. See the flag dashboard for the current state and owners. Progressive-delivery principles (Progressive Delivery) govern how flags are created, rolled, and retired.

Further reading

On this page