Structured TypeScript APIs.
Any runtime.

Controllers, modules, dependency injection and guards on native TC39 decorators and the Web Request/Response API.

Read the docs
bun create miia my-app
users.controller.ts
@Controller('/users')
export class UserController {
  private userService = inject(UserService)

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

  @Post('/', { body: CreateUserSchema })
  @Status(201)
  async create(ctx: RequestContext) {
    const input = await ctx.json<CreateUserInput>()
    return this.userService.create(input)
  }
}

architecture

Familiar patterns, modern foundation.

The architecture you know from Angular and NestJS - controllers, modules, DI and Koa-style middleware - rebuilt from scratch on native decorators and Web Standards.

Coming from NestJS

Decorators that just work

@Controller, @Get, @Injectable, @Module - the TC39 decorator standard. No reflect-metadata, no experimental flags, no setup.

Web Standards first

Request in, Response out. ctx.req is the standard Request, a handler can return a standard Response, and no Express or Fastify sits underneath.

Koa-style middleware

One middleware concept replaces interceptors, pipes and filters. Easier to learn, easier to compose.

runtimes

Runs wherever Request and Response do.

MiiaJS is built on Web Standards. Your app is a fetch handler, so the entry point is the only line that changes from one runtime to another.

tested on Bun · Deno · Node.js · Cloudflare Workers

main.ts
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 and other fetch platforms
await app.init()
export default { fetch: app.fetch }

packages

What an API needs, as separate packages.

The core stays small. Install only what you use.

All packages

Dependency injection

A container per app with inject(). Singleton, transient and request scopes; module boundaries checked at startup.

@miiajs/core

Validation

Body, query and params schemas on the route decorator. Any Zod-like schema; failures become a 422.

@miiajs/core

Auth

AuthProvider, AuthGuard and token extractors, plus a JWT sign and verify service.

@miiajs/auth · @miiajs/jwt

Databases

Drizzle for PostgreSQL, MySQL and SQLite; Mongoose and Papr for MongoDB.

@miiajs/drizzle · mongoose · papr

OpenAPI

An OpenAPI 3.1 spec generated from your routes and schemas, with Swagger UI.

@miiajs/swagger

Messaging

A decorator-driven event bus with typed event contracts, retry and DLQ, and a Redis Streams transport.

@miiajs/messaging · messaging-redis

Rate limiting

Fixed-window limits as a guard, per-route decorators or perimeter middleware, with pluggable stores.

@miiajs/rate-limit

CLI and testing

Scaffolding, generators, dev server and builds; a TestApp harness for integration tests.

@miiajs/cli · @miiajs/testing

performance

Measured with the full stack on.

The heaviest test in the suite: CORS, JWT, JSON body, path and query params, custom headers, UUID and a 201 status. Bun 1.4.0 on an Apple M1 Pro, August 21, 2026.

All results, Node.js and Deno included
POST /api/workspaces/:ws/projects/:proj/tasks
MiiaJS38,117 req/s · 2.22ms
Elysia37,537 req/s · 2.01ms
Hono36,674 req/s · 2.34ms
Fastify31,537 req/s · 2.72ms
NestJS + Fastify28,489 req/s · 2.98ms

get started

Start a project.

The CLI scaffolds an app with a module, a controller and a test, on the runtime you pick. Then add a database, auth or a CRUD resource with one command.

terminal
# Bun
bun create miia my-app
# Node.js
npm create miia my-app
# Deno
deno run -A npm:create-miia my-app