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
Quickstart
From an existing Nest app to a running docs site in five minutes.
How it works
Extraction, the docs app, the build and the three ways to serve it.
Project structure
Every file `orbitdocs init` creates, and which ones you edit.
Live demo
The reference for the sample Orbit Travel API.
What's in the box
| Part | What you get |
|---|---|
| NestJS integration | The 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 reference | One scrolling page per API, a URL per operation, code samples in 10 languages, auth fields that fill every sample. |
| API client | A Postman-style client in the browser: collections from your spec, environments, secrets, scripts, tests, a runner and history. |
| MDX guides | Pages in content/, ordered by meta.json, with callouts, steps, tabs and links to operations that fail the build when they break. |
| Search | One index over guides and operations, opened with ⌘K or Ctrl+K. It works on static hosts. |
| AI | Ask AI over your docs with your own LLM key, an MCP server for your docs and one per API, and llms.txt. |
| Private docs | Sign-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 lint | orbitdocs sdk, orbitdocs mock and orbitdocs lint, all driven by the same spec. |
| Self-hosted platform | Optional. Publishing, previews per pull request, custom domains, a team and a spec registry, on your own servers. |
How it works in four lines
- Your API is the source. OrbitDocs builds on
@nestjs/swagger. Every Swagger decorator and the Swagger CLI plugin drive the docs. - Extraction needs no infrastructure. OrbitDocs loads your compiled module with
NestFactory.create(AppModule, { preview: true }). Controllers are scanned; providers are never created. - Guides are MDX. They live in a
content/folder inside a normal Next.js app that you own and can edit. - One build, any host.
orbitdocs buildwrites plain files with search,llms.txtand 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 initwrites a visible Next.js app. You can change any page, layout or style.
See OrbitDocs vs Scalar for an honest feature table.

