The lightweight HTTP framework for TypeScript

Build structured, type-safe APIs with decorators, dependency injection, and middleware. Deploy to any runtime — Bun, Deno, Node.js, serverless, or edge.
Up to 17% faster than Hono | Up to 38% faster than NestJS+Fastify * Realistic API benchmarks on Bun. Results vary by runtime.

Decorator-driven architecture, modern standards

Familiar patterns — controllers, modules, dependency injection — inspired by Angular and NestJS. Rebuilt from scratch on native decorators and the Web Standards API.
  • @Controller, @Get, @Injectable, @Inject, @Module — native TypeScript decorators. No extra dependencies, no setup required.
  • Request in, Response out. Your handlers receive standard web objects — no proprietary context, no framework lock-in.
  • A single middleware concept replaces interceptors, pipes, and filters. Easier to learn, easier to compose.
@Controller('/users')
export class UserController {
  @Inject(UserService) userService!: UserService

  @Get('/')
  async list() {
    return this.userService.findAll()
  }

  @Post('/')
  @Status(201)
  @ValidateBody(CreateUserSchema)
  async create(ctx: RequestContext) {
    return this.userService.create(ctx.body)
  }
}

One fetch handler, every platform

Inspired by Hono's multi-runtime philosophy. Write your API once and deploy it to any JavaScript runtime, serverless platform, or edge network.
  • Bun, Deno, Node.js, uWebSockets.js, Cloudflare Workers, AWS Lambda, Bunny Edge — same code, different entry point.
  • Pure ESM, latest ECMAScript target. Clean imports, fast startup, works with modern tooling out of the box.
  • Each app has its own container. Use @Inject() decorator or inject() function — predictable, testable, no hidden globals.
const app = new Miia().register(AppModule)

// Bun / Deno — auto-detected
await app.listen(3000)

// Node.js / uWebSockets.js
await app.listen(3000, serve)

// Cloudflare Workers
await app.init()
export default app

Batteries included, bloat excluded

Every tool you need to ship production APIs. Nothing you need to rip out later.
Native Decorators
The official TypeScript decorator standard. Works out of the box — no polyfills, no plugins, no legacy quirks.
Schema Validation
Validate request body, query, and params with any ZodLike schema. Type-safe from request to handler, errors handled automatically.
Auth & Guards
JWT and local strategies with composable guards. Protect entire controllers or skip per-route with @Public().
Swagger / OpenAPI
OpenAPI 3.1 spec auto-generated from your decorators. Swagger UI included and ready to serve.
Database Ready
Official integrations for PostgreSQL, MySQL, and SQLite via Drizzle ORM, and MongoDB via Papr.
Lightweight & Fast
Minimal abstractions, trie-based router, zero unnecessary overhead. Built for performance from day one.

Ready to build with MiiaJS?

Open source. MIT licensed. Contributions welcome.