NestJS's shape, compiled
Write a server the NestJS way, with decorated controllers, injected services and DTO classes. Flare reads your TypeScript types and Beacon turns each route into one plain function, with validation as ordinary code.
In development · part of FlareWhat it is
Beacon doesn't read decorators and metadata on every request. At build time, Flare's compiler reads your TypeScript types and Beacon generates one straight-line handler per route, validators as plain code and a router of nested switch statements. A route parameter typed id: number is checked and converted without a pipe.
Existing NestJS apps run on it as they are: @nestjs/* imports resolve to Beacon. On the test app, the responses are byte-identical to NestJS 11 on Node.
The name: a beacon is a fixed light that signals across a distance, which is what a server does.
Modules and DI
@Module, dynamic modules, providers by class, value, factory or alias, request and transient scopes, lifecycle hooks.
Routes
@Controller, @Get/@Post/…, parameters, optional parameters, wildcards, status codes, headers, redirects, versioning.
Validation from types
TypeScript types plus class-validator-style rules (IsEmail, MinLength, …). Unknown properties are stripped.
Guards, pipes, interceptors
Guards, interceptors (rxjs or async), pipes, exception filters, middleware, with NestJS's error bodies.
OpenAPI
Documents generated from the compiled types, with Swagger UI.
Real-time
Server-sent events and WebSocket gateways; HTTP/2 and HTTP/3 through Flare.
Benchmarks
Requests per second, HTTP/1.1, 50 connections, Apple Silicon.
| Route | Beacon | Elysia (Bun) | NestJS + Fastify (Node) |
|---|---|---|---|
GET /json | 181k | 144k | 91k |
GET /users/:id | 149k | 134k | |
POST /users (validated) | 99k | 91k | |
| Guard + interceptor | 127k | 165k |
Measured in November 2026 on a heavily loaded shared machine; Elysia's runs varied up to ±40%. NestJS + Fastify comes from a separate run.
Not done yet
What's missing, so you know where it stands.
- socket.io gateways (plain WebSocket only).
- Multipart uploads aren't parsed yet.
- Microservices, GraphQL and CQRS packages aren't mapped.
- Shutdown hooks do nothing until Flare delivers signals.
- View engines (
res.render) are not supported.
The family
Four projects around one engine, all written from scratch.