Domain-Driven Design Principles
Complete Guide to DDD Architecture and Patterns
Domain-Driven Design (DDD) is an approach to software development that centers the development on programming a domain model that has a rich understanding of the processes and rules of a domain. DDD emphasizes collaboration between technical and domain experts to create software that accurately reflects the business domain.
// Entity: Has identity
private readonly orderId: OrderId; // Identity
constructor(orderId: OrderId) {
private moneyTransferPolicy: MoneyTransferPolicy
fromAccountId: AccountId,
toAccountId: AccountId,
Frequently asked questions
What is Domain-Driven Design?
// Notify other bounded contexts
How does the inventory service handle item reservations?
await this.inventoryService.reserveItems?
What role does the email service play in confirming orders?
await this.emailService.sendConfirmation?
What does a typical DDD layered architecture look like?
// Typical DDD layered architecture
▶ Try it live
Everything above runs in your browser — open Hash Function Avalanche Visualizer and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.