Skip to content

App .env ​

The app reads only variables that start with VITE_, and Vite bakes them in at build time. Change them, then rebuild.

The committed .env holds the defaults. Put your own values in .env.local, or in .env.local.prod for production builds only. Both are ignored by git and win over .env.

KeyDefaultWhat it does
VITE_APP_ENVIRONMENTdevelopment (production in a production build when empty)Which environment the app runs in: development, staging or production.
VITE_API_ENVIRONMENTVITE_APP_ENVIRONMENTWhich API to talk to. Lets a local app use the staging API.
VITE_DEV_BASE_URLhttp://127.0.0.1:8001API root for development.
VITE_STAGING_BASE_URLAPI root for staging.
VITE_PROD_BASE_URLAPI root for production.
VITE_BASE_URLUsed when the matching base URL above is empty.
VITE_FRONT_URLthe page's originThe app's public address, for share links.
VITE_DEBUGtrueLog extra detail in the browser console. Use false in production.
VITE_LOG_LEVELerrorLowest level that is logged.
VITE_ASSET_URLOptional prefix for static asset links.
VITE_PREFER_ASSETtrue rewrites absolute asset links to paths under VITE_ASSET_URL.

Base URLs are the API's root, like https://collab-api.example.com. Do not add /api/; the app adds it.

What comes from the API ​

These are not app variables. The app loads them from the API's /api/initialize, so they only need setting on the API:

  • Paystack public key
  • The realtime driver and its public settings (Reverb host, Pusher key and cluster, Ably, Firebase web config)
  • The VAPID public key for browser push