What problem does it solve? Structuring complex business domains in NestJS applications becomes unmanageable without clear architectural boundaries, leading to tangled business logic, inconsistent terminology, and hard-to-test code. This Skill provides tactical and strategic DDD patterns to organize entities, aggregates, value objects, repositories, CQRS handlers, and domain events into a maintainable layered architecture. ## Core Features & Use Cases - Tactical DDD Patterns: Implement entities with identity and lifecycle, immutable value objects (Money, Email, Address, DateRange), and aggregates that enforce invariants and raise domain events. - CQRS and Event-Driven Architecture: Separate command and query handlers using @nestjs/cqrs, publish domain events after persistence, and build read models or event sourcing stores for audit trails. - Repository Abstraction: Define repository interfaces in the domain layer with Prisma implementations, specification patterns for complex queries, and in-memory repositories for testing. - Use Case: When building an order management module, use this Skill to design an Order aggregate with OrderItem child entities, a Money value object, a PrismaOrderRepository, and OrderPlacedEvent handlers for notifications and loyalty points. ## Quick Start Ask the assistant to design a DDD-based order module with entities, value objects, CQRS handlers, and a Prisma repository for your NestJS project.