CrumbJS is a lightweight API framework for Bun focused on backend development. It layers configuration, validation and documentation on top of Bun's built-in router while keeping a familiar Express-like developer experience. Validation is powered by Zod and every route can be automatically documented through OpenAPI.
The core system has only about 3,700 lines of code and just two dependencies (zod and openapi3-ts).
- Built for Bun.serve and only targets backend APIs
- Zod-based validation for bodies, queries and headers
- Automatic OpenAPI 3.1 document generation and UI (Swagger or Scalar)
- Auto-generate type-safe clients (eg. for frontend), with zero allocations.
- Simple middleware system and optional global middlewares
- Simple proxy helpers to forward requests and (optionally) document them — use app.proxy() for a single route, or app.proxyAll() to forward all routes under a given path.
- cors
- signals (log incomming request)
- secureHeaders
- @crumbjs/bullmq -> Bullmq worker aside CrumbJS server. For simple redis queue system
- @crumbjs/mongo -> Mongo connection handler, AUTO-CRUD! and simple repository provider based on zod
The best contribution is to use CrumbJS in the wild. If you want to go further:
- ⭐ Star the repo: https://github.com/tuplescompany/crumbjs
- 🐞 Report a bug
- 💡 Request a feature
- 🧰 PRs welcome (small, focused changes)
- ☕ Buy me a coffee
Thanks for helping us keep the framework lean, type-safe, and fast to ship.
