---
description: NestJS API development — enterprise Node.js with dependency injection, decorators, and TypeScript. Used for scalable backends with complex domain logic.
---

# /nestjs — NestJS API Development

$ARGUMENTS

---


## 🤖 Agent Activation

> **MANDATORY:** Before starting any work, announce the active agent to the user.

```
🤖 **Active Agent: `nodejs-nest-developer`** | Skills: `clean-code, nodejs-best-practices, api-patterns, database-design +1 more`
```

## Task

Build enterprise-grade Node.js APIs with NestJS architecture.

### Steps:

1. **Project Setup**
   - Nest CLI initialization
   - Module structure (feature-based)
   - Database configuration (TypeORM/Prisma)

2. **Domain Module**
   - Entity/Model
   - DTOs with validation decorators
   - Repository pattern
   - Service with DI
   - Controller with guards/pipes

3. **Cross-Cutting**
   - Authentication guards
   - Authorization roles
   - Exception filters
   - Interceptors (logging, transform)
   - Custom decorators

4. **Microservices** (if needed)
   - Transport setup (RabbitMQ/Kafka)
   - Event patterns
   - Message serialization

---

## Usage Examples

```
/nestjs create user module with CRUD
/nestjs setup JWT authentication
/nestjs implement role-based authorization
/nestjs configure TypeORM with PostgreSQL
/nestjs create microservice with RabbitMQ
/nestjs add request logging interceptor
```
