nestjs-expert

Implement modular NestJS architectures for TypeScript backend applications.

Updated Mar 17, 2026
One-click install
npx skills add https://github.com/Estom/aiflex --skill nestjs-expert-estom
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nestjs-expert
Source: https://github.com/Estom/aiflex/tree/main/skills-repo/Jeffallan-skills/nestjs-expert
Command: npx skills add https://github.com/Estom/aiflex --skill nestjs-expert-estom

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Provides senior-level guidance, patterns, and templates to design and implement modular, testable, and secure NestJS TypeScript backends, removing common architecture mistakes and accelerating feature delivery.

Core Features & Use Cases

  • Expert module, controller, and service patterns using NestJS dependency injection to enforce separation of concerns and avoid circular dependencies.
  • DTO design and validation patterns with class-validator and class-transformer, plus global ValidationPipe configuration.
  • Authentication and authorization scaffolding using JWT and Passport, including JwtStrategy, guards, role checks, and global guard application.
  • Database integration patterns for TypeORM and Prisma, repository/provider organization, and migration guidance.
  • Testing strategy with Jest and Supertest for unit and e2e tests, mocking repositories and creating test modules.
  • Migration playbooks for moving Express apps to NestJS (Strangler Fig, adapter patterns) and common pitfalls to avoid.

Quick Start

Scaffold a new NestJS module with a controller, service, DTOs using class-validator, JWT authentication, and unit tests for the service.

Frequently Asked Questions about nestjs-expert

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a modular NestJS backend with dependency injection?

Build modular NestJS backends by structuring controllers, services, and DTOs into isolated modules that leverage dependency injection. This enforces separation of concerns and prevents circular dependencies in TypeScript applications.

What's the best way to set up JWT authentication in a NestJS app?

Set up JWT authentication in NestJS using Passport strategies. Implement JwtStrategy, apply role-based guards, and configure global guard application to scaffold secure authentication and authorization flows for backend services.

Does this NestJS architecture pattern support both TypeORM and Prisma?

Yes, the NestJS architecture patterns support both TypeORM and Prisma. You can organize repositories and providers effectively using dedicated integration patterns and migration guidance for either database ORM in TypeScript.

How do I validate DTOs in NestJS using class-validator?

Validate DTOs in NestJS by designing data transfer objects with class-validator and class-transformer. Apply a global ValidationPipe configuration to automatically enforce validation rules across incoming requests.

How do I migrate an Express application to NestJS?

Migrate Express applications to NestJS using the Strangler Fig pattern and adapter patterns. This playbook method incrementally adopts NestJS modular architectures while highlighting common pitfalls to avoid during backend migration.

How do I write unit and e2e tests for NestJS controllers and services?

Write NestJS tests using Jest and Supertest. Create dedicated test modules, mock repository dependencies for unit tests, and execute end-to-end HTTP requests to validate controllers and services effectively.