OrbitDocs packages are coming to npm soon. Until then, run it from the GitHub repo →
Get started

Introduction

What OrbitDocs is, what you get, and where to start.

OrbitDocs turns your NestJS controllers into a Scalar-style API reference. You write guides in MDX next to your code. One command builds a site you can host on Vercel, any static host, or inside your Nest server.

It is open source (MIT) and self-hosted. There is no account, no pricing tier and no feature behind a paywall.

Already using @nestjs/swagger?

Set routes: 'all' and you need zero OrbitDocs decorators. Your @ApiOperation, @ApiTags, @ApiProperty and DTOs already describe the API. OrbitDocs reads them through @nestjs/swagger itself.

Start here

What's in the box

PartWhat you get
NestJS integrationThe spec comes from your compiled app, booted in preview mode. No database or queue starts. Optional @Docs* decorators add titles, groups, errors and samples.
API referenceOne scrolling page per API, a URL per operation, code samples in 10 languages, auth fields that fill every sample.
API clientA Postman-style client in the browser: collections from your spec, environments, secrets, scripts, tests, a runner and history.
MDX guidesPages in content/, ordered by meta.json, with callouts, steps, tabs and links to operations that fail the build when they break.
SearchOne index over guides and operations, opened with ⌘K or Ctrl+K. It works on static hosts.
AIAsk AI over your docs with your own LLM key, an MCP server for your docs and one per API, and llms.txt.
Private docsSign-in with Google, Microsoft, Okta, Auth0, Clerk or Keycloak, or reuse your product's own session. Rules per page, folder or API.
SDKs, mock and lintorbitdocs sdk, orbitdocs mock and orbitdocs lint, all driven by the same spec.
Self-hosted platformOptional. Publishing, previews per pull request, custom domains, a team and a spec registry, on your own servers.

How it works in four lines

  1. Your API is the source. OrbitDocs builds on @nestjs/swagger. Every Swagger decorator and the Swagger CLI plugin drive the docs.
  2. Extraction needs no infrastructure. OrbitDocs loads your compiled module with NestFactory.create(AppModule, { preview: true }). Controllers are scanned; providers are never created.
  3. Guides are MDX. They live in a content/ folder inside a normal Next.js app that you own and can edit.
  4. One build, any host. orbitdocs build writes plain files with search, llms.txt and a page per operation. Or run it as a Next server, or serve it from Nest.

Read How it works for the details.

How it compares

OrbitDocs follows Scalar's reference layout and client ideas, and Fumadocs for guides. The difference is where it runs and what it reads:

  • Self-hosted and free. Everything in this documentation runs on your own infrastructure.
  • NestJS first. The spec is extracted from your code. You never maintain a separate OpenAPI file. Any OpenAPI 3.x or Swagger 2.0 file or URL also works as a source.
  • You own the app. orbitdocs init writes a visible Next.js app. You can change any page, layout or style.

See OrbitDocs vs Scalar for an honest feature table.

Next steps

Last updated on

On this page