Skip to content

Frontend Configuration

The frontend is configured through environment variables. The canonical list and defaults live in frontend/.env.example.

This is the most important distinction:

  • VITE_* and SENTRY_* variables are inlined at build time. They are baked into the JavaScript bundle when vite build runs. Changing them requires rebuilding the image.
  • BACKEND_ORIGIN is the only runtime variable. It is read by nginx at container start (via envsubst) to decide where to proxy /api/. You can change it without rebuilding.
VariableDefaultNotes
VITE_API_BASE_URL/api/v1 (image build)Backend API base, including version prefix. Leave relative for same-origin requests behind the nginx proxy. The local-dev .env.example points it at http://localhost:8080/api/v1.
BACKEND_ORIGINhttp://backend:8080Runtime. nginx reverse-proxy target for /api/. Set per deployment.

All optional, with neutral defaults.

VariableNotes
VITE_SITE_NAMEProduct / brand display name.
VITE_SITE_LEGAL_NAMELegal entity name in copyright notices (defaults to VITE_SITE_NAME).
VITE_SITE_URLPublic marketing / home site URL.
VITE_TERMS_URLTerms & Conditions page (defaults to <VITE_SITE_URL>/terms-and-conditions).
VITE_PRIVACY_URLPrivacy Policy page (defaults to <VITE_SITE_URL>/privacy-policy).
VITE_SUPPORT_EMAILSupport contact email.
VITE_BRAND_LOGO_URLAbsolute URL to the brand logo (OpenGraph image on shared pages).
VariableNotes
VITE_MCP_ENDPOINTThe MCP endpoint advertised in client-setup snippets, e.g. https://<your-mcp-host>/mcp/v1/common.
VariableNotes
VITE_ERROR_TYPE_BASE_URIBase URI for building RFC 9457 problem-detail type fields client-side (e.g. <base>/errors/UNKNOWN). Empty falls back to about:blank.

Disabled by default — must be explicitly enabled.

VariableDefaultNotes
VITE_GTM_ENABLEDfalseSet to true to enable GTM.
VITE_GTM_IDGTM container ID (e.g. GTM-XXXXXXX). Empty disables GTM.
VITE_GA4_MEASUREMENT_IDGA4 Measurement ID (e.g. G-XXXXXXXXXX) for client-ID capture.

Optional.

VariableWhenNotes
VITE_SENTRY_DSNruntime DSN (build-inlined)Empty disables Sentry.
SENTRY_ORGbuild onlySource-map upload.
SENTRY_PROJECTbuild onlySource-map upload.
SENTRY_AUTH_TOKENbuild only (CI)Source-map upload.

Browser push notifications are disabled unless all of these are set. The on-demand firebase-messaging-sw.js service worker is only registered when Firebase is fully configured — there is no precaching service worker.

Variable
VITE_FIREBASE_API_KEY
VITE_FIREBASE_AUTH_DOMAIN
VITE_FIREBASE_PROJECT_ID
VITE_FIREBASE_STORAGE_BUCKET
VITE_FIREBASE_MESSAGING_SENDER_ID
VITE_FIREBASE_APP_ID
VITE_FIREBASE_VAPID_KEY