Introduction
One typed backend graph for Bun applications
Bunderstack is a batteries-included backend library for TypeScript on Bun. Give it a Drizzle schema and it builds one oRPC procedure graph containing generated CRUD, files, realtime, health checks, and your application procedures.
That graph is available in three useful forms:
- a fully inferred TypeScript client;
- ordinary HTTP routes for browsers, mobile apps, and webhooks;
- an optional OpenAPI document for external tooling.
RPC types are the primary contract. HTTP and OpenAPI are projections of the same procedures, not parallel implementations.
One mental model
Drizzle schema + access rules
│
▼
one oRPC procedure graph
├── typed client
├── ordinary HTTP
└── realtime iteratorapp.handler is the single Web Standard Request → Response entry point.
Better Auth owns /api/auth/*; oRPC owns generated and application routes.
There is no general-purpose router to configure alongside them.
Batteries, without a platform
Bunderstack includes database provisioning, Better Auth, access-controlled CRUD, file storage and transforms, email, validated environment variables, background jobs, rate limiting, idempotency, and realtime publication.
It remains a library inside your application. app.db is Drizzle,
app.auth is Better Auth, and app.storage, app.email, app.jobs, and
app.realtime are available in every procedure context. Your schema and data
stay in your repository and infrastructure.
Validation without lock-in
Every application validation slot accepts Standard Schema. The examples use Valibot because it is compact and tree-shakeable, but Zod, ArkType, and other Standard Schema implementations work too.
Start with Getting Started, then follow the primary path through Auto CRUD, API Procedures, Query Client, and Sync & Realtime.