Headless Architecture
Decoupling the presentation layer from back-end capabilities exposed as APIs, as in headless commerce and headless CMS, with composable (MACH) architectures.
Intent
Separate the "head" (front-end experiences: web, mobile, kiosk, voice) from the "body" (back-end capabilities: content, commerce, search) which exposes everything through APIs. Each head can evolve independently.
MACH (Microservices, API-first, Cloud-native SaaS, Headless) is a related industry movement describing composable architectures built from best-of-breed SaaS components.
flowchart LR WEB[Web: Next.js] --> BFF[BFF / API layer] APP[Mobile app] --> BFF KIOSK[In-store kiosk] --> BFF BFF --> CMS[Headless CMS API] BFF --> COM[Commerce API] BFF --> SRCH[Search API] BFF --> PIM[Product information API]
Real-world example
A retailer uses a headless CMS (Contentful/Sanity/Strapi) for marketing content, a commerce engine (commercetools, Shopify Hydrogen/Storefront API, SAP Commerce APIs) for cart and checkout, and Algolia for search, composing them in a Next.js front end. Marketing changes pages without developer releases; developers change the front end without touching back ends.
Pros and cons
| Pros | Cons |
|---|---|
| Omnichannel reuse of capabilities | More integration work and moving parts |
| Front-end teams move fast with modern frameworks | Preview, SEO and personalization require extra engineering |
| Swap vendors per capability | Many SaaS contracts; total cost can rise |
| Better performance with static/edge rendering | Need strong API governance and a BFF/orchestration layer |
Interview questions
What breaks when a company moves from a monolithic CMS to headless?
Content preview, editor experience, SEO metadata handling, personalization and caching often need rework. Plan a BFF/edge layer, preview environments and caching strategy upfront.
Headless vs composable?
Headless decouples presentation from back end. Composable goes further: assembling the back end from interchangeable best-of-breed services. A system can be headless without being composable.