home/field notes/Architecture
ArchitectureReact

Headless at scale: Strapi & Payload patterns I keep reaching for

Content modelling decisions you make on day one decide whether year two is pleasant.

KB Kambiz BaghieFeb 20269 min

Model blocks, not pages

The single biggest lever is modelling content as a list of component blocks rather than rigid page templates. Editors compose; developers render a block registry. New layouts stop requiring schema migrations.

Draft / publish from the start

Retrofitting a draft state is painful. Both Strapi and Payload give it to you early — turn it on before the first real entry exists, and wire a preview token so editors can see unpublished work in context.

A typed fetch layer that survives churn

Generate types from the CMS schema and route every read through one typed client. When a field gets renamed, the compiler tells you every call site instead of production telling your users.

  • One fetchEntry() wrapper — caching, error shape, and auth in a single place.
  • Zod (or generated types) at the boundary so bad data fails loud, early.
  • Block components keyed by __component so the CMS drives layout.

Get these three right and a headless backend stays a pleasure to live with long after launch.

Working draft. An outline of the real article — the full write-up is on the way. The notes below are genuine takeaways from shipping this in production.