Skip to content

0022. The landing page: its own script-free static site, always dark ​

  • Status: Accepted
  • Date: 2026-12-05

Context ​

The bare domain and its www name have nothing to show. The app sits behind Cloudflare Access on its own host and the demo is a single-page app on another, so a stranger who types the bare domain meets nothing, or a login. The plan wants a simple front door: what Budget Bob is, an honest "early, built for one household" note, and a way into the demo. It has to look like the product (the Lynx Ledger, the demo) and meet the same accessibility rules.

Decision ​

A new workspace, apps/landing: plain HTML and one CSS file, built by Vite into dist/, served by its own assets-only Worker (budget-bob-landing) in the same way the public demo is (ADR 0021).

  • No script at all. The page is content, so nothing on it needs JavaScript (the FAQ is native details). The CSP (public/_headers) is default-src 'none' plus this origin's styles, images and font: no script source exists to be abused. scripts/landing-a11y.mjs (and apps/landing/test) hold it to that.
  • One product, one look. The page imports @home-budget/ui-tokens (the same colours, sizes, radii, Atkinson font and base styles as the app) and copies the Ledger page's own look for its sample week: day cards, tags, chips, dashed pending and planned entries, the Today border. Always dark, like the app: no light theme, no theme control.
  • The demo's address is a build input. This is a public repository and the demo's host name is not written in it. Pages carry %DEMO_URL%; VITE_DEMO_URL fills it in. An ordinary build uses demo.example.com; the deploy build (npm run landing:build:deploy) refuses to run without the variable.
  • Domains are set in Cloudflare, not in the config. The bare domain and www are added to the Worker in the dashboard, so the config names no production host.
  • The sample numbers are copy, with a test. The sample week, the answers and the envelopes are fictional (the Addams household) and typed into the HTML. apps/landing/test/sample.test.ts recomputes every balance, in and out line, headline and envelope from the entries, in integer cents, so the page can't contradict itself.

Rejected ​

  • A route inside apps/web. It would ship the app's bundle and its script CSP to a page that needs neither, tie the front door's release to the app's, and put a public page on the host that sits behind Access.
  • The docs site (VitePress). Different look, different job, and it is behind Access.
  • A framework or a generator. One page and a 404 don't earn a dependency.
  • Building the sample from packages/core and the mocks. The page is not a data page, and core's view models take a whole household. A static week plus an arithmetic test says the same thing with less to keep in step.

Consequences ​

  • One more Worker to deploy (steps in docs/deploy.md, "Landing page"), and one more check in CI (npm run landing:a11y, with landing:build before it).
  • A token change flows to the page for free; a new look for a shared piece (button, chip, card) has to be made in the landing CSS too, since it copies the app's classes rather than importing them.
  • The page says "Early days" in words. When the app opens to more than one household, that sentence, the FAQ's "Can I sign up?" and the plan's two-users scope change together.