Installation
Start with a small React app that runs locally on the Workers runtime.
Prerequisites
Use Node.js 22 or newer and pnpm. You only need a Cloudflare account when you are ready to deploy; local development and standalone builds work without a login.
Create an app
pnpm create goribu@latest my-app
cd my-app
pnpm install
pnpm devOpen the local URL printed in your terminal. The starter includes TypeScript, Tailwind, an interactive home page, and a request-time greeting at /hello.
Choose a new directory name: 1–50 lowercase letters, digits, or hyphens, starting with a letter and ending with a letter or digit. Pass a name, not a path. The scaffolder will not overwrite an existing directory or install dependencies for you.
For JavaScript, add --js:
pnpm create goribu@latest my-app --jsBoth variants use the same framework APIs. There is no --css flag; plain CSS also works in the default starter.
Find your way around
| File | Purpose |
|---|---|
src/routes/index.tsx | The home page. Use .jsx in the JavaScript starter. |
src/routes/hello.tsx | A page with a GET handler that reads the request. |
src/routes/_document.tsx | The HTML document around your pages. |
src/client-entry.js | Browser bootstrap and global CSS imports. |
src/styles.css | Global styles and the Tailwind import. |
goribu.config.js | Worker name and optional Cloudflare resources. |
vite.config.js | Vite, Goribu, and Tailwind plugins. |
AGENTS.md | Project instructions for coding agents. |
Edit the home page, then try /hello?name=Nina. Pages and handlers live together; reusable components can go in src/components/.
Leave dist/, .goribu/, .wrangler/, goribu.wrangler.jsonc, and node_modules/ to the tools that generate them.
Start coding with your agent
Ask your agent to read the generated AGENTS.md before changing the app. Then describe a feature and its expected behavior. The AI coding guide explains how to provide useful context, and At a glance is a compact API introduction.
Commands
Run commands from your app directory.
| Command | Purpose |
|---|---|
pnpm dev | Develop locally with hot updates. |
pnpm typecheck | Check TypeScript without emitting files. TypeScript starter only. |
pnpm build | Build the Worker, browser assets, and static pages. |
pnpm check | Inspect the production target, resources, and migrations without changing them. |
pnpm run deploy | Build and deploy to Cloudflare. |
Development and production builds compile TypeScript without type checking. Run pnpm typecheck separately in TypeScript projects.
Use pnpm run deploy, including run: bare pnpm deploy invokes pnpm's own command. See Deploys when you are ready to publish.
Type a route
Use type-only imports to describe your page props and request handlers:
import type { Handler } from "goribu/server";
import type { Meta } from "goribu";
type Props = { name: string };
// Read the query string and pass serializable props to the page.
export const GET: Handler<Props> = (req, res) => {
const name = req.query.get("name")?.trim() || "friend";
return res.render({ name });
};
export const meta: Meta<Props> = ({ props }) => ({
title: `Hello, ${props.name}`,
});
// Render the same props on the server and in the browser.
export default function HelloPage({ name }: Props) {
return <h1>Hello, {name}.</h1>;
}Handler<Props, Env, Params> also accepts types for Worker bindings and dynamic parameters. Types describe your expectations; validate request input at runtime. The API reference lists the public types.