v2.0 is now available

Build faster with Bklar

The minimalist, high-performance web framework for Bun. Type-safe validation, native WebSockets, and a robust ecosystem included.

bun create bklar my-app

Native Performance

Built directly on Bun.serve. Zero Node.js compatibility overhead means raw speed.

End-to-End Type Safety

Integrated Zod validation ensures your API inputs and outputs are strictly typed.

Batteries Included

Official packages for CORS, JWT, Logger, Uploads, and Swagger Documentation.

index.ts
import { Bklar } from "bklar";
import { z } from "zod";

const app = Bklar();

// Native Validation & Type Inference
app.get("/users/:id", (ctx) => {
   return ctx.json({
     id: ctx.params.id,
     role: "guest"
   });
}, {
   schemas: {
     params: z.object({ id: z.coerce.number() })
   }
});

app.listen(3000);