# One codebase, a static site per client: how the Goodform CMS works

Every client site I built used to be its own small stack: its own repository, its own hosting, its own way of breaking. Five clients meant five things to keep alive, and none of them could be worked on by an agent. The Goodform CMS is what I built to stop doing that.

## Blueprints, not templates

A site in the CMS is a set of collections, and each collection has capabilities: it can be listed, booked, sold, translated, reviewed. A blueprint installs the right set for a kind of business. There are blueprints for a marketing site, a store, nightly stays, a service business with booking, and healthcare.

The difference from a template matters. A template is a starting point you copy and then own forever. A blueprint is installed, so when the platform learns something new, every site that uses that capability gets it.

## One layer that everything goes through

The admin screens, the REST API and the MCP server all call the same domain layer, and they all call it as somebody: a person, an API key or an agent, each with a role. Nothing else touches the database.

That one rule pays for itself. The permissions, the review states and the activity log hold everywhere, because there is no second path that forgot to check. When an agent edits a page through MCP, it goes through the same review that a site manager's edit does.

About a hundred operations are exposed this way, the same catalogue over REST and over MCP. Anything I can do in the admin, I can do from a chat.

## Why the sites are static

This is the decision I get asked about. Each client's site is generated as static files and served from storage by its domain. It calls the CMS only for the parts that have to be live, such as a form or a booking.

I chose that over one shared, server-rendered app for three reasons:

- **It is easier to build per client.** A site is my template plus that client's content and theme. There is no shared runtime to keep compatible with everyone at once.
- **The pages are faster.** There is nothing to render on request.
- **It is better for search and for answer engines.** Every site ships a sitemap, structured data and a plain-text map for assistants, all generated with the pages.

It also makes going live boring, which is what you want. Publishing builds a new copy. Going live points the domain at it. Rolling back points the domain at the old one. Nobody deploys anything.

## Preview, then live

Publishing has two steps. The first builds every current change, drafts included, to a preview address behind a password. Nothing is marked published. The second puts approved changes on the real domain. A client can look at exactly what will go out before it does, and an unpublished change is never public.

## What it runs on

A Hono API, a Next.js admin, Postgres with Drizzle, background workers that build and verify each publish, and Railway underneath. I direct AI coding agents for most of the implementation. The architecture, the tests, the review and the release are mine.

## Where it stands

Five client sites run on it today. A new one goes from start to client review in three hours or less, which used to be most of a week.

The next piece is the one that made all of this worth it: letting agents do the small repairs. That is [Dispatch](/posts/agents-that-fix-client-sites).
