Installation
Install doctreen and its peer dependencies.
npm install doctreenNestJS peers
For NestJS projects, also install the peer dependencies (if not already present):
npm install reflect-metadata rxjsZod support
For Zod schema support:
npm install zodZod is optional — DocTreen ships its own lightweight schema builder (s) if you
don't want to add Zod. See Schema builder.
Faker (mock server)
To get realistic values from doctreen mock, install Faker:
npm install --save-dev @faker-js/fakerWithout it, the mock server falls back to deterministic placeholders.
Requirements
- Node.js 18+ (Hono v4 is ESM-only)
- One of: Express 4/5, Fastify 4/5, Hono 4, Koa 2 (with
@koa/router), or NestJS 10/11