Documentation
Everything you need to build with Patties — scaffold an app, write filesystem routes on Bun.serve, render React 19 with on-demand islands, compose middleware over web-standard Request/Response, and build and deploy with the CLI. New here? Start with the Overview.
The mental model
A Patties app is mostly a folder convention plus a small runtime. You write route modules and islands; the framework discovers them at build time, inlines them into the production bundle, and serves them with Bun.serve. There is no separate bundler, file watcher, or glob library to wire up — Bun ships those, and Patties uses them directly.
| You write… | In… | Bun primitive behind it |
|---|---|---|
| Route modules | app/routes/ | Bun.Glob discovery → Bun.serve routes |
| Interactive islands | app/islands/ | Bun.build client entries |
| Middleware | app/middleware.ts | compose() over Request |
| Config | patties.config.ts | typed config + adapters |
The one thing to remember
Expensive thinking happens at build time. Route and island discovery runs once during patties build and is inlined into the bundle — the production server never re-scans the filesystem. Dev mode is the exception: it may re-scan on change to drive HMR.
Browse the docs
Overview
What Patties is, the problems it solves, and the core mental model. Read this first.
App structure
The folder convention: routes, islands, middleware, config, and where everything lives.
Project scaffolding
create-patties: the prompt flow, project types, Patties UI, monorepo, and deploy targets.
Framework
The runtime in depth: routing, server, rendering & islands, middleware & context, config.
Routing
Filesystem routes compiled to Bun route patterns — dynamic segments, methods, nesting.
Rendering & islands
React 19 streaming SSR with renderToReadableStream and opt-in client islands.
Build pipeline
How discovery, client/server entry generation, and the manifest come together at build.
Adapters & targets
Ship to bun or edge behind adapters — platform specifics out of the core.
AI & agents
Optional primitives for agents, tools, and jobs — and how they stay out of non-AI apps.
CLI
The patties command: dev, build, deploy, and secret management.
Looking for design intent?
This section is the user documentation. If you want to understand why the framework is shaped the way it is — the modular-monolith convention, the public-API boundary, why there is no DI container — the design specifications are indexed with their status on the Release page, and the specs themselves live under Specs. To see what shipped in each version, see the Changelog.