GithubHelp home page GithubHelp logo

uslperera / cqrsandmediator-microservice Goto Github PK

View Code? Open in Web Editor NEW

This project forked from armandj77-zz/cqrsandmediator-microservice

0.0 1.0 0.0 157 KB

A microservice architecture template which implements the CQRS and Mediator patterns

Home Page: https://armandjordaan.com

License: MIT License

C# 98.07% Dockerfile 1.93%

cqrsandmediator-microservice's Introduction

.NET Core HitCount License: MIT

MICROSERVICE TEMPLATE FOR CQRS AND MEDIATOR PATTERNS

WHAT PROBLEM DOES THIS SOLVE

This origionally started as a demo project for my medium article Why and how I implemented CQRS and Mediator patterns in a microservice.

This repo focuses on providing a C# dotnet core 3.1 microservice template with all the boilerplate setup completed, which enables the developer to start implementing their domain asap without having to go through the new service setup and the teething issues that goes along with it.

PATTERNS

  • CQRS
  • Mediator
  • Layered architecture

TECH STACK

  • Dotnet core 3.1
  • EF Core
  • Postgres
  • NUnit
  • Docker
  • Docker-Compose
  • RabbitMQ
  • Hangfire with Postgres as the backing store

GETTING STARTED

Docker

When Development/Testing

docker-compose -f docker-compose.testing.yml up -d

NOTE: You can change the db name in the Microservice.Db project remember to also update the connection settings in the Microservice.Api appsettings.json

Additional Links

What it does:

A dotnet CLI tool which follows the CQRS and Mediator patterns to auto generate commands, queries, responses and handlers in the domain layer using Roslyn API for code generation.

Roadmap

Features planned for next development cycle:

  • Refactor RabbitMQ and Hangfire for a more streamlined implementation
  • Move RabbitMQ Messagebroker implementation into a nuget package
  • Move Hangfire implementation into a nuget package

Future features to include:

  • Redis cache management on route level i.e cached responses
  • Redis cache management for custom resources i.e custom cache managment accross multiple handlers
  • Hangfire support for running background tasks using redis as a backing store
  • Health checks to monitor service
  • Swagger
  • GraphQL (investigate trade offs)
  • Extend DB layer with infrastructure to facilitate (long)LastModifiedBy,(UTCDateTime)LastModifiedDate,(long)CreatedBy,(UTCDateTime)CreatedDate on resource update and create
  • Extend DB layer with infrastructure to facilitate soft deletes i.e Set IsDeleted prop on a record to true
  • Extend Db layer with infrastructure to exclude IsDeleted reccords from db queries i.e add a query filter
  • Hangfire support *DONE
  • RabbitMQ support *DONE

cqrsandmediator-microservice's People

Contributors

armandjordaan77 avatar jordaanarmand avatar armandj77-zz avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.