Case study: a content site built as a single Worker module

Most content sites are a pile of files hoping their host reassembles them correctly. This one is a single program. WattworthGuide — a home-energy education site with calculators, guides, and a growing library — runs as one Cloudflare Worker whose module carries every page it serves in an embedded file map: the HTML for each route, the sitemap, the shared assets, all of it inside the deployed unit. There is no build server, no static bucket, no sync step between "the files" and "the site." The site is the module, and the module is the site. This case study is about why that architecture was chosen, what it costs, and the deploy discipline it demands — because a one-file website concentrates every risk that a file pile distributes, and the build process has to answer for all of them.

The decision

The site's requirements were modest in scale and strict in kind: a few dozen pages, fast everywhere, cheap to run, and — the requirement that drove everything — provably deployable. Content sites in this portfolio had suffered the classic partial-deploy failure: a manifest that silently dropped files, a host state that drifted from the source, a "successful" deploy that served a site missing a page. The single-module pattern eliminates the category. A Worker deployment is atomic: the version that is live is one artifact with one hash. Either the whole site updated or none of it did. There is no state in which the homepage is new and the sitemap is last month's, because there are not two things to get out of sync.

The trade is real and was accepted with open eyes. The module is edited as a whole, so every change — one new page among thirty-three — produces a new whole artifact, and correctness has to be proven at the level of the artifact, not the file. Text editing inside a large module is unforgiving of carelessness. And the pattern has a ceiling: it suits a site of dozens of pages, not thousands. Within those bounds, the properties it buys — atomicity, one hash to verify, one version to roll back — were worth more than the conveniences it gives up.

How a change is built

A recent change is the cleanest illustration: adding a 1,600-word comparison guide to the library. The work began not with the new page but with the current production module, whose identity was proven two independent ways — its deployment record and its content hash — because every later claim ("we changed only this") depends on the base being exactly what production runs. The new page was written in the site's existing shell, preserving its analytics include exactly once and its disclosure conventions exactly as the other guides carry them. The module was then reassembled: the file map grew from 32 entries to 33, and the change was verified as a delta — a machine comparison showing that the new module differed from the proven base by the new page and one sitemap line, and nothing else. A local harness exercised the assembled module's routes: 71 checks, zero failures. Only then was the deploy prepared, with its rollback stated in advance in one sentence: redeploy the previous version, which remains intact and addressable, at full traffic.

What the discipline buys

Three properties, each verified rather than asserted. The base is never a guess. Deployments in this pattern start from the production artifact's own identity — its version and hash — not from a local folder believed to be current. The delta is the review. Because the artifact is one unit, the review of a change is a comparison of two units, and "only the intended page changed" is a checkable fact rather than a hope about a file sync. Rollback is a redeploy, not a restore. The prior version is a first-class, addressable artifact; returning to it is the same operation as deploying, with the same atomicity. For a small content site, this is what professional deployment looks like when it is stripped to essentials: no pipeline theatre, no orchestration — one artifact, proven base, measured delta, named rollback. The factory lesson generalizes beyond the pattern itself. Whatever stack a small site runs on, the questions are the same, and they are the ones this build answers in its sleep: What exactly is live right now, and how do you know? What exactly will change, and how did you check? And if it goes wrong, what exactly do you redeploy? A build process that cannot answer those three in one sentence each is not finished, whatever its tooling looks like. This site can answer them — in a version identifier, a file-map diff, and a redeploy command — and that, more than the architecture itself, is the result worth copying.

Website Factory builds sites as fixed-scope packages — Launch, Grow, and Scale — with the scope, revision credits, and delivery terms published before work starts.

Advertisement