Site / Creating a site
Creating a site with foldkit-site
foldkit-site is the deployed route topology of a Foldkit application:
which locations exist, how they nest, what each is called, and what it
activates — as data that compiles down to the primitives the runtime already
runs. This guide builds a site end to end: nodes, navigation, data fetching
without waterfalls, prefetching, server rendering, and SEO.
The package README is the onboarding reference; this guide is the path from it to a working application.
The one rule
Site "What location are we at, and what is around it?"
Surface "What may this location observe, and which Messages may it cause?"
Remote "What server facts do those observations require?"A Site owns no Model, runs no Effects, dispatches no Messages, and fetches
nothing. If a feature would need the Site to become another store, async
runtime, or cache, it does not belong here. Everything below lowers into the
Foldkit Router (URL semantics), Surface.when (activation), Bundle
placements (stateful pages), and Remote/SSR (data and rendering).