Site / With Remote and SSR
Who owns what
| Concern | Owner | What it leaves to others |
|---|---|---|
| The address and its route value | Foldkit's Router | Anything beyond one address |
| The tree of places: titles, sections, history, head metadata | foldkit-site | State, fetching, rendering |
| Which Surface each place activates | foldkit-site | |
| The route field, and every change to it | the application's Model, through update | |
| What a page reads | a Surface (foldkit-surface) | Fetching: it only declares |
| Server facts: the store, what is missing, fetching, retention | foldkit-remote | Routes and pages |
| The server-to-browser handover, and the checks that it is whole | foldkit-ssr | State: data crosses in Remote's part |
Joining the pieces into one update and one runtime config | foldkit-bundle | Decisions the pieces make |
Each fact has one owner, and the others read it. The Site never reads
window.location; the route is a Model field. Remote never looks at the
route, only at which Surfaces are active. SSR never fetches; it checks that
what the page reads crossed with it.