# Guren > Guren is a Bun-first fullstack TypeScript framework: Laravel-style conventions, end-to-end type safety from route to React component, and mechanical verification your coding agent runs itself. Develop on Bun; deploy to Bun, AWS Lambda, Vercel, or Cloudflare Workers. Guren is built for AI-agent-driven development: `guren context` hands an agent the project map with API signatures, and `guren check` / `guren audit` verify its work mechanically. It pairs Laravel-style conventions (controllers, models, middleware, validation) with the TypeScript ecosystem: Bun runtime, Hono HTTP, Drizzle ORM, and Inertia.js + React. Codegen keeps routes, page props, and API clients typed end to end. Every documentation page is also available as raw Markdown: append `.md` to its URL. ## Guides - [Guren at a Glance](https://guren.dev/docs/guides/overview.md): The fullstack TypeScript framework that feels like Laravel, powered by Bun. - [Why Guren](https://guren.dev/docs/guides/why-guren.md): An honest look at where Guren fits (compared with Hono, Next.js, AdonisJS, and Laravel) and why it is built the way it is. - [Fullstack on Bun](https://guren.dev/docs/guides/bun.md): Bun ships a runtime, a package manager, a bundler and a test runner, and its dev server can serve HTML pages next to API routes. It does not ship a fullstack framework, and its own documentation says so. This page is for anyone searching for a Bun fullstack framework: what Bun, Hono and Elysia each cover, what is left for you to assemble, and how Guren fills that gap while still deploying to Node.js, Vercel and Cloudflare Workers. - [Getting Started](https://guren.dev/docs/guides/getting-started.md): This guide has two parts. Part A gets a fresh Guren app running in about five minutes with SQLite: no Docker, no database server. Part B covers the full setup: Postgres or MySQL, environment variables, feature generators, and production builds. Start with Part A; come back to Part B when you need it. - [First Steps: A 10-Minute Tour of One Request](https://guren.dev/docs/guides/first-steps.md): This tour follows a single request, GET /posts, through every layer of a Guren app: route, controller, validation, model, resource, Inertia page, and test. Read it to build a mental map; each stop links to the guide that goes deeper. - [Configuration](https://guren.dev/docs/guides/configuration.md): A Guren app keeps its configuration in config/. Two kinds of file live there: - [Architecture](https://guren.dev/docs/guides/architecture.md): Guren reimagines Laravel's design principles in TypeScript, tying together Bun, Hono, Inertia.js, React, and Drizzle ORM into a full-stack MVC framework. This document outlines the end-to-end flow from routing to response generation and explains the main building blocks. - [Routing](https://guren.dev/docs/guides/routing.md): Routes map a method and a URL to the code that answers it: a controller action or an inline handler. Each application owns one Router. A route file exports a registrar, a function that receives that router and registers routes on it, and src/app.ts passes the registrar to createApp(). - [Route Contracts](https://guren.dev/docs/guides/route-contracts.md): A route contract is the options object you pass as the second argument when you register a route. Its schemas validate the request before the action runs, and the same definitions type the generated route helpers and API client, feed the OpenAPI document and describe the route's agent tool. Registering the route itself (paths, groups, names, middleware, model binding) is covered in Routing. - [Controllers](https://guren.dev/docs/guides/controllers.md): Controllers are where your application logic lives. They receive HTTP requests, interact with models and services, and return responses. Think of them as the glue between what the user asks for and what your app delivers. - [Middleware Guide](https://guren.dev/docs/guides/middleware.md): Middleware runs code around a request: before the controller action, after it, or instead of it. Guren uses Hono's middleware model, and you attach middleware in one of three places: - [CSRF Protection](https://guren.dev/docs/guides/csrf.md): Cross-Site Request Forgery (CSRF) protection prevents malicious websites from submitting forms on behalf of authenticated users. Guren's CSRF middleware issues a token per session (or a double-submit token for guests) and verifies it on POST, PUT, PATCH, and DELETE. - [Validation](https://guren.dev/docs/guides/validation.md): Validate request input against a schema and get typed, parsed values back. When the input is invalid, the request ends with a 422 response, or, on an Inertia request, a redirect back to the form with one error message per field. - [Error Handling](https://guren.dev/docs/guides/error-handling.md): An exception thrown anywhere in a request ends up at the ExceptionHandler, which decides what gets reported and what the client sees. You customize it from a service provider, and an ordinary try/catch inside a controller handles the errors you want to recover from on the spot. The handler answers differently in development and in production. - [Database](https://guren.dev/docs/guides/database.md): Guren reads and writes the database through models built on Drizzle tables, with a query API shaped like Laravel's Eloquent and typed from your schema. A new app uses SQLite and needs no setup; PostgreSQL, MySQL and Aurora Serverless are a configuration change away. - [Models](https://guren.dev/docs/guides/models.md): A model wraps one table from db/schema.ts. It queries the table, creates and updates rows, and decides how a record is cast, serialized and paginated. The connection and the schema are set up in Database, and relations between models are declared as described in Relationships. - [Relationships](https://guren.dev/docs/guides/relationships.md): Declare relationships next to the model that owns them, then eager-load them everywhere. Each relation is registered on the model class with hasMany(), belongsTo() or one of the other methods below. The models themselves are described in Models. - [Frontend Guide](https://guren.dev/docs/guides/frontend.md): Guren delivers a single-page application experience by combining Inertia.js with React. Controllers return Inertia responses, and the frontend renders the matching React components located under resources/js/pages/. For the parts of the Inertia protocol the server implements, see Inertia Protocol Support. - [Inertia Protocol Support](https://guren.dev/docs/guides/inertia.md): Guren ships its own Inertia server adapter inside @guren/core, written against the Inertia protocol as @inertiajs/react 3 speaks it. This page is the coverage table: which parts of the protocol the adapter implements, which it leaves out, and where each part is documented. If you arrive from the Laravel, Rails or AdonisJS adapter, read this page first and the Frontend guide second. - [Server-Rendered Views](https://guren.dev/docs/guides/views.md): this.view() renders a JSX component to a plain server-rendered HTML response, the non-hydrating counterpart to this.inertia() for public, read-mostly pages: blog posts, docs, marketing pages. No client framework, no hydration, no Inertia page-payload script in the document. It is what guren.dev uses for its own blog posts. - [Authentication Guide](https://guren.dev/docs/guides/authentication.md): Add sign-in, registration and password reset to an app with one command, then protect routes and read the signed-in user in controllers. The first half of this page covers that generated setup; the second half covers guards and user providers, for when you change how it works. Sessions and OAuth sign-in have their own guides, Sessions and OAuth. - [Sessions](https://guren.dev/docs/guides/sessions.md): A session keeps per-browser state between requests, and the session guard stores the signed-in user's identifier in it. This page covers how the session middleware is attached, the cookie options, and the stores a session can live in: memory, the database, an encrypted cookie or Redis. Signing users in is described in Authentication. - [OAuth Guide](https://guren.dev/docs/guides/oauth.md): Guren ships an OAuth 2.0 authorization-code flow for "Sign in with GitHub / Google / Discord" style login. It handles the redirect, CSRF-safe state, token exchange, and profile fetch. make:auth --oauth and guren add oauth scaffold it for you, and you can also wire it into a login controller of your own. - [Authorization](https://guren.dev/docs/guides/authorization.md): Authorization determines what an authenticated user is allowed to do. Guren provides a policy-based authorization system inspired by Laravel. - [API Tokens Guide](https://guren.dev/docs/guides/api-tokens.md): Guren provides a secure API token system for authenticating API requests. Tokens are hashed before storage, support abilities (scopes), and can have expiration times. - [Password Reset Guide](https://guren.dev/docs/guides/password-reset.md): Guren provides a secure password reset system with token generation, verification, and expiration. The token is signed rather than stored: only an opaque token id reaches the store. - [Email Verification Guide](https://guren.dev/docs/guides/email-verification.md): Guren provides a secure email verification system with token generation, verification, and expiration. The token is signed rather than stored: only an opaque token id reaches the store. - [Encryption & Hashing](https://guren.dev/docs/guides/encryption.md): Guren provides utilities for encrypting data and hashing passwords securely. - [Events Guide](https://guren.dev/docs/guides/events.md): Guren provides a simple yet powerful event system for decoupling components in your application. Events allow you to broadcast occurrences in your application that other parts can listen and react to. - [Queue Guide](https://guren.dev/docs/guides/queue.md): The queue moves slow work off the request: sending mail, processing uploads, calling an external API. A controller dispatches a job and responds immediately; a worker process picks the job up and runs it afterwards. - [Cache Guide](https://guren.dev/docs/guides/cache.md): The cache stores the result of slow work, such as a database query or a computation, under a key so the next request can read it back. Add it with bunx guren add cache, pick a backend with CACHESTORE, and read the cache from the container as cache. - [Mail Guide](https://guren.dev/docs/guides/mail.md): Guren provides a fluent API for sending emails with support for multiple transport backends. The mail system integrates with the queue system for async sending and supports HTML templates, attachments, and more. - [Notifications Guide](https://guren.dev/docs/guides/notifications.md): Guren provides a unified API for sending notifications across multiple channels like email, database, Slack, and more. Notifications are class-based, making them reusable and easy to test. - [Broadcasting Guide](https://guren.dev/docs/guides/broadcasting.md): Guren provides a broadcasting system for real-time event broadcasting to connected clients. This is useful for building features like live notifications, chat applications, and real-time dashboards. - [Live Props](https://guren.dev/docs/guides/live-props.md): A live prop reloads itself when a broadcast event says its data changed. The controller names the event, the server lists that event's channels in the page it renders, and the browser subscribes over the app's broadcasting socket. When the event arrives, Inertia fetches that one prop again with a partial reload, so another user's change shows up without a refresh or a poll. - [Storage Guide](https://guren.dev/docs/guides/storage.md): Guren provides a unified file storage API with support for multiple storage backends. The storage system makes it easy to work with local filesystems, Amazon S3, and other cloud storage providers with a consistent interface. - [Attachments Guide](https://guren.dev/docs/guides/attachments.md): Attachments connect uploaded files to your models: a Post has a cover - [Task Scheduling Guide](https://guren.dev/docs/guides/scheduling.md): Guren provides a fluent API for defining scheduled tasks within your application. Instead of managing multiple cron entries, you can define your entire task schedule in code. - [Console Commands](https://guren.dev/docs/guides/console.md): Console commands let you run application code from a terminal (backfills, one-off maintenance, reports) with the same models, services, and container your HTTP handlers use. - [Rate Limiting Guide](https://guren.dev/docs/guides/rate-limiting.md): Guren provides a flexible rate limiting system to protect your application from abuse. It supports multiple storage backends, custom key generators, and both fixed and sliding window algorithms. - [Logging Guide](https://guren.dev/docs/guides/logging.md): Guren provides a flexible logging system with multiple channels, log levels following RFC 5424, and contextual logging support. - [Health Checks](https://guren.dev/docs/guides/health-checks.md): A health manager runs the checks you register (database, Redis, cache, storage, process memory, or one you write yourself) and reports healthy, degraded, or unhealthy. Serve that report on a /health endpoint for load balancers, orchestrators, and monitoring tools. - [Internationalization (i18n) Guide](https://guren.dev/docs/guides/i18n.md): Guren ships internationalization end to end: file-based translation catalogs, per-request locale detection, translation helpers in controllers and React pages, pluralization rules for 15+ languages, typed translation keys, and a consistency checker for your catalogs. - [API Resources](https://guren.dev/docs/guides/api-resources.md): API Resources provide a transformation layer between your models and API responses. They give you fine-grained control over how data is serialized to JSON. - [OpenAPI](https://guren.dev/docs/guides/openapi.md): Guren generates an OpenAPI 3.1 document from your routes. The schemas come from each route's contract, and a few annotations exist only for the document. The optional @guren/openapi package writes the document to a file, and can also serve it from your app with an interactive docs UI. - [Markdown Rendering](https://guren.dev/docs/guides/markdown.md): @guren/plugin-markdown renders markdown to HTML with hardened defaults: GitHub Flavored Markdown, sanitized output safe for dangerouslySetInnerHTML, GitHub-style alerts, heading anchors, and optional shiki code highlighting. It is the pipeline guren.dev itself uses for its docs and blog. - [Testing](https://guren.dev/docs/guides/testing.md): Test your app over HTTP with TestApp: send a request through the real middleware and routes, then assert on the response. This page also covers signing a user in, keeping tests off your development database, and swapping mail, events and queues for fakes. - [Deployment Guide](https://guren.dev/docs/guides/deployment.md): This guide summarizes the steps required to promote a freshly scaffolded Guren application to production. It assumes you generated your project with create-guren-app and that you have a PostgreSQL instance available. - [Serverless Deployment (AWS Lambda)](https://guren.dev/docs/guides/serverless.md): Guren runs on AWS Lambda's Node.js runtime. The official @guren/plugin-lambda plugin handles bundling, and a CDK construct provisions the full stack: HTTP, queues, scheduled tasks, CLI commands, and static assets. - [Deploy a Fullstack Bun App to Cloudflare Workers](https://guren.dev/docs/guides/cloudflare.md): You develop a Guren app on Bun and deploy the same code to Cloudflare Workers, with D1 as the database and R2 for files. - [Production Operations Runbook](https://guren.dev/docs/guides/operations.md): This runbook defines minimum reliability operations before GA. - [Spec-Anchored Development](https://guren.dev/docs/guides/spec-anchored.md): AI agents write code faster than anyone can keep documentation honest by - [Prototype First](https://guren.dev/docs/guides/prototype-first.md): Specifications written as documents get argued about; specifications a customer can click get corrected. Prototype mode lets you build the screens of a feature before any of its backend exists, host them on any static file host with no server behind them, walk a customer through them, and then start the backend from the same code, with the pages you showed becoming the pages you ship. - [Implementation Plans](https://guren.dev/docs/guides/implementation-plans.md): An implementation plan is a design document for a change, written as JSON before any code exists. Guren checks it against your application, renders it as a page a person can review, stamps it when it is approved, breaks it into steps, and then reads from the code which parts of it exist. The agent that implements the plan never reports its own progress: plan:status and plan:verify derive it from the schema, the route graph, the controllers, the pages and the test results. - [Writing an Implementation Plan](https://guren.dev/docs/guides/implementation-plan-format.md): This page describes the plan file itself: its sections, element ids and changes, acceptance behaviours, questions and commands. For the workflow that renders, approves and implements it, see Implementation Plans; the words this page uses (element, behaviour, step) are defined in its Terms table. - [Generating Code and Tests from a Plan](https://guren.dev/docs/guides/implementation-plan-scaffolding.md): plan:next sends scaffold and tests steps to plan:scaffold, which writes code and test skeletons from an approved plan. This page describes what it writes, what it leaves for you, and when it refuses. The workflow around it is in Implementation Plans, and element states such as planned and wired are defined in Reading progress. - [Implementation Plan Reference: Approval and Verification](https://guren.dev/docs/guides/implementation-plan-verification.md): This page collects the rules behind approval and verification, for when a verdict surprises you. The workflow they belong to is in Implementation Plans; the terms are defined in its Terms table. - [Agent Interface](https://guren.dev/docs/guides/agent-interface.md): AI agents call applications over MCP. Guren does not ask you to write a second - [Control and Audit Agent Tool Access](https://guren.dev/docs/guides/agent-tool-governance.md): Once routes are served as agent tools (see Agent Interface), - [MCP Apps](https://guren.dev/docs/guides/mcp-apps.md): An MCP App renders a tool's result as a page inside the agent's host. With Guren, the page is the Inertia page the route already renders: add ui to a route's .agent() declaration, build the views, and a host that supports MCP Apps, such as Claude on the web, shows posts/Show where it would otherwise print the post as text. Links and forms inside the view keep working: each Inertia visit becomes a call to the matching tool. - [AI Agents](https://guren.dev/docs/guides/ai-agents.md): An AI agent is a class in your application that calls a language model and reaches the application only through the agent tools its routes already declare. @guren/plugin-ai builds it on the Vercel AI SDK: the SDK talks to the provider, and the plugin decides which of your routes the model may call, as whom, and what gets recorded. - [Testing AI Agents](https://guren.dev/docs/guides/ai-agents-testing.md): An agent is tested at two levels. A test with fakeAi() scripts the model's answers while the agent's tools still run through your routes, so it proves the wiring and runs in bun test like any other test. An eval runs the agent against the real model over a set of cases and scores the result. Writing the agent itself is covered in AI Agents. - [Durable Agents](https://guren.dev/docs/guides/durable-agents.md): A durable agent is a long-lived, stateful process your own application hosts, and it reaches that application only through the agent tools the routes already declare. - [Agent Harness](https://guren.dev/docs/guides/agent-harness.md): Apps scaffolded with create-guren-app include an AI agent harness: files that teach coding agents how to work in a Guren app, and hooks that run Guren's checks while they work. This page covers what is installed for each agent, what the hooks do, and how agent:init and agent:sync maintain the files. - [Application Graph and Runtime Errors](https://guren.dev/docs/guides/application-diagnostics.md): bunx guren graph reports how your app is wired: its routes, controllers, models, Inertia pages, middleware, validators, policies and tests, and the evidence that links them. bunx guren runtime:errors lists the server errors the running development app hit recently. Coding agents read the same data over MCP, and the Dev Center shows both in a browser. - [Build an Auth App](https://guren.dev/docs/guides/build-auth-app.md): This guide walks you through building an application with user registration, login, and protected routes. You will go from an empty directory to a working auth flow in under ten minutes. - [Ship an API](https://guren.dev/docs/guides/ship-api.md): This guide walks you through building and shipping a JSON API with Guren. You will scaffold an API-only project, define a database schema, create controllers with validation, and test your endpoints. - [Deploy to Production](https://guren.dev/docs/guides/deploy-production.md): This guide covers the essential steps to take a Guren application from local development to a production environment. It focuses on Docker-based deployment with Bun. - [Troubleshoot a Broken Setup](https://guren.dev/docs/guides/troubleshoot.md): This guide covers the most common issues you will encounter when developing with Guren and how to fix them quickly. When something goes wrong, start here before diving into individual package documentation. - [CLI Reference](https://guren.dev/docs/guides/cli.md): Guren ships with two companion CLIs: - [Checks and Audits in Depth](https://guren.dev/docs/guides/cli-checks.md): The CLI Reference lists check, audit, gate, introspect and doctor. This page holds the rules behind them: what the audit's policy rule looks for, how to suppress an audit finding, what introspect runs, the extra rules for agent routes and in-process agents, architecture boundaries, and which facts the checks read from the registered (but never booted) app. - [Plugin Authoring Guide](https://guren.dev/docs/guides/plugins.md): This guide walks you through creating, testing, and publishing a Guren plugin. - [Support Matrix](https://guren.dev/docs/guides/support-matrix.md): | Runtime | Versions | Status | - [Upgrading Guren](https://guren.dev/docs/guides/upgrading.md): Use this guide when you move an app to a newer version. Follow the workflow below. The migration notes are listed by release (the version on the GitHub release), newest first; apply the ones for every release you cross, starting from the oldest. - [Release & Compatibility Policy](https://guren.dev/docs/guides/release-policy.md): This document defines the minimum release contract for production use. - [Glossary](https://guren.dev/docs/guides/glossary.md): Short definitions for common terms in the Guren docs. ## Tutorials - [The Guren Tutorial](https://guren.dev/docs/tutorials/00-overview.md): This course takes you from an empty directory to a deployed blog with users, comments, tags, file uploads, email, an agent interface, and a documented architecture. It is long, and it is meant to be worked through in order, the way the Rails Tutorial was. If you finish it, you will be able to build and ship a web application, and you will be able to do it with a coding agent doing much of the typing while you stay in charge of what gets shipped. - [Chapter 1: Zero to a Shipped App](https://guren.dev/docs/tutorials/01-zero-to-deployed.md): In this chapter you scaffold a Guren app, read what the scaffold gave you, make one change by hand with a test in front of it, hand one change to a coding agent and watch the harness check its work, and finish with a container image you can run anywhere. Every later chapter ends the same way: gate green, committed, shippable. - [Chapter 2: One Request, by Hand](https://guren.dev/docs/tutorials/02-one-request-by-hand.md): Chapter 1 gave you an app with one page you did not write. This chapter has you write the next one from blank files, in the order the rest of the course uses: a failing test, a route, a controller, a page. Then you specify a second page with a test and hand it to the agent, and you watch the harness load the right rule for the file it is editing. - [Chapter 3: The Posts Table](https://guren.dev/docs/tutorials/03-the-posts-table.md): A blog needs posts, and posts need somewhere to live. In this chapter you define the first table, generate and run its migration, write the model that reads it, and build the two pages that show posts. Then you specify the create form with a test and hand it to the agent, and you see the scaffold skill steer it toward the generators instead of typing. - [Chapter 4: Validation and Resources](https://guren.dev/docs/tutorials/04-validation-and-resources.md): Chapter 3 put a schema inside the controller and sent raw field maps to the pages. This chapter gives both a proper home: a validator file that the route, the controller and the form all share, with messages a person would write; and a resource class that decides what a post looks like to the browser. Then you specify editing, deleting and pagination with tests, hand them to the agent, and use the code-review subagent as a second reader before you accept. - [Chapter 5: Users and Passwords](https://guren.dev/docs/tutorials/05-users-and-passwords.md): Everything so far has been anonymous. This chapter gives the blog users: a table with a password hash, a model that knows how to hash, sessions and the CSRF protection that comes with them, and registration, login and logout built by hand. Then you specify a profile page with a test and hand it to the agent, and you see what guren context User gives an agent before it touches a model. - [Chapter 6: Protecting Routes](https://guren.dev/docs/tutorials/06-protecting-routes.md): The blog has users now, but nothing checks for one: a guest can still write, edit and delete posts, and guren audit has been saying so since chapter 3. This chapter puts the post mutations behind a login wall, gives every post an author with a migration that keeps the rows you already have, and then hands the agent a migration of its own and watches the db-manage skill keep it safe. It ends by showing you what bunx guren add auth would have written, now that you can read it. - [Chapter 7: Authorization, and What the Gate Cannot See](https://guren.dev/docs/tutorials/07-authorization.md): Chapter 6 built a wall: you have to be signed in to change a post. It did not build a door: any signed-in user can edit or delete anyone's post. The difference is authentication (who are you?) against authorization (are you allowed?), and this chapter builds the second by hand with a policy. Then it does something no other chapter does on purpose: it hands the agent a feature without mentioning authorization, and shows you which of your safeguards notices when it is missing. - [Chapter 8: Teach the Agent Your Project](https://guren.dev/docs/tutorials/08-teach-the-agent.md): In chapter 7 you sent a prompt that said nothing about authorization and found out what caught the omission: your test, and nothing else. This chapter makes sure it is never that close again. You write the rule the agent reads every time it opens a controller, the procedure it follows when it builds an owned resource, and the brief for a reviewer that checks exactly this. Then you test the harness the way you test code: hand the agent a resource without mentioning any of it, and see whether it does the right thing unprompted. - [Chapter 9: Relationships](https://guren.dev/docs/tutorials/09-relationships.md): Chapter 6 left you with authorsOf, a helper that collects author ids and runs one IN query. It works, and it is what a relationship does under the hood. This chapter replaces it with the real thing: belongsTo and hasMany declared once on the models, loaded with with(). Then it adds comments, the first table that points at two others, and hands the agent the one shape you have not built yet: a many-to-many, tags, through a pivot table. - [Chapter 10: Files](https://guren.dev/docs/tutorials/10-files.md): A blog wants pictures. This chapter installs Guren's attachments layer, gives every post a cover image that is stored outside the public directory and served through a signed URL, and then hands the agent a gallery. Along the way guren check gets a new set of things to be right about, and you see it catch the one mistake that turns "private" into "public". - [Chapter 11: Events and Mail](https://guren.dev/docs/tutorials/11-events-and-mail.md): Everything so far finished inside the request: validate, write a row, redirect. This chapter is about the work that should not. When Bob comments on Ada's post, Ada gets an email, and Bob's browser must not wait for a mail server to answer before it sees the page. - [Chapter 12: Your App as an Agent's Tool](https://guren.dev/docs/tutorials/12-agent-tools.md): Eleven chapters of building a blog for people. This chapter opens the same app to a different kind of caller: an agent that reads your posts and publishes a draft, through the routes you already wrote. - [Chapter 13: Documentation That Cannot Go Stale](https://guren.dev/docs/tutorials/13-documented.md): Every project you have ever joined had a README that was wrong. Not maliciously: someone wrote it when it was true, the code moved, and nothing failed. That is the whole problem, and it has exactly two halves. - [Chapter 14: Production](https://guren.dev/docs/tutorials/14-production.md): Thirteen chapters, and the blog has never left your machine. This one takes it the rest of the way: a session store that survives a restart, a limit on how fast a stranger can guess a password, the production switches you get for free, and an honest list of what is still not ready. - [Chapter 15: Prototype First](https://guren.dev/docs/tutorials/15-prototype-first.md): Fourteen chapters built the blog backend first: a table, a model, a controller, and only then the page. That order is right when you know what to build. Most features start before anyone knows, and a specification written as a document gets argued about while one a customer can click gets corrected. This chapter builds the next feature the other way round: the screens first, on seed data, hosted as static files with no server behind them, then the backend from the same code once the customer has said yes. ## Agent Course - [Building with an Agent](https://guren.dev/docs/agent-course/00-overview.md): In this course a coding agent (Claude Code) writes the code, and you decide what gets built. You make a meetup app in which users organize meetups and others register until a meetup is full. It takes two plans. You review each plan before any code exists, approve it, and then watch the agent build it one step at a time. - [Chapter 1: An App the Agent Can Work In](https://guren.dev/docs/agent-course/01-setup.md): This chapter scaffolds the app, adds sign-in, and shows you the two parts of the harness that the rest of the course leans on. You write no application code. - [Chapter 2: The First Plan](https://guren.dev/docs/agent-course/02-the-first-plan.md): A plan is the design of a change, written as JSON before any code exists. In this chapter the agent writes the first one, for organizing meetups, and you read it on the review page Guren renders from it. - [Chapter 3: Review and Approve](https://guren.dev/docs/agent-course/03-review-and-approve.md): Chapter 2 ended with a list: one open question, five missing behaviours. In this chapter you hand that review to the agent, check what it changed, and approve the plan. Approval is the one step in the loop that only you take. - [Chapter 4: One Step at a Time](https://guren.dev/docs/agent-course/04-one-step-at-a-time.md): The plan is approved. In this chapter the agent builds it. Guren splits the plan into steps; the agent takes one, implements it, has it verified, and commits. Your part is to read each commit before the next one lands. - [Chapter 5: Close the Plan](https://guren.dev/docs/agent-course/05-close-the-plan.md): Once a plan is built, plan.json goes quiet: nobody edits an approved plan to describe code that exists. What the plan knew (why the feature exists, which rules it must keep, what it deliberately left out) still matters, though. Closing a plan writes that knowledge into documents the next agent reads. - [Chapter 6: A Plan That Changes What Exists](https://guren.dev/docs/agent-course/06-changing-what-exists.md): The first plan only added things. Registrations cannot: a meetup has to learn about its registrations, its page has to show the seats left, and code you already accepted has to change. This chapter plans that change and approves it. The review gets harder, because now the question is not only "is this right?" but also "what else does it touch?" - [Chapter 7: When the Application Moves](https://guren.dev/docs/agent-course/07-when-the-application-moves.md): A plan is approved against the app as it was at one commit. Real work does not stop at that commit: a teammate merges a refactor, and a name the plan relies on disappears. This chapter builds the registrations plan, lets that happen halfway through, and shows how Guren stops the agent instead of letting it build on a design that no longer fits. - [Chapter 8: Plans in CI](https://guren.dev/docs/agent-course/08-plans-in-ci.md): Everything so far ran on your machine. This chapter adds the one check that matters once plans live in a team's repository, and settles how a plan moves through a pull request. ## Blog - [Inertia live props on Bun: one page updates when another one saves](https://guren.dev/blog/inertia-live-props-on-bun-one-page-updates-when-another-one-saves): A kitchen board and an order page kept in step by Inertia live props on a TypeScript backend. One line in the controller, no polling, built with Guren on Bun. - [Guren and Void, same tickets: where a bundled check changes the outcome](https://guren.dev/blog/guren-and-void-same-tickets-where-a-bundled-check-changes-the-outcome): We gave Claude Code the same five feature tickets on Guren and on Void. Pass rates matched and Guren cost about 1.4× as much, but when we removed one authorization check from both apps, Guren's audit, delivered by its Stop hook, decided the outcome: 18/18 against 6/18 on Haiku 5.5. - [Agents on Guren, round 2: teaching agents a framework they have never seen](https://guren.dev/blog/agents-on-guren-round-2-teaching-agents-a-framework-they-have-never-seen): Guren is new to every model, so its conventions are taught through the guidance we ship. With it, agents take as many turns as on a hand-wired Hono stack at 1.26× the cost, and the top models pass every feature ticket, almost always through Guren's own features. - [Agents on Guren: the first benchmark report](https://guren.dev/blog/agents-on-guren-the-first-benchmark-report): 20 atomic tasks with hidden tests, three Claude models, with and without the harness guren agent:init installs: 360 runs. Same pass rate, 26–28% fewer turns, 12–25% lower cost. - [Training data is a moat. Documentation is how you rent it back.](https://guren.dev/blog/training-data-is-a-moat-documentation-is-how-you-rent-it-back): We measured what the same feature costs an AI agent across six frameworks. For a framework the model has never seen, most of that cost turned out to be archaeology, not friction. - [Starting a blog](https://guren.dev/blog/starting-a-blog): Why the Guren blog is built with Guren, what the framework actually does, and what I plan to write here. ## Optional - [Full documentation as one file](https://guren.dev/llms-full.txt) - [GitHub repository](https://github.com/gurenjs/guren) - [Japanese documentation](https://guren.dev/docs/ja) - [Blog RSS feed](https://guren.dev/blog/rss.xml)