Case study // Product
My own site: Next.js with a written-down caching contract
The page you are reading. Next.js on top of Payload, a caching contract that is written down, and a 404 that works without a database.

01Context
I wanted a site that shows my work without me typing it into HTML every time. So a CMS that stays out of the way, and a frontend that stays fast even when nobody looks at it.
02How it was built
Content lives in the CMS and is rendered through a cached data layer. Every public read goes through its own cache function with tags; a publish triggers the affected routes and purges exactly the affected edge objects.
I wrote the cache rules down instead of guessing them: how long a page stays fresh, how long it is still served during an origin outage, which paths are never cached. After every change I measure the status on the real host.
The 404 decision happens in the proxy before the first byte streams. Next would otherwise pin the status to 200 as soon as the shell streams - that was measurable, and today it is a test.
Before every merge, lint, a typecheck in two TypeScript versions, tests and a build run; afterwards a smoke test against the standalone server. That lives in a file in the repo, not only in my head.
03What I learned
The most expensive bug was a silent one: a 404 that was cached at the edge for thirty days and survived an outage. Since then every error response is no-store, and the rule is in the rulebook so it cannot quietly disappear again.
04Outcome
118 integration tests green, 14 blocks, and an edge cache that measurably refills after a publish.