Floor 1 of 5 of the tower
Pagewright
If you only read one, read this one. It’s the shortest path from a typed content model to a page someone can actually read.
The problem
Marketing sites tend to end up in one of two places: every text change waits for a developer, or a page builder produces slow pages that nobody can version. Both are tiring for the people who just want to fix a headline.
The rules I set
- Editors never touch code, and code never touches content.
- A draft isn’t live until someone publishes it, and every publish can be reversed.
- The public site stays static, so it stays fast however busy the editor is.
What I built
A headless CMS with typed content models, an editor with a live preview, and a publish step that renders the whole site to static pages. Drafts live in PostgreSQL behind a login. Publishing writes a versioned snapshot, and both the public pages and a machine-readable feed are built from that snapshot.
How it’s layered
- Editor React blocks you can drag, with the preview beside them.
- Content API Typed content models on Node.js, shared by editor and renderer.
- Store PostgreSQL holding drafts and every published version.
Decisions
- Each content type is defined once in TypeScript and reused by the editor, the API and the renderer, so they can’t drift apart.
- Publishing is a snapshot, not a flag. Rolling back means pointing the site at an earlier snapshot.
- Public read paths are kept separate from the auth-gated editing paths.
Where it stands
A demo system, built to show the design and the reasoning. It has no users and no production data; the model in the tower is a drawing of how it works.
TypeScript · Next.js · React · Node.js · PostgreSQL · Supabase