nestjs-best-practices
NestJS 11+ expert assistant for enterprise Node.js development, including dependency injection, DTO validation, authentication, ORMs, testing, microservices, and architectural best practices.
Introduction
This skill acts as a comprehensive knowledge base for NestJS 11+ developers, specifically tailored for building robust, scalable enterprise applications with TypeScript. It bridges the gap between official documentation and practical, production-grade implementation, offering guidance on the entire application lifecycle, from modular architecture to microservice orchestration. The skill is designed for senior developers and architects who need to ensure consistency, type safety, and clean code principles across large-scale Node.js projects.
-
Advanced dependency injection patterns including forwardRef, custom providers, and dynamic module configuration.
-
Request lifecycle management via middleware, guards, interceptors, pipes, and global exception filters.
-
Input validation and data transformation using class-validator, class-transformer, and custom ValidationPipes.
-
Robust authentication and authorization strategies leveraging JWT, Passport, and role-based access control (RBAC).
-
Database integration support for TypeORM, Prisma, and Drizzle ORM, including repository patterns and migration safety.
-
Comprehensive testing strategies covering unit, E2E, and integration tests with provider mocking.
-
Enterprise-grade microservices support across TCP, Redis, NATS, and Kafka transport layers.
-
OpenAPI and GraphQL documentation patterns with decorators and resolver best practices.
-
Best used when refactoring legacy NestJS code or scaffolding new feature modules.
-
Provides critical checks for common pitfalls such as circular dependencies, improper singleton scope, and missing whitelist validation.
-
Helps navigate NestJS 11 breaking changes, including Express v5 and Fastify v5 migration paths.
-
Ensures production-readiness by enforcing health checks, ConfigService implementation, and proper environment configuration.
-
Supports debugging of dependency resolution errors and performance-critical microservice communication setups.
Repository Stats
- Stars
- 4
- Forks
- 0
- Open Issues
- 0
- Language
- Not provided
- Default Branch
- main
- Sync Status
- Idle
- Last Synced
- May 3, 2026, 08:03 PM