DocTreen

Installation

Install doctreen and its peer dependencies.

npm install doctreen

NestJS peers

For NestJS projects, also install the peer dependencies (if not already present):

npm install reflect-metadata rxjs

Zod support

For Zod schema support:

npm install zod

Zod 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/faker

Without 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

On this page