Bun-native framework docs

Server-rendered React on Bun, without pretending Bun is Node.

`react-bun-ssr` gives you file-based routing, streaming SSR, deferred data, client transitions, and first-class markdown routes in one Bun-first stack.

Install and boot the docs-grade defaults

bun --version
mkdir task-tracker
cd task-tracker
rbssr init
bun install
bun run dev
30reference pages
14guided walkthroughs

Choose your path

Start with guided onboarding, then drill into the exact runtime surface.

Start

  • OverviewWhat react-bun-ssr is, where it fits, and what you build first.
  • InstallationInstall Bun, scaffold a project, and run the docs-grade defaults locally.
  • Quick StartBuild the Task Tracker example from route files to a working SSR app.

Routing

  • File-Based RoutingMap Bun-native route files to URLs, params, API routes, and markdown pages.
  • Layouts and GroupsCompose shared UI, middleware, and route groups without leaking them into the public URL.
  • MiddlewareRun global and nested request pipeline logic before loaders, actions, pages, and API handlers.

Data

  • LoadersFetch server data, stream deferred values, and hydrate them back into the client tree.
  • ActionsHandle mutations, redirects, validation, and post-submit navigation flows.
  • Error HandlingUse TanStack-style caught errors, notFound, boundaries, and route lifecycle hooks.

Rendering

  • SSR and HydrationRender full documents on the server while keeping the client tree in sync.
  • Streaming and DeferredStream HTML and deferred loader chunks for faster time-to-content.
  • Head and MetaDefine titles and metadata per route without losing SSR determinism.

Deployment

  • Bun DeploymentShip the framework with Bun-only runtime assumptions and a minimal production surface.
  • ConfigurationConfigure headers, bytecode, ports, and other framework deployment settings.
  • TroubleshootingDebug build, hydration, bytecode, fly.io, and Bun runtime deployment issues.

Why teams pick it

Opinionated where it helps, small where it should stay out of the way.

Bun-native runtime

No Node adapter layer. The runtime, build, markdown, and server paths stay Bun-first.

File-based routing

Pages, APIs, layouts, groups, and markdown routes live in one coherent route tree.

Loaders, actions, and defer

Data loading, mutation, and progressive streaming are built into the route contract.

Streaming SSR

Full document streaming and deferred payloads work for first load and soft transitions.

Client transitions

Link and useRouter preserve shared layouts while moving across server-rendered pages.

Markdown routes

Author docs as first-class .md route files without hand-written TSX wrappers.

Generated reference

API pages stay generated, but they now link back into the guides that explain why each export exists.

Start with the curated API overview, then move into the generated package pages when you need exact signatures.

From the blog

How I Built react-bun-ssr With AI

How I used AI to build react-bun-ssr faster, the constraints that kept the framework coherent, and the Bun-first architecture choices that made the workflow work. Written by gaudiauj on March 1, 2026.