aladov3.13.0

Node.js HTTP framework · v3.13.0

Easy in. Minimal setup.Maximum output.

Alado is a fast, lightweight Node.js HTTP framework with built-in routing, validation, authentication, access control, file uploads and automatic OpenAPI 3.0 documentation.

npm install alado
Runtime
Node.js >=22.0.0
Language
TypeScript-first
License
MIT
request lifecycle1/6
PATCH/user/7ef5ed25-53b1-432f-96ec-8e35d830eb9cx-api-key: 9f2c…a71e
  1. routermatch method + path
  2. parserquery, JSON, XML, multipart
  3. @withAuthRequestAuthentication
  4. @accessControlcompare request values
  5. @validatePropertyDTO + files rules
  6. handleryour method runs
···waiting for response

Quick start

A validated, documented endpoint in three files

Controllers are plain classes. Stack @post, @defineRequest and @defineResponse on a method, register the class, start the server. The DTO validates the request and describes it in Swagger UI: one class for both.

See a full CRUD controller →
src/modules/user/user.controller.ts
import { post, defineRequest, defineResponse, Request } from 'alado';
import { CredentialsDto } from './dto/credentials.dto';

export class UserController {
  @post('/user', { tags: ['User'] })
  @defineResponse({
    statusCode: 201,
    title: 'Created',
    headers: { 'Content-Type': 'application/json' },
    body: { id: '123', email: 'user@example.com' },
  })
  @defineRequest({ body: CredentialsDto })
  async create(req: Request) {
    // validated already; the password is not sent back
    const { email } = req.body as CredentialsDto;
    return {
      statusCode: 201,
      headers: { 'Content-Type': 'application/json' },
      body: { id: '123', email },
    };
  }
}

Where it sits

Express simplicity, Fastify focus, NestJS structure

Alado has the simplicity of Express, the performance focus of Fastify and the decorator-based structure of NestJS, with a much smaller surface area.

Feature Alado Express Fastify NestJS
Single runtime dependency ✅ ❌ ❌ ❌
Decorator-based routing ✅ ❌ ❌ ✅
Built-in request validation ✅ ❌ ✅ (schemas) ✅ (pipes)
Built-in auth pipeline ✅ ❌ ✅ (plugin) ✅ (guards)
Built-in access control ✅ ❌ ❌ ✅ (guards)
Auto OpenAPI 3.0 docs ✅ ❌ ✅ (plugin) ✅ (plugin)
Built-in file upload ✅ ❌ ❌ ❌
Built-in body parsing ✅ ✅ ✅ ✅
Built-in CORS ✅ ❌ (cors) ✅ ✅
TypeScript-first ✅ ⚠️ types via @types ✅ ✅
Learning curve 🟢 Low 🟢 Low 🟡 Medium 🔴 High
Boilerplate 🟢 Minimal 🟡 Medium 🟡 Medium 🔴 Heavy
Ecosystem / plugins 🟡 Small 🟢 Massive 🟢 Large 🟢 Large

Load tested

Against the Node.js frameworks you know

Requests per second (p99 latency in ms) on the same three routes, every framework on Node's own HTTP server. Alado is the only one validating the request.

Framework GET /json GET /users/:id?name POST /echo (JSON)
0http 71,779 (3) 70,486 (3) 57,050 (4)
node:http (baseline, no framework) 68,528 (3) 62,723 (4) 45,055 (4)
Fastify 54,829 (4) 59,227 (3) 36,527 (5)
Polka 58,966 (4) 45,270 (5) 41,556 (5)
Hono 56,070 (4) 48,797 (4) 32,405 (5)
h3 54,183 (4) 45,577 (4) 33,235 (5)
Alado 3.10.2 51,961 (4) 41,313 (4) 31,061 (6)
Elysia (Node adapter) 51,158 (4) 43,617 (5) 21,029 (8)
NestJS + Fastify adapter 41,606 (5) 41,259 (5) 29,057 (6)
Koa 35,768 (5) 33,827 (6) 22,293 (7)
Restify 29,592 (6) 25,595 (7) 22,608 (7)
Hapi 29,696 (6) 27,815 (6) 18,690 (9)
Feathers (Koa transport) 27,541 (7) 25,255 (7) 19,540 (9)
tinyhttp 25,949 (15) 23,070 (15) 17,990 (20)
Express 12,821 (19) 11,698 (20) 10,120 (23)
NestJS (Express adapter) 9,427 (26) 8,743 (28) 8,254 (30)
How it was measured →

Start with the request, end with the docs

33 pages, from installation to the full API reference.