Documentation

Pro Plan Documentation

Learn what the starter kit provides, how its modules fit together, and where to begin.

Edit on GitHub

NestJS Modular Monolith Starter Kit

This starter kit is a single deployable NestJS application organized around explicit business-module boundaries. It provides a working foundation for products that need authentication, user administration, role-based authorization, PostgreSQL persistence, and production-oriented HTTP behavior.

What is included

  • JWT access authentication and rotating refresh-token sessions.
  • HTTP-only refresh cookies and double-submit CSRF protection.
  • Registration, email verification, password changes, and session management.
  • Self-service and administrative user lifecycle operations.
  • Roles, permissions, per-user overrides, super-administrator safeguards, and RBAC audit records.
  • PostgreSQL persistence with TypeORM and explicit migrations.
  • OpenAPI generation and a Scalar API reference.
  • Global validation, Problem Details errors, rate limiting, CORS, and Helmet.
  • Structured logs, request IDs, liveness, and readiness checks.
  • SMTP email delivery, Handlebars templates, and Mailpit for development.
  • Unit, end-to-end, and CI workflows.

Requirements

ToolSupported version
Node.js>=24 <25
pnpm10.34.5
PostgreSQL17 or a compatible release
DockerOptional; used by the included local-service workflow

Documentation map

GoalRead
Run the API locallyGetting Started
Understand module boundariesArchitecture
Configure an environmentConfiguration
Integrate login and sessionsAuthentication
Manage accountsUser Management
Configure authorizationRole-Based Access Control
Understand HTTP contractsAPI Overview
Change the schema safelyDatabase and Migrations
Build a production imageDeployment
Operate the serviceOperations
Verify a changeTesting
Resolve a common failureTroubleshooting

API discovery

When OPENAPI_ENABLED=true, the running application exposes:

  • Scalar API reference: http://localhost:3000/docs
  • OpenAPI JSON: http://localhost:3000/openapi.json

The generated OpenAPI document is the authoritative endpoint catalog. These guides focus on workflows, contracts, and operational behavior so endpoint details do not drift away from the code.

  1. Complete Getting Started.
  2. Read Architecture before adding a module.
  3. Review Authentication and API Overview before building a client.
  4. Use the local Scalar reference to inspect exact request and response schemas.
  5. Read Deployment before creating a production environment.

On this page