ddd-patterns

Installation
SKILL.md

Domain-Driven Design (DDD): Advanced Patterns

Advanced integration patterns for handling complex distributed system interactions and transactional consistency.

🚀 Advanced Patterns

  1. CQRS (Command Query Responsibility Segregation): Separation of write (Command) and read (Query) models to optimize performance and scalability.
  2. Event Sourcing: Capturing all changes to the state of an application as a sequence of events (The current state is reconstructed from the log).
  3. Outbox Pattern: Ensuring transactional consistency between a database and a message broker. (Save to DB and a 'Message Outbox' in the same transaction).
  4. ACL (Anti-Corruption Layer): Translating and isolating external systems' models to maintain the integrity of your core domain model.

⚡ CQRS + Event Sourcing Workflow

  1. Command Side: Receives request -> Aggregate Root (AR) validates -> AR emits Event -> Event saved to Event Store.
  2. Projection Side: Projector listens to Events -> Updates Read Model (Optimized for queries: e.g., Elasticsearch, Read DB).
  3. Query Side: Reads from Read Model only.

🚫 Advanced Anti-Patterns

Related skills
Installs
6
Repository
kinhluan/skills
GitHub Stars
1
First Seen
Mar 15, 2026