Secrets inventory

Every environment variable the site reads, whether it is secret, whether it reaches the browser, and where it is used.

  • Status: Current
  • Last updated: 2026-11-01
  • Related ADRs: ADR-0005, ADR-0016

Snapshot of the system as it stands today. Edit in place; never record what changed.

Inventory

The variables are read directly where they are used. Locally they live in .env.local, which .gitignore excludes (.env*.local). .env.example at the repository root lists every variable below, with a comment and no value.

VariableWhat it isSecret?Reaches the browser?Read byRotation
SITE_URLThe site's public address, an https origin with no path; without it every page is noindex (ADR-0035)No — public, and printed on every share imageOnly as the address in pages' links and images; never as a variablesrc/lib/seo.ts, src/app/og/[...slug]/route.tsx, scripts/sync-content.tsWhen the domain changes
NEXT_PUBLIC_ALGOLIA_APP_IDAlgolia application IDNoYes, inlined into the client bundlesrc/lib/algolia.ts, scripts/sync-content.tsWith the Algolia application
NEXT_PUBLIC_ALGOLIA_SEARCH_KEYAlgolia search-only API keyNo — public by design, but it can read every record in the indexYes, inlined into the client bundlesrc/lib/algolia.tsOn suspicion of abuse, in the Algolia dashboard
ALGOLIA_WRITE_KEYAlgolia key with write access to the indexYesNoscripts/sync-content.ts onlyOn suspicion, or yearly, in the Algolia dashboard

Rules

  • No secret is ever a string literal — not in source, config, comments, tests or docs.
  • NEXT_PUBLIC_* publishes a value to every browser. Never a secret; each one is reviewed as a publication. ALGOLIA_WRITE_KEY must never gain the prefix.
  • .env*.local files stay out of git. .env.example is committed and documents every variable with a comment, never a value.
  • A build that publishes refuses to run without the secrets it needs, naming the variable and never printing its value. scripts/sync-content.ts refuses in the same way without SITE_URL, so production cannot silently go noindex.
  • If a secret is ever committed, rotate it immediately. Removing it from the tree or from history is not enough.

On this page

3 min read