Domain-Driven Design
Software development approach for complex needs by connecting the implementation to an evolving model.
Contents
Sample Projects
.NET (C#/F#)
Full ASP.NET Core 3.1 reference application from Microsoft showing monolithic deployment architecture
solution presents usage of DDD tactical patterns to achieve better readability and expressiveness of the code. Applying DDD patterns together with ubiquitous language closes the gap between language spoken by experts and the team and language used in the code.
Domain Driven Design, CQRS, & Event Sourcing Example using GetEventStore, CommonDomain, NServiceBus, Entity Framework, SQL Server, SignalR.
An event based Micro ERP.
ContosoUniversity on ASP.NET Core with Full .NET Framework.
Sample implementation and comparison of various approaches to building DDD applications. Useful as a baseline to quickly start a DDD .net project.
(C#) - a .NET skeleton project to introduce the concepts of Domain Driven Design and loosely coupled layers.
Examples of implementation CQRS with Event Sourcing - evolutionary approach (no CQRS, separate models and commands with the same model, separate models and commands with separate models, separate storage engines, event sourcing).
Email marketing ASP.NET Core MVC and ASP.NET MVC demo app demonstrating CoreDdd usage
Full ASP.NET Core 3.1 application with Clean Architecture, DDD, CQRS and Event Sourcing concepts
eShop fullstack example featuring catalog, basket, checkout, and order bounded contexts
Example of Domain Driven Design for the game of checkers. There are two files: a scratch file with a series of designs, and a final version.
samples and resources about Event Sourcing and CQRS in .NET. Contains also a self-paced kit of how to built own Event Store
DDD, CQRS, and Event-Sourcing example and contains following technology stack: EventFlow, EventStore, RabbitMQ, MongoDB, PostgreSQL, Docker
These are the sample Bounded Contexts for C#.NET from the book "Implementing Domain-Driven Design" by Vaughn Vernon.
Modular application built with Clean Architecture and DDD principles which is ready to quickly get splitted into microserves.
Sample code from CQRS Journey.
Full Modular Monolith .NET application with Domain-Driven Design approach.
Starter template for a modular application in Clean Architecture DDD style with synchronous interaction between modules within single transaction. Perfect for ERP applications.
.NET Core REST API CQRS implementation with raw SQL and DDD using Clean Architecture.
Sample app demonstrating the use of Cucumber + GO for a BDD testing approach. Blog post can be found here.
This is an attempt to port the DDD Sample App to idiomatic Go. It can be run in a dockerized mode for previewing the application.
Complete serverless application to show how to apply DDD, Clean Architecture, and CQRS by practical refactoring of a Go project. A full blog series about it can be found at <https://threedots.tech/>.
Sample DDD application implementing the 4 layers (Domain, Infrastructure, Application and Interface) and considering two domain patterns. There's a blog article written for it here.
Just another sample application implementing the four layers of DDD.
API implementation with full CRUD using a SOLID, Hexagonal Architecture. There is a series of blog post written for it at <https://blog.friendsofgo.tech/>.
PoC for a patients API using the hexagonal architecture pattern.
A boilerplate project for DDD in Azure using a custom handler and Cosmos DB for event sourcing
Haskell todo list reactive application with DDD, CQRS and Event Sourcing, FRP.
Dependently typed implementation of the Domain Modeling Made Functional book. An example project how to formalize Bounded Context and Workflow diagram with dependent types. A NodeJS deployable demo.
Complete working example of using Domain Driven Design (DDD), Hexagonal Architecture, CQRS, Event Sourcing (ES), Event Driven Architecture (EDA), Behaviour Driven Development (BDD) using TypeScript and NestJS generated using the Bitloops Language (BL).
Demo project to implement the CQRS and Event Sourcing patterns in Scala-Akka.
sample project of a library driven by real business requirements. Modular monolith implemented with the help od DDD, BDD, EventStorming, Example Mapping, CQRS, and more.
DDD-CQRS sample v2.0 project that helps you with starting out advanced domain modeling using Spring, JPA and testing.
"Do It Yourself" DDD workshop and a sample DDD application at the same time. Based on a project managing domain.
A simplified (in memory) example of Event Sourcing and CQRS implementation for Java code (modeled for banking domain use cases).
A pragmatic application of Event Sourcing and CQRS in Java with good references for common related problems, e.g. event ordering and idempotency.
Sample event sourced application with Command Query Responsibility Segregation
These are the sample Bounded Contexts from the book "Implementing Domain-Driven Design" by Vaughn Vernon.
Examples of implementation CQRS with Event Sourcing - evolutionary approach (no CQRS, separate models and commands with the same model, separate models and commands with separate models, separate storage engines, event sourcing).
A concrete sample to go through EventStorming workshop and implement DDD tactical design pattern in Java, apply AWS cloud native services to build up business Event based Coffeeshop scenario.
Sample DDD project using Spring Boot (originally hosted in http://dddsample.sourceforge.net/)
This project demonstrates how you can develop applications with the Jakarta EE platform using widely adopted architectural best practices like Domain-Driven Design (DDD). The code is intended to mirror a non-trivial application that developers in the real work would work on. It attempts to demonstrate first-hand how you can use Jakarta EE to effectively meet practical enterprise concerns such as productivity, agility, testability, flexibility, maintainability, scalability and security. The project is directly based on the well known original Java DDD sample application developed by DDD pioneer Eric Evans' company Domain Language and the Swedish software consulting company Citerus.
PHP
DDD CQRS ADR hexagonal architecture implementation built with PHP 7 and Symfony 5.
PHP 7 Version of the cargo sample used in Eric Evans DDD book
Free eBooks
Training Courses
Community Resources
A Discord (old Slack) team for those who want to chat about Domain-Driven Design, CQRS, Event Sourcing and sometimes random things. Main channel is language and framework agnostic.
Advanced Topics in Event Sourcing / CQRS / DDD list compiled and maintaned by @sebastianharko.
Libraries and Frameworks
GO
.NET event sourced domain driven design model via NServicebus and GetEventStore.
Lightweight infrastructure for doing eventsourcing using aggregates.
This library helps to create ValueObjects (even with collection properties) with properly implemented equality behavior.
Middleware to handling commands over HTTP; typically used in CQRS applications.
Command Query Separation for ASP.NET Core AWS Lambda Azure Functions Google Cloud Functions ASP.NET Web API 2
Set of open-source .NET libraries helping with DDD and CQRS, with NHibernate persistence
Async/await first CQRS+ES and DDD framework for .NET http://geteventflow.net/.
A library to facilitate communication between CommandService and QueryService. The Idea is when any event occures in commandService, it should be persisted in QueryService in MongoDb.
A set of libraries for CQRS and Event Sourcing, with a Domain-Driven Design flavor.
Postgresql as a Document Database and Event Store for .Net Applications.
Supports request/response, commands, queries, notifications and events, synchronous and async with intelligent dispatching via C# generic variance.
Described in this video: The Beating Heart of CQRS, or Actor-Based Message Routing on the CLR by Paulmichael Blasucci at the New York F# .NET User Group.
A persistence library used to abstract different storage implementations when using event sourcing as storage mechanism.
Projac is a set of projection libraries that allow you to write projections targetting various backing stores.
An simple,elegant and useful Domain-Driven Design and CQRS framework developed using .NET Core 2.0.
Databases
Elixir
Command handling middleware for CQRS/ES applications, Pure Functional Data Structures for Aggregates and Process Managers, Point-to-Point message routing, and much more in Elixir (Erlang VM) - All in Actor concurrency model.
JavaScript / TypeScript
JVM
PHP
Python
Mature, stable Python library for event sourcing and DDD. Supports wide variety of databases, different kinds of orderings of domain events, application level encryption, snapshotting, optimistic concurrency control, and process events. Applications, and entire systems of applications, can be defined independently of infrastructure, and run in different ways (single threaded, multi-threaded, clocked, stepping, multi-process, actor model) and with different infrastructure.
Quickly create DDD Python patterns, Event-Based Systems, CRUD applications. Set of Python patterns for database access that support SQLAlchemy, MongoDB, Redis, or Pure Python. PyAssimilator allows you to write code without dependencies, meaning you can switch SQL to NoSQL without changing a single file in your system.