Site / Creating a site
Comparison: TanStack Start
| Concern | TanStack Start | foldkit-site + Plus |
|---|---|---|
| Route declaration | File-based routes with per-route code splitting | Explicit tree over Foldkit Routers |
| Data fetching | Parallel loader per route + router cache | Surfaces declare reads; Remote plans and caches |
| Waterfalls | Parallel loaders; deferred promises for child data | Bounded fixed-point passes; non-blocking UI |
| Prefetch | Built-in strategies, freshness windows, preloadRoute | sourcesFor + Data.satisfy; Remote sets policy |
| Guards | beforeLoad redirects; server functions enforce | Presentation access; server enforces via Guard |
| Head and SEO | Per-route head() meta; SSR and crawler | Site.metaOf from the tree; SSR + sitemap |
| Mutations | Router invalidation reruns loaders | Direct patches + single-flight list updates |
| Server boundary | Server functions alongside routes | Split: SSR for HTML, RemoteServer for data |
TanStack owns the runtime (scheduling, caching, preloading, and rendering).
Foldkit Plus keeps foldkit-site as pure topology so UI, server sync, and AI
agents share one Model and update transition.
Limits: when not to build on Site
- Single-screen apps: A single route needs only a Foldkit Router.
- Preferences and locales: Keep themes outside the route tree; model locales as route parameters when needed.
- Cross-document links: Addresses outside the tree trigger full page loads.
In repo benchmarks (
docs/benchmarks.md), in-treeNavigatecommands ran 1.3 to 4 times faster than full loads (and 3 to 6 times faster after hover preload). - Per-node submodels and layout Surfaces: Use
Site.placementfor routed pages and attach Surfaces to individual route nodes rather than layout wrappers.
Next
- See the API and routing workflows:
foldkit-siteREADME - Separate URL parsing from tree topology: Site and Foldkit's Router
- Run a complete SSR, Remote, and Site app: Site, Remote and SSR together