Apply NestJS architecture patterns to build maintainable production-ready TypeScript backends.
Copy the install command and let the AI configure it · recommended for beginners
Please install the "nestjs-patterns" skill from askskill: 1. Download https://raw.githubusercontent.com/affaan-m/ECC/main/skills/nestjs-patterns/SKILL.md 2. Save it as ~/.claude/skills/nestjs-patterns/SKILL.md 3. Reload skills and tell me it's ready
Using NestJS best practices, design a backend architecture for an e-commerce system, including module boundaries, controllers, services, DTOs, guards, interceptors, and configuration management, and explain the folder structure.
A clear layered NestJS architecture plan with module responsibilities, folder structure, and key implementation guidance.
Create a NestJS example for user registration and login, including controllers, services, DTO validation, a unified response format, and exception handling.
A reusable API code template covering request validation, business logic structure, and consistent error handling.
Review the key production practices for a NestJS project, focusing on configuration management, auth guards, logging interceptors, environment variables, security recommendations, and testability.
A production-readiness checklist that improves maintainability, security, and deployment stability.
Production-grade NestJS patterns for modular TypeScript backends.
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/
common/.async function bootstrap() {
const app = await NestFactory.create(AppModule, { bufferLogs: true });
app.useGlobalPipes(
new ValidationPipe({
whitelist: true,
forbidNonWhitelisted: true,
transform: true,
transformOptions: { enableImplicitConversion: true },
}),
);
app.useGlobalInterceptors(new ClassSerializerInterceptor(app.get(Reflector)));
app.useGlobalFilters(new HttpExceptionFilter());
await app.listen(process.env.PORT ?? 3000);
}
bootstrap();
whitelist and forbidNonWhitelisted on public APIs.@Module({
controllers: [UsersController],
providers: [UsersService],
exports: [UsersService],
})
export class UsersModule {}
@Controller('users')
export class UsersController {
constructor(private readonly usersService: UsersService) {}
@Get(':id')
getById(@Param('id', ParseUUIDPipe) id: string) {
return this.usersService.getById(id);
}
@Post()
create(@Body() dto: CreateUserDto) {
return this.usersService.create(dto);
}
}
@Injectable()
export class UsersService {
constructor(private readonly usersRepo: UsersRepository) {}
async create(dto: CreateUserDto) {
return this.usersRepo.create(dto);
}
}
export class CreateUserDto {
@IsEmail()
email!: string;
@IsString()
@Length(2, 80)
name!: string;
@IsOptional()
@IsEnum(UserRole)
role?: UserRole;
}
class-validator.@UseGuards(JwtAuthGuard, RolesGuard)
@Roles('admin')
@Get('admin/report')
getAdminReport(@Req() req: AuthenticatedRequest) {
return this.reportService.getForUser(req.user.id);
}
@Catch()
export class HttpExceptionFilter implements ExceptionFilter {
catch(exception: unknown, host: ArgumentsHost) {
const response = host.switchToHttp().getResponse<Response>();
const request = host.switchToHttp().getRequest<Request>();
if (exception instanceof HttpException) {
…
Record polished web app UI demo videos for walkthroughs, tutorials, and showcases.
Refine retrieved context iteratively to improve subagent understanding and output quality.
Unify multi-channel notifications for routing, deduplication, escalation, and inbox consolidation.
Audit, plan, and implement SEO improvements for better search visibility.
Create iOS liquid glass interfaces with dynamic visuals and interactive morphing.
Fetches up-to-date framework docs for setup, APIs, and code examples.
Build MCP-compliant AI tool servers quickly with a NestJS module.
Learn Django architecture, DRF API design, and production-ready development practices.
Apply Nuxt 4 patterns for SSR safety, performance, and data fetching.
Learn FastAPI best practices for architecture, auth, service layers, and testing.
Build authenticated MCP servers in NestJS using familiar controller decorators.
Get idiomatic C# and .NET guidance for architecture, async, and dependency injection.