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
| Variable | Meaning |
|---|---|
VITE_API_BASE_URL | Backend base URL. Defaults to window.location.origin. |
VITE_OAUTH_SERVER_URL | OIDC issuer |
VITE_OAUTH_CLIENT_ID | Set means OIDC; empty means cookie session. Chooses the auth strategy. |
VITE_OAUTH_SCOPE | e.g. full_access offline_access |
VITE_APP_LAYOUT | navbar (default), sidebar, mobile or native - or any name in src/overrides/layouts.ts |
VITE_DEFAULT_PAGINATION_LIMIT | Page size for the card list view |
VITE_DEFAULT_CACHE_TTL | SDK cache stale time, in seconds. Falls back to 1. |
VITE_ENABLE_WALLET | Wallet route + navbar balance widget |
VITE_ENABLE_USERS | Built-in users card view |
VITE_ENABLE_NOTIFICATIONS | Notifications route, navbar bell, mobile bell |
VITE_DEFAULT_CURRENCY | Fallback currency code, default LYD |
VITE_TRIGGERS_BASE_URL | Triggers service host; required for notifications |
VITE_TRIGGERS_TENANT_ID | Required for notifications |
VITE_UNREAD_COUNT_INTERVAL | Poll interval in milliseconds, default 30000 |
VITE_UPLOAD_FOLDER | ImageKit 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.
VITE_ENABLE_WALLET=1
VITE_ENABLE_USERS=1
VITE_ENABLE_NOTIFICATIONS=1These 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.