Environment Variables

Every VITE_ variable Thunder UI reads, and the feature flags that are off by default.

All variables must be prefixed VITE_ to reach the browser. .env.example in the generated app is the canonical annotated list.

Every value is a string. Boolean flags go through envFlag() in src/core/lib/utils.ts, which treats 0, false, off and no as disabled, and unset or empty as the default (false).

Reference

VariableMeaning
VITE_API_BASE_URLBackend base URL. Defaults to window.location.origin.
VITE_OAUTH_SERVER_URLOIDC issuer
VITE_OAUTH_CLIENT_IDSet means OIDC; empty means cookie session. Chooses the auth strategy.
VITE_OAUTH_SCOPEe.g. full_access offline_access
VITE_APP_LAYOUTnavbar (default), sidebar, mobile or native - or any name in src/overrides/layouts.ts
VITE_DEFAULT_PAGINATION_LIMITPage size for the card list view
VITE_DEFAULT_CACHE_TTLSDK cache stale time, in seconds. Falls back to 1.
VITE_ENABLE_WALLETWallet route + navbar balance widget
VITE_ENABLE_USERSBuilt-in users card view
VITE_ENABLE_NOTIFICATIONSNotifications route, navbar bell, mobile bell
VITE_DEFAULT_CURRENCYFallback currency code, default LYD
VITE_TRIGGERS_BASE_URLTriggers service host; required for notifications
VITE_TRIGGERS_TENANT_IDRequired for notifications
VITE_UNREAD_COUNT_INTERVALPoll interval in milliseconds, default 30000
VITE_UPLOAD_FOLDERImageKit folder; empty uses the account default

Note the unit mismatch: VITE_DEFAULT_CACHE_TTL is in seconds, VITE_UNREAD_COUNT_INTERVAL is in milliseconds.

Feature Flags

src/core/lib/features.ts exposes features.wallet, features.users and features.notifications.

All three are off by default - a generated app does not inherit wallet, user or notification UI it did not ask for.

.env
VITE_ENABLE_WALLET=1
VITE_ENABLE_USERS=1
VITE_ENABLE_NOTIFICATIONS=1

These replace an older VITE_DISABLE_WALLET, which ran the opposite way. A project that relied on the wallet being on by default now needs VITE_ENABLE_WALLET=1.

See Built-in Pages for what each flag turns on.

Backend Variables Are Separate

These are the app's variables. The Thunder backend has its own, unprefixed set - see Environment Variables and thunder-core's required variables.


On this page