Skip to main content

Environment variables

All VITE_* values are bundled into the browser — never put private keys in them.

VariablePurposeRequired
VITE_NEWS_PROXY_URLWorker /gnews URLNo (production default built in)
VITE_GDELT_PROXY_URLWorker /gdelt URLNo
VITE_NEWSLETTER_SUBSCRIBE_URLWorker /newsletter URLNo
VITE_API_BASE_URLWorker origin for /api/* (cache, accounts, admin)No — defaults to the production Worker
VITE_CLERK_PUBLISHABLE_KEYClerk publishable key (pk_…, public)No — production uses the key committed in src/config/backend.ts; empty means accounts are switched off
VITE_ENABLE_PUBLIC_CORS_PROXYEmergency public proxy switchNo — keep false
VITE_ENABLE_MOCK_NEWSAllow demo data when every provider failsNo — keep false in production
VITE_GNEWS_API_KEYDirect GNews on localhost onlyNo — dev only
DOCS_URL, DOCS_BASE_URLDocs deployment target (build time)No — defaults to /docs/ on www.novareport.net

Build-time variables (not VITE_*, not bundled into the browser):

VariablePurposeDefault
MAIN_SITE_URLCanonical URL injected into the Docusaurus config (docs-site/docusaurus.config.ts)https://www.novareport.net
DOCS_STRICTWhen set to 1, a docs build failure fails the whole build (scripts/build-docs.mjs); without it the committed public/docs is kept and a warning is printedunset (lenient)
VITE_ENABLE_MOCK_NEWS=false

Worker secrets (wrangler secret put <NAME> in workers/news-api; never in the repository):

SecretPurpose
GNEWS_API_KEY, UNSPLASH_ACCESS_KEY, BEEHIIV_API_KEY, BEEHIIV_PUBLICATION_IDNews, images, newsletter
NEWSDATA_API_KEYOptional secondary news source
DATABASE_URLNeon connection string
CLERK_SECRET_KEY, CLERK_JWT_KEYVerify Clerk sessions (the PEM public key allows verification without a network call)
CLERK_WEBHOOK_SIGNING_SECRETVerify Clerk webhooks
ADMIN_KEYS_ENCRYPTION_KEYEncrypt provider keys stored through the admin console

GET /api/health on the Worker reports which of the application secrets are configured, without revealing any value.