TypeScript · Bun · No magic
A framework,
not a new
language.
Corpus is a lightweight TypeScript framework for Bun. No decorators, no DI container, no abstractions hiding what's really happening. Just routes, handlers, and code that reads like code.
~451kb
Install size
Zero
Dependencies
Bun-first
Runtime
Capabilities
Everything you need.
Nothing you don't.
Corpus gives you the primitives. You write the logic. Follow whatever pattern you're comfortable with.
Register routes directly or group them in Controllers. Prefix-based grouping without magic discovery or decorator soup.
Works natively with arktype, zod, or yup via the Standard Schema spec. Define your shape once, validate at every layer.
Chain handlers for auth, logging, rate limiting, and more. You can easily pick and choose where your middlewares are applied.
Extras include utilities for CORS, rate limiting, file reading and others.
Not sure how to deploy your vite app on your own? Look no further. Serve SPAs, static assets, and raw files alongside your API.
Extend classes and interfaces to customize behavior. Make your own framework.
Philosophy
Frameworks should be just that, frameworks. Learning a framework shouldn't take longer than coding an app. If you know the request/response lifecycle, you already know Corpus.
Honest disclaimer
Built to ship fast,
not to scale to millions.
Corpus is opinionated enough to keep your code organized, but minimal enough that you can read every line of it. It's for personal projects, side experiments, and internal tools. If you need horizontal scaling, distributed tracing, and a plugin ecosystem, look elsewhere. If you want to ship something today without reading a 200-page guide, you're home.