npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@yeoli/nest-flex-schematics

v0.2.0

Published

Selectable NestJS boilerplate generator using Nest schematics

Readme

Nest Flex Schematics

An interactive Nest schematics package for generating a selectable NestJS boilerplate. KR: 선택형 NestJS 보일러플레이트를 생성하는 인터랙티브 Nest schematics 패키지입니다.

Quick Start

cd nest-flex-schematics
npm install
npm run build
npx @yeoli/nest-flex-schematics init

If you use pnpm: KR: pnpm을 사용하는 경우:

cd nest-flex-schematics
pnpm install
pnpm run build
pnpm dlx @yeoli/nest-flex-schematics init

For the interactive question flow, see docs/CLI_FLOW.md. KR: 인터랙티브 질문 흐름은 docs/CLI_FLOW.md를 참고하세요.

In CI/automation, prefer generate --no-interactive. KR: CI/자동화 환경에서는 generate --no-interactive 사용을 권장합니다.

Generate a Boilerplate

The easiest way is interactive mode: KR: 가장 쉬운 방법은 interactive 모드입니다.

npx @yeoli/nest-flex-schematics init

To provide all options manually, use this command: KR: 모든 옵션을 직접 지정하려면 아래 명령을 사용하세요.

npx schematics ./tools/schematics/collection.json:nest-boilerplate \
  --no-interactive \
  --name my-nest-app \
  --package-manager npm \
  --version-mode preset \
  --preset node20-nest11 \
  --runtime fastify \
  --api-style rest \
  --database postgres \
  --orm prisma \
  --auth jwt \
  --validation class-validator \
  --swagger \
  --test-preset unit \
  --no-docker

Option Values

Only these values are allowed. KR: 아래 값만 사용할 수 있습니다.

  • --package-manager: npm, pnpm
  • --version-mode: preset, custom
  • --preset: node20-nest11, node22-nest11, node20-nest10
  • --runtime: express, fastify
  • --api-style: rest, graphql, both
  • --graphql-approach: code-first, schema-first (for graphql/both)
  • --graphql-driver: apollo, mercurius (for graphql/both)
  • --database: postgres, mysql, mongodb
  • --orm: prisma, typeorm, mongoose
  • --auth: none, jwt
  • --validation: class-validator, zod
  • --test-preset: unit, unit-e2e
  • --swagger / --no-swagger
  • --docker / --no-docker

Allowed and Disallowed Combinations

DB + ORM

Allowed: KR: 허용 조합:

  • postgres + prisma
  • postgres + typeorm
  • mysql + prisma
  • mysql + typeorm
  • mongodb + mongoose

Disallowed: KR: 금지 조합:

  • mongodb + prisma
  • mongodb + typeorm
  • postgres/mysql + mongoose

GraphQL Driver Rules

  • apollo: supports both express and fastify
  • mercurius: supports only fastify
  • mercurius requires nest >= 11

KR:

  • apollo: express, fastify 모두 지원
  • mercurius: fastify에서만 지원
  • mercuriusnest >= 11에서만 지원

Runtime Constraint

  • fastify + swagger is not supported for nest < 11

KR:

  • nest < 11에서는 fastify + swagger 조합을 지원하지 않습니다.

Conditional Option Rules

  • With --api-style rest, --graphql-approach and --graphql-driver are ignored.
  • With --api-style graphql or both, set both GraphQL options explicitly.
  • With --version-mode custom, you can set --node-version and --nest-version.

KR:

  • --api-style rest에서는 --graphql-approach, --graphql-driver가 무시됩니다.
  • --api-style graphql 또는 both에서는 GraphQL 옵션을 함께 지정하는 것을 권장합니다.
  • --version-mode custom에서는 --node-version, --nest-version을 추가로 지정할 수 있습니다.

Invalid Examples (Fail Fast)

These combinations are blocked during generation. KR: 아래 조합은 생성 단계에서 에러로 차단됩니다.

# 1) mongodb + prisma
npx schematics ./tools/schematics/collection.json:nest-boilerplate \
  --no-interactive --name invalid-db --package-manager npm \
  --version-mode preset --preset node20-nest11 --runtime fastify \
  --api-style rest --database mongodb --orm prisma --auth none \
  --validation class-validator --no-swagger --test-preset unit --no-docker

# 2) express + mercurius
npx schematics ./tools/schematics/collection.json:nest-boilerplate \
  --no-interactive --name invalid-driver --package-manager npm \
  --version-mode preset --preset node22-nest11 --runtime express \
  --api-style graphql --graphql-approach code-first --graphql-driver mercurius \
  --database postgres --orm typeorm --auth none --validation class-validator \
  --no-swagger --test-preset unit --no-docker

Custom Mode Example

Use custom mode when you want to set versions directly instead of presets. KR: 공식 프리셋 대신 버전을 직접 지정하려면 custom 모드를 사용하세요.

npx schematics ./tools/schematics/collection.json:nest-boilerplate \
  --no-interactive \
  --name my-custom-app \
  --package-manager pnpm \
  --version-mode custom \
  --node-version 20 \
  --nest-version 11 \
  --runtime express \
  --api-style both \
  --graphql-approach code-first \
  --graphql-driver apollo \
  --database mysql \
  --orm typeorm \
  --auth jwt \
  --validation class-validator \
  --swagger \
  --test-preset unit-e2e \
  --docker

Notes: KR: 참고:

  • custom mode is a Custom (Best-Effort) support tier.
  • DB/ORM and GraphQL validation rules still apply in custom mode.

Run Generated Project

cd my-nest-app
cp .env.example .env
npm install
npm run build
npm run start:dev

If you use pnpm: KR: pnpm을 사용하는 경우:

cd my-nest-app
cp .env.example .env
pnpm install
pnpm run build
pnpm run start:dev

Default URLs: KR: 기본 확인 URL:

  • Health: http://localhost:3000/v1/health
  • Swagger (REST + swagger): http://localhost:3000/docs

Official Presets

  • node20-nest11 (recommended)
  • node22-nest11
  • node20-nest10 (legacy)

Support policy: KR: 지원 정책:

  • version-mode=preset: Official Support
  • version-mode=custom: Custom (Best-Effort)

Release Rules

  • Version policy: SemVer (0.x may include breaking changes in minor)
  • Changelog format: keep Added/Changed/Fixed/Deprecated in CHANGELOG.md
  • Detailed release flow: docs/RELEASE_POLICY.md

KR:

  • 버전 정책: SemVer (0.x 구간에서는 minor에 breaking change 포함 가능)
  • 변경 이력 형식: CHANGELOG.md에서 Added/Changed/Fixed/Deprecated 유지
  • 상세 릴리스 절차: docs/RELEASE_POLICY.md

Recommended pre-publish order: KR: 배포 직전 권장 순서:

npm ci
npm run build
npm pack --dry-run
npm publish --access public