<< All versions
Skill v1.0.0
currentAutomated scan100/100jxoesneon/ciel/nestjs-backend-development
──Details
PublishedSeptember 28, 2026 at 03:51 AM
Content Hashsha256:8d7092289686307e...
Git SHA
──Files
Files (1 file, 1.8 KB)
SKILL.md1.8 KBactive
SKILL.md · 38 lines · 1.8 KB
version: "1.0.0" name: nestjs-backend-development description: Modular NestJS architecture, DTO validation, Guards, and Type-Safe backend patterns. license: MIT metadata: ciel-version: 1.0.0 ciel-extension: ciel.yaml
CIEL ADAPTATION: NestJS Development (Modular TypeScript)
This skill formalizes the development of modular, type-safe backends using NestJS. it prioritizes dependency injection and declarative validation.
Modular Discipline
- Feature Isolation: One module per domain (e.g.,
UsersModule,AuthModule). - Thin Controllers: Controllers MUST only handle HTTP parsing, calling a Service, and returning a DTO.
- Pure Services: Put all business logic, external API calls, and DB orchestration in injectable Services.
- Common Layer: Put cross-cutting concerns (Interceptors, Filters, Decorators) in
src/common/.
Data Integrity (The DTO Pattern)
- Validation: Mandate
class-validatordecorators on all Request DTOs. - Hard Gate: Enable
whitelist: trueandforbidNonWhitelisted: truein the globalValidationPipe. - Serialization: Use
ClassSerializerInterceptorto exclude internal fields (e.g.,passwordHash) from responses.
Security & Auth
- Guards: Use
JwtAuthGuardfor session-validation. Do NOT perform resource-specific auth in guards (use Services). - Environment: Use
@nestjs/configwith a validation schema (Joi/Zod) to ensure all required env vars are present at boot.
Anti-Patterns
- Direct ORM Leakage: Returning raw Prisma/TypeORM entities directly in the controller (leaks DB schema).
- Circular Modules: Allowing
Module Ato importModule BwhileModule BimportsModule A(useforwardRef). - Global Everything: Exporting every service from every module. Export ONLY what is genuinely shared.