Corpus
A lightweight TypeScript backend framework for personal projects and simple CRUD applications.
Built for Simplicity
Routes & Controllers
Register routes directly or group them in Controllers. No magic registration or dependency injection.
Schema Validation
Works with any Standard Schema library (arktype, zod). Define once, validate everywhere.
Middleware
Simple middleware system for authentication, logging, and request modification.
Repository Pattern
Base class for data access. Models, Services, Controllers—organized without DI magic.
Static Routes
Serve static files alongside your API. Keep everything in one place.
Extensible
Extend interfaces to customize behavior. Add what you need, nothing more.
Quick Start
Install and run a server in seconds:
bun add @ozanarslan/corpus
The Recommended Pattern
Structure your app with Models → Repository → Service → Controller. Clean, testable, and organized without forced dependency injection.
Not for Production
Corpus is built for personal projects and learning. It's opinionated enough to keep code organized, but minimal enough to understand completely. If you need a production-grade framework, look elsewhere. If you want to ship quickly without complexity, this is it.