Documentation
Guides
Host-owned routing, a typed page contract, and packs the call site passes at render. One pack is your UI. Many packs are installed themes.
Packs target Svelte, React, Vue, Solid, Preact, Lit, or Angular through the framework adapters.
Getting started
- What is KeelHost-owned routing. Packs implement page ids. The call site passes the pack.
- Server installationAdd the Yuri Capital Maven releases repo and dev.kolektiv.keel:core.
- Client setupPoint the @kolektiv npm scope at Nexus releases and install the router plus a framework adapter.
- Host (Ktor)Stand up a Keel host, registry, HTML shell, visits, and /__keel/schema.
- PackScaffold a pack from /__keel/schema for any adapter, or wire keelPack in Vite by hand.
- First pageRegister a page on the host, implement it in a pack.
Core concepts
- Host-owned routingPage ids live on the server. Packs implement ids, never paths.
- Page contractsPage ids and payload types are the contract packs implement.
- Seed and headersThe JSON document that bootstrap and visits share.
- Packs and manifestsA versioned .feb zip of modules keyed by page id.
- Routing primitivesFramework-agnostic router plus thin per-framework adapters.
- Server actionsTyped writes. JSON in, JSON out. The seed stays the read model.
- Document head and SEOPacks author +head.svelte (or +head.html); the host renders it into the HTML shell.
Advanced cases
- Choosing a packWhich pack renders a page is the call site's concern, pass an opened pack into render.
- Partial reloadsKeep the module. Reload only the data you name. The client shallow-merges.
- Forms and 422sProgressive enhancement over router.visit.
- Mutate and rehydrateTanStack Query invalidates. A visit reloads the seed. No second API.
- Pack hot reloadRebuild a pack while the host runs. The host swaps the bundle, clients reload when the build hash changes.
- Navigation guardsCancel, allow, or redirect visits, reloads, and browser back/forward.
Implementing Keel
- Wire protocolSeed JSON, headers, status codes, path grammar, CSRF. The contract another host implements.
- Host adapterWhat a backend must implement to be a Keel host. The Ktor plugin is the reference.
- Pack adapterPageModule, bootstrap, manifest.json, .feb layout, and writing a RouterAdapter.
- Typegen contractGenerate .ts, .d.ts, and keel/1 JSON from page and action types. Consume them from any language.
- Framework adaptersOne pack contract across Svelte, React, Vue, Solid, Preact, Lit, and Angular — bootstrap, page state, forms, actions, components, guards, and mount.