# baguette > Blazingly fast, zero-config Bun + Hono API framework for TypeScript. One zod `defineRoute` gives runtime validation, inferred types, OpenAPI/Scalar docs, and an error funnel. File-based routing on Bun + Hono. Install: `bun add @prehoy/baguette`. ## Docs - [Getting started](https://usebaguette.com/docs/): baguette is a blazingly fast, zero-config API framework for Bun and Hono. You drop a file into a directory and get back a fully typed, valid - [defineRoute](https://usebaguette.com/docs/define-route/): defineRoute declares exactly one endpoint. It is the heart of baguette: a single object whose zod schemas become runtime validation, inferre - [serve](https://usebaguette.com/docs/serve/): serve() is the entire wiring step. Point it at your routes directory; it imports every route in parallel, mounts each at the path its file l - [Security](https://usebaguette.com/docs/security/): baguette ships the controls every API needs as declarative options — no middleware wiring, no forgotten requireAuth. Turn each on with a fla - [WebSockets](https://usebaguette.com/docs/websockets/): baguette speaks WebSockets natively — but they're opt-in: a plain HTTP app exposes no upgrade surface until you set ws. For the common case - [Cron](https://usebaguette.com/docs/cron/): Cron is an optional layer for scheduled jobs. Drop a file in cron/, and serve() starts it automatically — no cron/ directory means the code - [Automations](https://usebaguette.com/docs/automations/): Automations are an optional, event-driven layer built on Postgres LISTEN/NOTIFY. Instead of running on a clock like cron, an automation reac - [Queues](https://usebaguette.com/docs/queues/): Opt-in background job queues on bee-queue + Redis, folder-based like everything else: one file per queue in queues/, and serve() starts the - [Email](https://usebaguette.com/docs/email/): Opt-in email built on React templates: write emails as components, preview them in the browser, and send them. It lives in a separate entry - [CLI](https://usebaguette.com/docs/cli/): The baguette CLI does two jobs: it scaffolds new files in the right place with the right shape (baguette new), and it enforces the clean-cod - [Clean-code contract](https://usebaguette.com/docs/clean-code-contract/): Rules for any human or AI writing code in a baguette app. They are enforced by the baguette/eslint preset and baguette check — code that bre - [baguette vs Hono](https://usebaguette.com/docs/compare/hono/): Short version: baguette is built on Hono. It's not a competitor — it's an opinionated, batteries-included layer on top of Hono's router and - [baguette vs Elysia](https://usebaguette.com/docs/compare/elysia/): Both are Bun-native and obsessed with developer experience — but they make different bets. Elysia bets on raw speed + an end-to-end typed cl ## Full text - [llms-full.txt](https://usebaguette.com/llms-full.txt): every doc page concatenated as plain markdown ## Source - [GitHub](https://github.com/prehoy/baguette) - [npm](https://www.npmjs.com/package/@prehoy/baguette)