Built for Bun Runtime

Kirin Framework

High-performance TypeScript web framework
1.8x faster than Express, powered by Bun

39.2kreq/sec
2.07mslatency
1.8xvs Express
$bunx kirin init my-app
📄 src/index.ts
12345678910111213141516
import { Kirin } from "kirin";

const app = new Kirin({
  docs: { enabled: true }
});

// Define a route
app.get("/", (ctx) => {
  return ctx.json({
    message: "Hello, Kirin! 🔥"
  });
});

// Start the server
app.listen(3000);
⚡ Performance

Blazing Fast Benchmarks

Outperforming traditional Node.js frameworks with Bun's native speed

JSON Response

Simple JSON endpoint

Hono 47.0k/s
Elysia 46.3k/s
Kirin 39.2k/s
Fastify 38.2k/s
NestJS 28.4k/s
Express 22.0k/s

Static Files

Serving static content

Elysia 20.4k/s
Kirin 17.7k/s
Hono 15.7k/s
Fastify 12.2k/s
Express 11.3k/s
NestJS 8.9k/s

Mixed Workload

Real-world simulation

Fastify 5.0k/s
Hono 4.8k/s
Express 4.7k/s
Elysia 4.7k/s
Kirin 4.6k/s
NestJS 3.9k/s

Large Payload

50KB JSON response

Elysia 13.3k/s
Hono 12.8k/s
Kirin 11.9k/s
NestJS 5.3k/s
Express 3.9k/s
Fastify 3.9k/s

📊 Benchmarked on Intel I3-12100F, 32GB RAM using autocannon. Higher is better.

🔋 Features

Everything You Need

Production-ready features out of the box

Blazing Fast Performance

Built on Bun runtime with RadixTree-based routing achieving microsecond response times. Optimized for maximum throughput and minimal latency.

🛣️

Intelligent Routing

Advanced router with parameter matching, wildcards, route groups, and prefix matching. Supports RESTful patterns and flexible URL structures.

🔌

Flexible Middleware

Onion-model middleware system with async/await support. Easily compose, chain, and reuse middleware for request processing pipelines.

💾

Database Adapters

Database-agnostic architecture with native support for SQLite, PostgreSQL, Prisma ORM, Drizzle ORM, and Knex.js query builder.

🔐

Authentication Suite

Complete authentication system including JWT tokens, sessions, OAuth 2.0 (Google, GitHub, Discord), RBAC, and API key management.

🔒

Security Hardened

Production-ready security with CORS, rate limiting, secure headers (CSP, HSTS), input validation, and protection against common attacks.

📡

WebSocket Support

Native WebSocket server with room management, broadcasting, client authentication, and custom message protocols for real-time apps.

📊

API Documentation

Automatic OpenAPI 3.0 and Swagger UI generation from your routes. Interactive API testing with schema validation included.

📁

File Management

Complete file handling with multipart parsing, validation, and cloud storage integration (S3, R2, GCS, Azure) plus image processing.

🗄️

Smart Caching

Multi-tier caching strategies with memory, Redis, and hybrid approaches. Includes cache invalidation and stale-while-revalidate patterns.

📝

Production Logging

Structured logging system with multiple transports (console, file, HTTP), log levels, custom formatters, and request tracking.

🎯

Type-Safe RPC

End-to-end type safety with automatically generated RPC clients. Full TypeScript support for compile-time type checking.

Ready to build something amazing?

Get started with Kirin in under 2 minutes