Skip to content

This repository contains multiple implementations of the CQRS and DDD Patterns. Don't hesitate to Fork the project or give your thoughts on openning Issues

Notifications You must be signed in to change notification settings

JoanyBuclon/CQRS-Architecture-Examples

Repository files navigation

CQRS Architecture Examples

This repository contains multiple implementations of the same API. You can find more details about the API in the The API part below.

All of this is based on various real-world CQRS applications and point of views (and Greg Young's work).

Branches

Each branches of this repository shows a different and gradual approach to CQRS:

The Master branch contains the most advanced version of the application and serves as a showcase for CQRS projects.

Currently on Master:

  • The example API with all routes, without Command/Query separation yet, come back later
  • Next step: separating source files in multiple projects for the sake of readability and SOLID.

The Basic-Core branch contains the API working without any traces of the CQRS or DDD patterns.

This is a first version only used for future references and comparison. Here, all source files are parts of the same project with only a simple folder separation.

Coming Next:

The Domain-Core branch will contains a simple domain and infrastructure separation as presented in the eShopOnContainers examples.

The CQRS-Core branch will contains a simple separation of Commands and Queries.

The CQRS-Event branch will contains a Command/Query with event management.

The CQRS-Event-Sourcing will contains a Command/Query with Event Sourcing and a separation between EventStore and ViewStore Databases.

The API

The above branches all exposes the same API, you can find it here or directly on the API after launching it at http://localhost:yourport/swagger. This is a simplified view of the exposed methods:

Blog API

  • /articles (Add, Update, View, Delete, View Last 5, View all from Author)
  • /authors (View)
  • /comments (Add, View all from Article)

Objects

  • Article (Id, Title, Content, CreationDate, AuthorId)
  • Comment (Id, Content, CreationDate, AuthorName, ArticleId)
  • Author (Id, Name, RegisterDate)

Additionnal Notes

This is work in progress for now, check back later!

Tools used during the development:

Source for some Pattern Ideas:

About

This repository contains multiple implementations of the CQRS and DDD Patterns. Don't hesitate to Fork the project or give your thoughts on openning Issues

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages