For AI agents: the complete documentation index is available at https://navios.tech/llms.txt, the full documentation bundle is available at https://navios.tech/llms-full.txt, and this page is available as Markdown at https://navios.tech/index.md.

TypeScript · ES decorators · Standard Schema

Type-safe APIs, end to end

Navios is a decorator-based framework for building modern APIs. Define an endpoint once and use it on the server and the client.

npm install @navios/server@next @navios/adapter-fastify@next @navios/builder@next fastify zod
user.controller.ts
@Controller()
export class UserController {
  private users = inject(UserService)

  @Endpoint(getUser)
  async getUser({ urlParams }: HandlerParams<typeof getUser>) {
    // urlParams and the return type come from the definition
    return this.users.find(urlParams.userId)
  }
}

Why Navios?

A modern approach to building type-safe APIs with TypeScript

One definition, three places

Create type-safe API definitions that work on both client and server

shared/api.ts
import { builder } from '@navios/builder'
import { z } from 'zod'

export const API = builder()

export const getUser = API.declareEndpoint({
  method: 'GET',
  url: '/users/$userId',
  responseSchema: z.object({
    id: z.string(),
    name: z.string(),
    email: z.string(),
  }),
})

How Navios compares

See how Navios stacks up against other popular frameworks

FeatureNaviosNestJSExpress
TypeScript nativeYesYesNo
Shared client/server typesYesNoNo
ES decorators (TC39)YesLegacyNo
Bun supportYesLimitedYes
Built-in validationStandard Schemaclass-validatorNo
Bundle sizeSmallLargeMinimal
DI flexibilityHierarchicalModule-boundNo

Pick your pieces

Core packages, adapters, and recipes to build your application

@navios/server@navios/server version

HTTP server framework with decorators, modules, and controllers

Read the docs
@navios/builder@navios/builder version

Type-safe API declarations shared between client and server

Read the docs
@navios/di@navios/di version

Lightweight dependency injection with hierarchical containers

Read the docs

Start with one endpoint

Set up a server, declare an endpoint, and call it with full types in a few minutes.