Skip to content

Environment Variables

All environment variables are prefixed with VITE_ and baked into the bundle at build time. There is no runtime config — values are embedded as literal strings in the compiled JavaScript.

Variables

VariableDescriptionExample
VITE_API_BASE_URLInternal API base URL (protected by Cloudflare Access)https://staging-arc.semalink.africa
VITE_CF_ACCESS_CLIENT_IDCloudflare Access service token Client IDabc123...
VITE_CF_ACCESS_CLIENT_SECRETCloudflare Access service token Client Secretxyz789...
VITE_ENVEnvironment labelstaging | test | production

Per Environment

VariableStagingTestProduction
VITE_API_BASE_URLhttps://staging-arc.semalink.africahttps://test-arc.semalink.africahttps://arc.semalink.africa
VITE_ENVstagingtestproduction
VITE_CF_ACCESS_CLIENT_IDStaging tokenTest tokenProduction token
VITE_CF_ACCESS_CLIENT_SECRETStaging tokenTest tokenProduction token

Local Development

sh
cp .env.example .env.local

.env.local is gitignored — never commit it. The VITE_CF_ACCESS_* values are only needed when calling the real arc API. For mock data, placeholders are fine.

In CI

GitHub Actions injects all variables during the build step from environment-scoped secrets. No .env file is needed in CI.

Security

Because values are baked into the JavaScript bundle, they are visible to anyone who inspects the source. Never embed private keys, database passwords, or sensitive user data as VITE_* variables. Service tokens (used here) are acceptable because Cloudflare validates them server-side.

Internal use only — Sema Link Engineering