Skip to content
github-actions[bot] edited this page Apr 24, 2026 · 4 revisions

Why?

NestJS gives you modules, DI, and a clean request pipeline. What it doesn't give you is the eight CRUD endpoints every REST API writes from scratch: list, paginate, filter, sort, join, nested-join, soft-delete, recover. So you keep writing the same query-parse + DB-translate glue for every resource.

nestjs-crud writes those eight endpoints from one @Crud() decorator. It handles query parsing (?filter=, ?sort=, ?join=, ?page=), validation, pagination, soft-delete, and Swagger docs. Plug in your entity and a service that extends one of the ORM adapters (TypeORM, Drizzle, MikroORM, or Prisma). Need custom behavior on one route? Drop @Override() on your handler and keep the other seven generated.

Forked from @nestjsx/crud. Modernized dependencies, regular releases, same API on v1.0.x (drop-in for existing @nestjsx/crud consumers), and an opt-in v2.x when you want the cleanup. Upgrade path: Versions.

Packages

nestjs-crud ships as a Yarn workspaces monorepo. Four adapters, plus the core framework, the request builder, and a shared util:

Guides

Migration

  • v1 → v2 — breaking changes across all adapters
  • v2.0 → v2.1 — Prisma v7 consumer upgrade (driver adapter required)

Clone and run tests

git clone https://github.com/kodjunkie/nestjs-crud
cd nestjs-crud
docker compose up -d
yarn install
yarn build
yarn test

docker compose brings up Postgres on port 5455, MySQL on 3316, and Redis on 6399 for integration runs.

Run the example project

yarn db:prepare:typeorm:postgres
yarn start:typeorm

Open http://localhost:3000/docs for Swagger. The source lives at examples/typeorm-demo/ — a standalone NestJS app you can copy from.

Clone this wiki locally