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_* variables are inlined at build time. They are baked into the JavaScript bundle when vite build runs. In practice you set them in frontend/.env for local development (the Vite dev server reads them); the published image bakes only deployment-neutral values.
  • Deploy-time values come from the runtime /config.js. In production the backend renders /config.js from its frontend.* configuration (see Backend Configuration), setting window.__VIBEXP_ENV__ before the SPA bundle runs. Branding, site links, MCP endpoint, and analytics are all injected this way — changing them needs a restart, not a rebuild. In local dev there is no backend-rendered /config.js (the request 404s harmlessly) and the app falls back to the build-time import.meta.env values.
VariableDefaultNotes
VITE_API_BASE_URL/api/v1 (image build)Backend API base, including version prefix. Leave empty/relative for same-origin requests (the combined image). The local-dev .env.example points it at http://localhost:8080/api/v1, targeting make backend-run-dev.

Build-time only, set by the release pipeline (build args in backend/Dockerfile); shown in the UI for support/debugging.

VariableDefaultNotes
VITE_RELEASE_SHAdevCommit SHA of the build. release.yml passes github.sha.
VITE_RELEASE_DATEunknownBuild date stamp.

All optional, with neutral defaults. In production these come from the backend’s frontend.* config via /config.js; the VITE_* forms apply in local dev.

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. Runtime-injectable via frontend.mcp_endpoint.
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.

Off by default: set a container ID to opt in. Runtime-injectable via the backend’s frontend.gtm_id / frontend.ga4_measurement_id config.

VariableDefaultNotes
VITE_GTM_IDGTM container ID (e.g. GTM-XXXXXXX). Setting it is the opt-in: GTM loads only when it is non-empty. There is no separate enable flag.
VITE_GA4_MEASUREMENT_IDGA4 Measurement ID (e.g. G-XXXXXXXXXX) for client-ID capture.

VibeXP ships no cookie-consent gate of its own: once an ID is set, the tag loads unconditionally. If your deployment needs Consent Mode, configure it inside your own GTM container.

Browser push notifications (Firebase Cloud Messaging) were removed in v0.9.0 along with the seven VITE_FIREBASE_* variables. src/utils/serviceWorker.ts and public/{sw,dev-sw}.js still exist solely to evict legacy workers from returning browsers.