
Nestjs Patterns
This is a solid reference for building production NestJS backends the right way. It covers the full stack: module organization, DTO validation with class-validator, guards and interceptors, environment config validation at boot, and keeping controllers thin while services own business logic. The structure guidance is opinionated but practical, pushing cross-cutting concerns into common folders and keeping DTOs close to their modules. You'll want this active when setting up new NestJS projects or refactoring messy ones, especially if you're tired of inconsistent error handling or controllers that do too much. The testing and transaction patterns alone save you from common pitfalls.
- skills.sh installs
- 6.1K
- GitHub stars
- 300.3K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add affaan-m/ecc --skill nestjs-patterns --agent claude-codeInstalls into .claude/skills of the current project.
Files
NestJS Development Patterns
Production-grade NestJS patterns for modular TypeScript backends.
When to Activate
- Building NestJS APIs or services
- Structuring modules, controllers, and providers
- Adding DTO validation, guards, interceptors, or exception filters
- Configuring environment-aware settings and database integrations
- Testing NestJS units or HTTP endpoints
Project Structure
src/
├── app.module.ts
├── main.ts
├── common/
│ ├── filters/
│ ├── guards/
│ ├── interceptors/
│ └── pipes/
├── config/
│ ├── configuration.ts
│ └── validation.ts
├── modules/
│ ├── auth/
│ │ ├── auth.controller.ts
│ │ ├── auth.module.ts
│ │ ├── auth.service.ts
│ │ ├── dto/
│ │ ├── guards/
│ │ └── strategies/
│ └── users/
│ ├── dto/
│ ├── entities/
│ ├── users.controller.ts
│ ├── users.module.ts
│ └── users.service.ts
└── prisma/ or database/
- Keep domain code inside feature modules.
- Put cross-cutting filters, decorators, guards, and interceptors in
common/. - Keep DTOs close to the module that owns them.
Bootstrap and Global Validation
Sponsors
Details
- Repository
- github.com/affaan-m/ecc
- Category
- Code Review & Quality
- First seen
- Jul 14, 2026
More from affaan-m/ecc
All 263- Seo6.1K
- Django Security6.1K
- Git Workflow6K
- Python Testing6K
- Strategic Compact6K
- Design System6K
- Browser Qa6K
- Springboot Security6K
- Search First6K
- Nextjs Turbopack6K
- Brand Voice6K
- Jira Integration6K
- Laravel Tdd6K
- Fastapi Patterns6K
- Remotion Video Creation6K
- React Patterns5.9K
- Perl Security5.9K
- Kotlin Coroutines Flows5.9K
- React Performance5.9K
- Kotlin Patterns5.9K
- Architecture Decision Records5.9K
- Deployment Patterns5.8K
- React Testing5.8K
- Pytorch Patterns5.8K