Site / With Remote and SSR
Who owns what
| Concern | Owner | What it does not do |
|---|---|---|
| The address and its route value | Foldkit's Router | Know anything beyond one address |
| The tree of places: titles, sections, history, head metadata, which Surface each place activates | foldkit-site | Hold state, fetch, or render |
| The route field, and every change to it | the application's Model, through update | |
| What a page reads | a Surface (foldkit-surface) | Fetch: it only declares |
| Server facts: the store, what is missing, fetching, retention | foldkit-remote | Know about routes or pages |
| The handover from server to browser, and the checks that it is whole | foldkit-ssr | Own any state; data crosses through Remote's own part |
Joining the pieces into one update and one runtime config | foldkit-bundle | Decide anything the pieces decide |
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.