stack-profile:event-sourcing-cqrs
Event Sourcing / CQRS Stack (TypeScript, NestJS, PostgreSQL, Redis, Docker) overview
An event-sourced architecture implementing Command Query Responsibility Segregation (CQRS) where every state change is captured as an immutable event in an append-only event store backed by PostgreSQL. NestJS provides the application framework with its CQRS module for command handlers, event handlers, and sagas. Redis powers the read-side projections for fast query performance and caches materialized views. NATS or RabbitMQ distributes events to downstream consumers for building additional read models or triggering side effects. Docker orchestrates the multi-service deployment. This pattern excels for domains with complex business rules, audit requirements, and temporal queries (what was the state at time T?). The tradeoff is significant cognitive overhead — developers must reason about eventual consistency, event schema evolution, and projection rebuilds.
Attributes
Outgoing edges
- domain:software-engineering·DomainSoftware Engineering
- domain:backend·DomainBackend
- language:typescript·LanguageTypeScript
- framework:nestjs·FrameworkNestJS
- library:prisma·LibraryPrisma
- library:ioredis·Libraryioredis
- tool:nats·ToolNATS
- tool:docker·ToolDocker
- library:zod·LibraryZod
- tool:docker-compose·ToolDocker Compose
- workflow:event-driven-architecture-review·WorkflowEvent-Driven Architecture Review
- workflow:schema-migration·WorkflowSchema Migration
- skill-area:event-sourcing·SkillAreaEvent Sourcing
- skill-area:cqrs·SkillAreaCQRS
- skill-area:event-driven-architecture·SkillAreaEvent-Driven Architecture
- skill-area:domain-driven-design·SkillAreaDomain-Driven Design
- skill-area:backend-data-persistence·SkillAreaBackend Data Persistence
- role:backend-engineer·RoleBackend Engineer
- role:architect·RoleArchitect
- role:tech-lead·RoleTech Lead