https://github.com/kodjunkie/nestjs-crud
NestJs CRUD for RESTful APIs
https://github.com/kodjunkie/nestjs-crud
database drizzle-orm mikro-orm nestjs nestjs-backend nestjs-graphql nestjs-library nestjs-microservices nestjs-module nestjs-mongoose nestjs-postgres postgresql
Last synced: about 1 month ago
JSON representation
NestJs CRUD for RESTful APIs
- Host: GitHub
- URL: https://github.com/kodjunkie/nestjs-crud
- Owner: kodjunkie
- License: mit
- Created: 2026-02-17T14:51:55.000Z (4 months ago)
- Default Branch: master
- Last Pushed: 2026-04-20T16:03:44.000Z (about 1 month ago)
- Last Synced: 2026-04-20T17:41:05.222Z (about 1 month ago)
- Topics: database, drizzle-orm, mikro-orm, nestjs, nestjs-backend, nestjs-graphql, nestjs-library, nestjs-microservices, nestjs-module, nestjs-mongoose, nestjs-postgres, postgresql
- Language: TypeScript
- Homepage: https://github.com/kodjunkie/nestjs-crud/wiki
- Size: 2.85 MB
- Stars: 4
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
RESTful APIs for NestJS — from a single @Crud() decorator
Generate eight RESTful endpoints for any NestJS controller — list, paginate, filter, sort, join, nested-join, soft-delete, recover — without writing the handlers.
## Features

- Full-featured CRUD controllers and services, ready to use
- DB and service agnostic — extendable base classes per adapter
- Rich query parsing — filters, pagination, sorting, relations, nested relations, cache
- Framework agnostic query builder for the frontend
- Body, query, and path-param validation built in
- Override any generated handler with `@Override()`
- Tiny config — per-controller or global defaults
- Swagger documentation auto-wired (optional peer)
## Quick start
```bash
npm install @nestjs-crud/core @nestjs-crud/typeorm
```
```ts
@Crud({
model: { type: User },
query: { limit: 25, maxLimit: 100, join: { profile: { eager: true } } },
})
@Controller('users')
export class UsersController {
constructor(public service: UsersService) {}
}
```
You get `GET /users`, `GET /users/:id`, `POST /users`, `POST /users/bulk`, `PATCH /users/:id`, `PUT /users/:id`, `DELETE /users/:id`, `POST /users/:id/recover` — with rich query parsing, pagination, validation, and Swagger.
## Adapters
| Adapter | Package |
| -------- | -------------------------------------------------------------------------------- |
| TypeORM | [`@nestjs-crud/typeorm`](https://www.npmjs.com/package/@nestjs-crud/typeorm) |
| Drizzle | [`@nestjs-crud/drizzle`](https://www.npmjs.com/package/@nestjs-crud/drizzle) |
| MikroORM | [`@nestjs-crud/mikro-orm`](https://www.npmjs.com/package/@nestjs-crud/mikro-orm) |
| Prisma | [`@nestjs-crud/prisma`](https://www.npmjs.com/package/@nestjs-crud/prisma) |
Plus [`@nestjs-crud/core`](https://www.npmjs.com/package/@nestjs-crud/core) (decorator + framework) and [`@nestjs-crud/request`](https://www.npmjs.com/package/@nestjs-crud/request) (frontend query builder).
## Documentation
Full docs live on the [**Wiki**](https://github.com/kodjunkie/nestjs-crud/wiki) — controllers, services, request shape, per-adapter setup, migration guides.
## Skills (for AI coding assistants)
Three agent skills ship with the repo:
| Skill | Scope |
| ----- | ----- |
| `nestjs-crud` | Current v2.x — setup, adapters, `@Crud()` options, Swagger customization, transactions, common issues |
| `nestjs-crud-v1` | Legacy v1.0.x behavior reference |
| `nestjs-crud-migration` | v1 → v2 upgrade playbook — audit greps, error-to-fix mapping |
Install all three:
```bash
npx skills add kodjunkie/nestjs-crud
```
Install a specific one with `-s`:
```bash
npx skills add kodjunkie/nestjs-crud -s nestjs-crud
npx skills add kodjunkie/nestjs-crud -s nestjs-crud-migration
```
## License & Credits
[MIT](LICENSE). Fork of [`@nestjsx/crud`](https://github.com/nestjsx/crud) at `5.0.0-alpha.3`. See [`NOTICE.md`](NOTICE.md) for full attribution.