stack-profile:ddd-nestjs-stack
Domain-Driven Design — DDD (TypeScript, NestJS, Prisma, PostgreSQL, Docker, Vitest) overview
A TypeScript application built on Domain-Driven Design tactical patterns, where NestJS modules represent bounded contexts containing aggregates, value objects, domain events, and repository interfaces. Prisma implements the repository pattern for PostgreSQL persistence, mapping between domain models and database schemas. Domain services encapsulate cross-aggregate operations, while application services orchestrate use cases. Vitest tests the domain layer in isolation, verifying invariants and event emission without infrastructure dependencies. Docker Compose runs the full environment. The tradeoff is substantial upfront modeling effort and the risk of over-engineering simple CRUD operations, but for genuinely complex domains the pattern prevents the "big ball of mud" that plagues long-lived codebases.
Attributes
Outgoing edges
- domain:software-engineering·DomainSoftware Engineering
- domain:backend·DomainBackend
- language:typescript·LanguageTypeScript
- framework:nestjs·FrameworkNestJS
- library:prisma·LibraryPrisma
- library:zod·LibraryZod
- library:express·LibraryExpress
- tool:vitest·ToolVitest
- tool:docker·ToolDocker
- tool:docker-compose·ToolDocker Compose
- language:sql·LanguageSQL
- workflow:event-storming-session·WorkflowEvent Storming Session
- workflow:architecture-decision·WorkflowArchitecture Decision
- skill-area:domain-driven-design·SkillAreaDomain-Driven Design
- skill-area:event-sourcing·SkillAreaEvent Sourcing
- skill-area:backend-api-design·SkillAreaBackend API Design
- skill-area:unit-testing·SkillAreaUnit Testing
- skill-area:schema-evolution·SkillAreaSchema Evolution
- role:backend-engineer·RoleBackend Engineer
- role:architect·RoleArchitect
- role:tech-lead·RoleTech Lead