Getting Started / Introduction

Introduction

MiiaJS is a lightweight, decorator-driven HTTP framework for TypeScript.

MiiaJS is a lightweight HTTP framework for TypeScript, inspired by Angular/NestJS architectural ideas, Koa's onion-model middleware, and Hono's multi-runtime philosophy. Built from scratch on modern standards.

Why MiiaJS?

  • TC39 Native Decorators - no reflect-metadata, no experimental TypeScript flags
  • Web Standards - built on the Request/Response API: ctx.req is the standard Request, and a handler can return a Response
  • Multi-Runtime - runs on Bun, Deno, Node.js, and fetch-based platforms such as Cloudflare Workers
  • Koa-style Middleware - clean onion model replaces interceptors, pipes, and filters
  • Module boundaries over one container - per-app container with inject(), imports / exports / global checked at startup
  • ESM-only - ES2025 target, nodenext module resolution

Packages

PackageDescription
@miiajs/coreDI, decorators, router, middleware, exceptions
@miiajs/configConfigModule, ConfigService, validated env
@miiajs/serve-staticStatic file serving with Range, ETag, charset, SPA fallback
@miiajs/climiia new / add / g, dev server, build, start, type checking
create-miiabun create miia / npm create miia - runs miia new
@miiajs/testingTestApp harness for unit and integration tests
@miiajs/node-serverNode.js HTTP server adapter
@miiajs/uws-serveruWebSockets.js HTTP server adapter
@miiajs/authAuth primitives - AuthProvider, AuthGuard, token extractors
@miiajs/jwtInjectable JWT sign/verify service (jose wrapper)
@miiajs/rate-limitFixed-window rate limiting - guard, decorators, perimeter middleware
@miiajs/multipartStreaming multipart/form-data uploads with per-file limits
@miiajs/drizzleDrizzle ORM integration (Postgres/MySQL/SQLite)
@miiajs/paprMongoDB integration via Papr
@miiajs/mongooseMongoDB integration via Mongoose
@miiajs/swaggerOpenAPI 3.1 spec generation, Swagger UI
@miiajs/messagingDecorator-driven event bus with retry, DLQ, pluggable transports
@miiajs/messaging-redisRedis Streams transport for @miiajs/messaging

What's next

See the roadmap for what's coming - hardening current packages, WebSocket support, OpenTelemetry, more transports, and beyond.

Edit this page on GitHub