A NestJS package that generates REST API CRUD controllers and services with query parsing, validation, and Swagger docs.
Overview
CRUD is a microframework for NestJS that helps you add REST API CRUD endpoints quickly. It targets teams building RESTful services in NestJS who want ready-made controllers and services instead of writing repetitive create-read-update-delete code by hand.
The package provides database- and service-agnostic CRUD controllers that you can extend. Query handling covers filtering, pagination, sorting, relations, nested relations, and caching. A separate framework-agnostic query builder package is available for frontend use.
Validation is built in for query parameters, path parameters, and DTOs. You can override controller methods when you need custom behavior. Configuration can be kept small, including global options, and helper decorators reduce boilerplate. Swagger documentation generation is supported.
Installation is straightforward: after adding the package to a NestJS project, you can start with full-featured controllers and services.
Key features
- Extendable CRUD controllers
- Rich query parsing
- Pagination and filtering
- Relations and nested relations
- DTO and param validation
- Controller method overrides
- Global and local config
- Swagger documentation
Use cases
- NestJS REST CRUD APIs
- Admin backends with lists
- TypeORM-backed services
- Queryable HTTP resources
- Rapid API scaffolding