Skip to content

Getting started

Kiln is a file-based server-rendering framework for React and Vite. You write components in a folder, and Kiln serves each file at the URL its path describes. This page gets you from nothing to a running page in about five minutes.

What you need

  • Bun 1.1 or later, recommended. Node.js 18 or later also works.
  • A terminal and an editor. Nothing else is required.

Check your versions with bun --version or node --version. Installation lists the full requirements.

The four steps

  1. Create a project. The scaffolder asks a few questions and writes the files.
    bash
    bunx @kiln-js/cli create my-app
  2. Run the development server. It renders pages on the server and reloads the browser when you save.
    bash
    cd my-app
    bun run dev
    Open http://localhost:3000.
  3. Add a page. Create app/pages/hello.tsx. The URL /hello exists as soon as you save the file, with no route table to update. Quick start walks through this with a loader and an API route.
  4. Build for production. This writes the client and server bundles, and bun run start serves them.
    bash
    bun run build
    bun run start

Where to go next

  • Project structure explains what each folder and special file does.
  • Routing covers dynamic segments, route groups, and the priority rules.
  • Rendering modes explains when a page should render on the server, in the browser, or both.
  • Deploying covers production builds and Vercel.