Skip to content

Configuration

Environment variables

Vite merges .env, .env.development, and .env.production. Every VITE_ variable is exposed to browser code, so never store secrets or private keys in these files.

VariablePurpose
VITE_API_URLMain production API base URL
VITE_BASE_URLApplication deployment base path
VITE_TOKEN_KEYlocalStorage token key
VITE_NEW_TOKEN_KEYToken-renewal response header
VITE_WITH_CREDENTIALSWhether cross-origin requests carry cookies
VITE_API_URL_LOCALSeparate trusted service URL
VITE_API_URL_EXTERNALThird-party service URL without the system token
dotenv
VITE_API_URL=https://api.example.com/
VITE_BASE_URL=/admin/
VITE_TOKEN_KEY=admin_token
VITE_NEW_TOKEN_KEY=New-Access-Token
VITE_WITH_CREDENTIALS=false

Paths

  • API base URLs should end with /.
  • A menu component is relative to src/views/, for example auth/user/index.vue.
  • Vite and Vue Router must share the same VITE_BASE_URL.
  • External links and iframe URLs should be restricted to trusted origins.

Theme settings

System information is loaded from the system information API. Theme defaults live in src/stores/settings.ts, persist to localStorage, and synchronize across browser tabs. When adding persistent fields, update defaults and the settings schema migration.

Released under the MIT License