v0.9.3 is out· Selective Worker routing, static-render and more

The React framework for Cloudflare Workers.

Give your coding agents a great way to build full-stack apps and deploy what is needed. All while keeping your codebase clean and easy to review yourself, at any stage.

Read the docs
npx create-goribu my-app
GET/posts/42workerrendered per request
GET/aboutstaticprerendered at build · served from CDN
POST/posts303form handler · redirects to the new post
  • 01

    One file

    The page UI and its handlers live together.

  • 02

    One canonical way

    Clear patterns for humans and agents.

  • 03

    Small API

    Token-efficient, with fewer conventions to keep in mind.

  • 04

    Code first

    Spin up Cloudflare services like D1 and KV from code.

  • 05

    Server-driven

    SSR for the first load, just JSON for navigation.

01 · change things easily

Build fast.
Change things easily.

Routes keep their server handlers and React page together. Most changes stay local and easily reviewable, no matter if you or your agent made them.

src/routes/posts/[id].jsx
// Load the post or return a 404.
export async function GET(req, res) {
  const post = await req.d1`
    SELECT title, body FROM posts
    WHERE id = ${req.params.id}
  `.get();
  if (!post) return res.notFound();
  return res.render({ post });
}

// Render the post as a React page.
export default function Post({ post }) {
  return <article><h1>{post.title}</h1>
    <p>{post.body}</p></article>;
}
  1. GET loads the post from D1 before anything renders.

    L2–6
  2. An unknown id returns the 404 page with res.notFound().

    L7
  3. The default export renders the post as a React page.

    L12–15

02 · architecture

Reliable architecture.
Less complexity.

Every request takes one of three different forms. You never wire them up yourself. The route decides.

  1. 01 · request time

    First visit

    The Worker runs your handler and streams real HTML right away.

    GET/posts/42→ worker · html

  2. 02 · in the app

    Navigation

    A link click fetches only the page data as JSON and swaps in the next page.

    GET/posts/43→ page json

  3. 03 · built ahead

    Static route

    HTML and page data come straight from the CDN. The Worker never runs.

    GET/about→ cdn · 0 worker calls

03 · predictable by design

Your agent gets it
on the first try.

A small API, one canonical way to do things and every file your agent needs from the start. Goribu is token-efficient, takes up little context and lets your assistant add the resources you need for a production app.

a first task to try

“Build a notes app with D1. Add a notes list, a create form, an edit page and deletion. Replace the starter pages.”

New project? Start with npx create-goribu notes-app

›build a notes app with d1
createdsrc/routes/notes/[id].jsx
updatedgoribu.config.js+ database: d1

04 · included

Everything a route needs.
Nothing it doesn’t.

  • TypeScript or JavaScript

    Typed by default or use --js for plain JavaScript. The framework stays the same.

  • Forms

    Server mutations, validation, redirects and pending state through a single Form component.

  • Powered by Vite

    Fast development, HMR and the Vite ecosystem with all the plugins you need, available.

  • Metadata & SEO

    Titles, descriptions and other metadata next to your routes, rendered on the server.

  • Error handling

    Helpful error pages with a unique ID you can trace in logs next to the CF-Ray.

  • D1, KV, R2 and cache

    Provision Cloudflare resources through code and use them with request-scoped helpers.

Start building.

A few commands to a running app. Deploy to Cloudflare when you’re ready.

terminal
npx create-goribu my-app
cd my-app && npm install
npm run dev