What problem does it solve?
This Skill helps developers ensure their NestJS applications follow best practices, reducing bugs, improving maintainability, and enhancing security by adhering to proven architectural patterns.
Core Features & Use Cases
- Architecture Best Practices: Enforces modular design, dependency management, and avoidance of circular dependencies.
- Dependency Injection Optimization: Promotes constructor injection, interface usage, and scope awareness.
- Error Handling & Security: Implements centralized exception filters, guard-based authorization, and input validation.
- Performance & Testing: Guides on lazy loading, caching strategies, and comprehensive e2e testing with Supertest.
- Database & Microservices: Recommends migration management, transaction handling, and message pattern correct usage.
- DevOps & Deployment: Recommends graceful shutdown, structured logging, and environment configuration.
- Code Quality: Encourages single responsibility, component reuse, and modular organization.
These guidelines facilitate the development of high-quality, reliable, and secure NestJS projects suitable for production environments.
Quick Start
Use the nestjs-best-practices skill to review existing server code, identify architectural improvements, and automate refactoring suggestions for NestJS projects.