backend-nestjs
Installation
SKILL.md
Backend - NestJS
When to use this skill
- Creating or updating NestJS modules, controllers, services, DTOs, and pipes.
- Adding REST or GraphQL endpoints, validation, authentication, or persistence.
- Improving logging, error handling, testing, or configuration management.
Quick start
- Install deps:
npm ci(or project-standard package manager). - Env: copy
.env.example->.env; set database URL, JWT secrets, external service keys. - Dev server:
npm run start:dev; prod build:npm run buildandnpm run start:prod. - Tests:
npm test(unit) andnpm run test:e2e(e2e); lint:npm run lint.
Core patterns
- Modules group related providers/controllers; keep dependencies minimal.
- DTOs define input/output shapes; use
class-validatorandclass-transformerfor validation and transformation. - Controllers handle transport; services contain business logic; repositories/ORM clients manage data access.
- Use pipes for validation/transformation, filters for cross-cutting error shaping, guards for auth.