# How it fits together

This page shows how the CMS, the Delivery API, a frontend and signals work together.

```
Editor publishes  ->  Lightbolt (CMS)  ->  signal  ->  frontend
                                       <-  GET manifest, entries, site, files  (Delivery API)
Visitors          ->  frontend (its own snapshot and cache)
Frontend          ->  POST reports  ->  Lightbolt (counts only)
```

## The parts

- **Lightbolt** keeps content, files, settings and versions. Only published versions leave it.
- **The Delivery API** runs from server to server. It only reads, apart from forms and reports. Never call it from a browser.
- **A frontend** answers visitors from its own snapshot of the site, and from an HTML cache. So the site keeps working when the CMS is away. One frontend can serve many sites. The `Host` of a request decides which site.
- **Signals** tell a frontend within seconds that something changed. The frontend then reads the manifest, and fetches what differs.
- **Reports** bring counts back: page views per kind, bots, server errors, fonts fetched, and page weights. They never hold anything that identifies a visitor.

## The loop of a frontend

1. On a signal, and every few minutes anyway, call `GET manifest`.
2. Compare four versions of each entry with your snapshot:
   - `version`;
   - `related_version`, for blog posts;
   - `display_version`, which is what it shows, from its overview page;
   - `children_version`, for an overview. It moves when a page under it is published, taken offline, moved or edited. The own version of the overview stays the same.
   Fetch what differs with `GET entries/<id>`. Call `GET site` when `site.version` moved.
3. Drop the cached HTML of what changed.
4. Every few minutes, call `POST reports`.

## Good to know

- Every answer has an `ETag`. Send `If-None-Match` to get a `304`.
- On a 5xx, keep the old snapshot and try again later.

*Also called: architecture overview, content flow, headless setup.*

Last changed 26 November 2026
