Skip to content

Kiln Documentation

Kiln is a file-based server-side rendering framework for React and Vite. You write a directory of React components or Markdown files. Kiln turns that directory into routes, decides how each route renders (on the server, in the browser, or both), and ships only the code each page needs.

This documentation covers every package in the Kiln monorepo, one page per package in the API reference, plus task-oriented guides that explain how the pieces fit together.

Packages

PackageVersionWhat it does
@kiln-js/core0.2.0-hotfixRoute matching, the route scanner, env validation, titles, islands, deferred data, HTTP errors, and form validation. Runs on the server and in the browser.
@kiln-js/server0.2.0-hotfixRequest handler. Renders pages to HTML, streams server pages, dispatches API routes, runs actions, and applies CSRF and CORS.
@kiln-js/client0.2.0-hotfixBrowser runtime. Hydration, client-side navigation, prefetching, Link, and error boundaries.
@kiln-js/vite-plugin0.2.0-hotfixVite integration. Builds the route table, compiles server code out of client bundles, rewrites <kiln:title>, and detects islands.
@kiln-js/md0.2.0-hotfixVite plugin that turns .md files in the pages folder into routes, with every Markdown tag rendered by a component you control.
@kiln-js/adapter-vercel0.2.0-hotfixProduces Vercel's Build Output API files and runs the server as an Edge function.
@kiln-js/cli0.2.0-hotfixThe kiln command: create, dev, build, start, routes, generate, typecheck, doctor, and test.
@kiln-js/auth0.2.0-hotfixAccounts, password sign-in, GitHub and Google sign-in, sessions, and authorization hooks.

Start here

Guides

API reference

Conventions used in these docs

Code samples use TypeScript and TSX. File paths assume the default layout created by kiln create. Where a behavior depends on the runtime, the docs say so. Kiln runs on Bun and on Node 18 or later. Bun is recommended, and the CLI reports which runtime and bundler it is using when it starts.