Navios Server
Navios Server is an HTTP framework for TypeScript built on one idea: an endpoint is declared once, with @navios/builder, and the server implements that declaration. The route, the request validation, the response validation and the handler's types all come from it, and a client can call the same declaration with the same types.
Return a user without email, or answer with a status the declaration does not list, and the controller stops compiling.
What it does
- Typed handlers. Parameters, return values and status codes are checked against the declaration at compile time, and validated again at run time.
- Any schema library. Every schema slot accepts a Standard Schema: Zod, Valibot, ArkType and others. These docs use Zod in examples.
- Standard decorators. Navios uses TC39 decorators, the kind TypeScript compiles without
experimentalDecoratorsand Bun runs natively. - Adapters. The HTTP server is Fastify on Node.js or
Bun.serveon Bun. Application code is the same on both. - Singletons by default. Controllers, guards and interceptors are created once at start-up. Per-request data travels in a typed request context, so nothing is constructed per request unless you ask for it.
- One error format. Every error response the framework produces is
application/problem+json, unless the endpoint declares its own body for that status. - Dependency injection. Services are wired by
@navios/di, which@navios/serverre-exports.
Packages
An application needs @navios/server, @navios/builder and one adapter. The rest are optional. They run on Node.js 24 or newer, and on Bun 1.4.5 or newer.
Who it is for
Navios Server fits a team that writes both sides of an API in TypeScript and wants a change to the contract to be a compile error on each side. It also works as a plain server framework: the declarations are useful on their own as the single description of every route, and they feed the OpenAPI document.
If you come from NestJS, the vocabulary is familiar (modules, controllers, guards, interceptors, injectable services) and the differences are listed in Migrating from NestJS.