Skip to content

Opinionated NestJS Schematics. Uses Prisma, Zod validations, and REST controllers.

Notifications You must be signed in to change notification settings

cmdnio/nest-schematics

Repository files navigation

Schematics for NestJS REST API resources

This package generates opinionated NestJS REST API resources. Key takeaways:

  • Uses Prisma Service (nestjs-prisma needs to be installed separately)
    • Expects Prisma entities to have singular naming (e.g. User)
  • Uses Zod for DTO Validation (nestjs-zod needs to be installed separately)
  • Does not follow the NestJS naming convention (uses camelCase for the file names)

Installation

npm i --save-dev nest-cmdn-schematics

Usage

nest g -c nest-cmdn-schematics crud <Resource Name>

Or add npm alias

  "scripts": {
    "gen": "nest g crud -c nest-cmdn-schematics"
  }

And then use

npm run gen <Resource Name>

About

Opinionated NestJS Schematics. Uses Prisma, Zod validations, and REST controllers.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published