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
- routermatch method + path
- parserquery, JSON, XML, multipart
- @withAuthRequestAuthentication
- @accessControlcompare request values
- @validatePropertyDTO + files rules
- handleryour method runs
What ships in the box
Everything a request touches, built in
Decorator routing
@get, @post, @put, @patch, @del, @head and the new HTTP QUERY method, each with tags and titles for docs.
validateChainable validator
String, number, object and array rules, cross-field .when() and .match(), sync or async, built once and reused.
@withAuthAuth pipeline
Read a token from any header, query, body or path field and write the resolved user onto req.auth.
@accessControlAccess control
Compare request values, check a fixed value or run your own handler. Every rule must pass.
@fileUploadPropertyFiles & streams
MIME type, file signature and size checks per field, uploads as readable streams, and stream bodies in responses.
v2.6.0+XML bodies
text/xml and application/xml parsed natively, namespaces resolved, SOAP and ISO 20022 friendly.
openApiDocOpenAPI 3.0
Swagger UI generated from your decorators and DTOs. Hide a route with isHidden: true.
serverOptionsHTTPS & multi-app
Pass certificates through ssl options; scope several apps in one process with appId.
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.
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) |
Start with the request, end with the docs
33 pages, from installation to the full API reference.