TodoApp Backend in .NET Core 2.2 with DDD, CQRS and EventSourcing approach
I work on this project in order to understand DDD concepts and EventSourcing.
I used no DDD frameworks or anything else. The EventStore is hand-coded and very simple. There are 2 implementations. One saves the events to a text file and the other one works as in-memory list. I did this on purpose in order to keep it as simple as possible.
Solution structure is:
The domain is the innermost core of the solution. It depends on nothing. Aggregates, DomainEvents and pure business logic is placed here.
Command handler, query handler and mapping logic does live here.
Just interfaces and DTOs.
EventStore implementation lives here.
Web / Api
From here only App.Contracts is referenced. The domain is not visible from here. Only the commands/querys are known here and are used to forward them to their handlers. But only the interface of handlers is known here.
You can test the api via TodoBackend.com:
This sticks together all dependencies and adds them to the dependency container by hand.