Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
A

awesome-nest-boilerplate

> 编程语言
Open source

Awesome NestJS Boilerplate , Typescript , Postgres , TypeORM

2.8K stars0 likes0 views
WebsiteGitHub

About

Awesome NestJS Boilerplate , Typescript , Postgres , TypeORM

Awesome NestJS Boilerplate v11

An enterprise-grade NestJS starter built for teams that care about code structure at scale. Ships with CQRS, strict TypeScript, JWT auth (RS256), and multi-runtime support — all wired with zero configuration drift.

Quick Start

# 1. Clone
npx degit NarHakobyan/awesome-nest-boilerplate my-nest-app
cd my-nest-app

# 2. Configure
cp .env.example .env
# Set DB_HOST, DB_PORT, DB_USERNAME, DB_PASSWORD, DB_DATABASE
# Paste your JWT_PRIVATE_KEY and JWT_PUBLIC_KEY (see .env.example for examples)

# 3. Install & run
pnpm install
pnpm start:dev

Open http://localhost:3000. The API docs are at /documentation.

Prefer a database out of the box? docker-compose up -d postgres first.

What's Inside

CQRS — Commands, queries, handlers JWT Auth (RS256) — Login, register, RBAC TypeORM + PostgreSQL — Entities, migrations Strict TypeScript — No any, ESM, verbatim modules i18n — Multi-language (en_US, ru_RU) Swagger — Auto-generated API docs Vite HMR — Instant dev reload UUID v7 — Time-sortable primary keys Biome + ESLint — Linting & formatting Helmet + Rate Limiting — Built-in security CORS — Configurable origins Validation — Custom decorators, DTO guards Node / Bun / Deno — Multi-runtime OpenAPI MCP — AI assistants call your API

Taste of the Codebase

A typical CQRS flow — command, handler, and service wired through NestJS DI:

…

Architecture

flowchart LR
    A[Request] --> B[Guard]
    B --> C[Controller]
    C --> D[Command / Query Bus]
    D --> E[Handler]
    E --> F[Service]
    F --> G[Repository]
    G --> H[(PostgreSQL)]

Every feature module follows this structure:

…

Full architecture →

Environment Variables

Copy .env.example → .env. Most variables come pre-configured with working defaults. You only need to change these:

Variable What to set DB_HOST, DB_PORT, DB_USERNAME, DB_PASSWORD, DB_DATABASE PostgreSQL connection (or use docker-compose up -d postgres — defaults match) JWT_PRIVATE_KEY RS256 private key — generate your own or use the example PEM in .env.example JWT_PUBLIC_KEY RS256 public key — matching public key

Every other variable in .env.example has a working default for local development. Optional features (NATS, S3, Email, AI providers) are off by default — enable them when you need them.

All environment variables →

Multi-Runtime Support

Node.js Bun Deno pnpm start:dev bun start:dev:bun deno task start pnpm test bun test deno task test pnpm build:prod bun build:bun deno task buildr

Node is the primary runtime. Bun and Deno support is included for teams that prefer them.

Making It Your Own

  1. Rename the project — update name in package.json
  2. Update .env — replace the JWT keys and DB credentials with your own
  3. Update LICENSE — change the author name
  4. Customize this README — replace it with your project's docs

Documentation

  1. Architecture — CQRS, repository pattern, DI, entity-DTO mapping
  2. Setup & Development — first-time setup, scripts, debugging
  3. Code Generation — NestJS schematics for scaffolding
  4. Naming Cheatsheet — file, class, and variable conventions
  5. Linting — Biome + ESLint setup
  6. OpenAPI MCP — AI assistants calling your API

Community

Discuss on GitHub →


Sponsored by M One & HR Drone

GitHub Issues· 0 open

View all on GitHub

No open issues yet, or sync has not completed.

Highlights

  • •TypeScript

> Tags

TypeScript

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言