@buntok/core

Decorator-First, Zero-Config API Framework for Bun

Zero-config, no per-request routing overhead. Built for developers who want decorator-first architecture without the complexity.

Get Started
0k+req/s on Bun
AOTCompiled Router
100%TypeScript
MITOpen Source

Why Buntok?

Clean. Fast. Typed.

Write your API the way it should be written - with classes, decorators, and automatic type inference. Buntok compiles the router and hot paths ahead of time at boot, so routing adds no per-request overhead.

  • Decorator-based Controllers with @Get, @Post, @Put, @Delete, etc.
  • ZodCtx for 100% type-safe validation with auto-inferred types
  • AOT router compilation - static routes O(1), dynamic via trie
  • Built-in zValidator, CORS, Rate Limiter, SSE, WebSockets
user.controller.ts
import { Controller, Get, Post, Use, type ZodCtx } from '@buntok/core';
import { zValidator, z } from '@buntok/core/middlewares/validator';

const UserSchema = z.object({
  name: z.string().min(2),
  email: z.string().email()
});

@Controller('/users')
export class UserController {

  @Get('/')
  async list() {
    return [{ id: 1, name: 'Alice' }];
  }

  @Post('/')
  @Use(zValidator('body', UserSchema))
  async create(ctx: ZodCtx<{ body: typeof UserSchema }>) {
    const data = ctx.valid('body'); // Fully typed!
    return ctx.json({ success: true, data });
  }
}

Raw Performance

Beats Hono.
Trades blows with Elysia.

Buntok wasn't just built for developer experience - it was built for raw throughput. By compiling the router and request pipeline Ahead-of-Time (AOT) at boot, Buntok skips the heavy runtime routing overhead of Node frameworks like Express and NestJS.

0

Requests per second

< 0.0ms

P50 Latency

Full

TypeScript

In our benchmarks, Buntok consistently outperforms Hono and trades blows with Elysia, while providing a clean decorator-first API.