← ClaudeAtlas

dddlisted

Domain-Driven Design patterns. Bounded contexts, aggregates, entities, value objects, domain events, repositories, and application services. Strategic and tactical DDD for complex business domains. USE WHEN: user mentions "DDD", "Domain-Driven Design", "bounded context", "aggregate", "value object", "domain event", "ubiquitous language", "aggregate root", "domain service" DO NOT USE FOR: database schema design - use database skills; CQRS/Event Sourcing specifics - use `event-sourcing-cqrs`
claude-dev-suite/claude-dev-suite · ★ 33 · AI & Automation · score 80
Install: claude install-skill claude-dev-suite/claude-dev-suite
# Domain-Driven Design ## Strategic DDD ``` ┌─────────────────┐ ┌─────────────────┐ │ Order Context │────▶│ Payment Context │ │ (core domain) │ │ (supporting) │ └────────┬────────┘ └─────────────────┘ │ ▼ ┌─────────────────┐ ┌─────────────────┐ │ Inventory Context│ │ Notification Ctx │ │ (supporting) │ │ (generic) │ └─────────────────┘ └─────────────────┘ ``` ## Tactical DDD (TypeScript) ### Entity ```typescript class Order { private constructor( readonly id: OrderId, private items: OrderItem[], private status: OrderStatus, private readonly createdAt: Date, ) {} static create(items: OrderItem[]): Order { if (items.length === 0) throw new DomainError('Order must have at least one item'); return new Order(OrderId.generate(), items, OrderStatus.PENDING, new Date()); } get total(): Money { return this.items.reduce((sum, item) => sum.add(item.subtotal), Money.zero('USD')); } confirm(): DomainEvent[] { if (this.status !== OrderStatus.PENDING) throw new DomainError('Can only confirm pending orders'); this.status = OrderStatus.CONFIRMED; return [new OrderConfirmed(this.id, this.total)]; } } ``` ### Value Object ```typescript class Money { private constructor(readonly amount: number, readonly currency: string) { if (amount < 0) throw new DomainError('Amount cannot be negative'); } static of(amount: number, currency: string): Money { retu