Reference
Example apps
Runnable example apps in the repo — one per adapter.
The doctreen repo ships runnable
example apps in the example/ folder — clone the repo and run them to see
the full UI in action.
npm run example # Express JS → http://localhost:3000/api/docs
npm run example:ts # Express TS → http://localhost:3000/api/docs
npm run example:fastify # Fastify JS → http://localhost:3001/api/docs
npm run example:fastify:ts # Fastify TS → http://localhost:3001/api/docs
npm run example:hono # Hono JS → http://localhost:3002/api/docs
npm run example:hono:ts # Hono TS → http://localhost:3002/api/docs
npm run example:koa # Koa JS → http://localhost:3003/api/docs
npm run example:koa:ts # Koa TS → http://localhost:3003/api/docs
npm run example:nest # NestJS TS → http://localhost:3001/docs| File | Framework | Highlights |
|---|---|---|
example/app.js | Express | JSDoc, defineRoute, named schemas, error responses, flow presets |
example/app.ts | Express | Fully typed with defineRoute generics, flow presets |
example/fastify-app.js | Fastify | JSDoc, defineRoute, Fastify native JSON Schema, flow presets |
example/fastify-app.ts | Fastify | Fully typed with Fastify route generics, flow presets |
example/hono-app.js | Hono | JSDoc, defineRoute; run via npx tsx |
example/hono-app.ts | Hono | Fully typed with Hono Context |
example/koa-app.js | Koa | JSDoc, defineRoute, @koa/router |
example/koa-app.ts | Koa | Fully typed with Router.RouterContext |
example/nest-app.ts | NestJS | @DocRoute, @Doc* decorators, Zod schemas, s builder |
The Redis-backed drift store reference lives at
example/drift-redis-store.js — see Schema drift.
For the live UI without cloning, hit the hosted demo at demo.doctreen.dev/docs.