랭킹으로 돌아가기

Microservices on .NET platforms used ASP.NET Web API, Docker, RabbitMQ, MassTransit, Grpc, Yarp API Gateway, PostgreSQL, Redis, SQLite, SqlServer, Marten, Entity Framework Core, CQRS, MediatR, DDD, Vertical and Clean Architecture implementation with using latest features of .NET 8 and C# 12

aspnet-coredockerocelot-gatewaymicorservicesaspnetcore-microservicesrabbitmqmongodbredissql-servercqrs-patternclean-architectureevent-sourcing
스타 성장
스타
3.2k
포크
1.7k
주간 성장
이슈
32
1k2k3k
2019년 4월2021년 9월2024년 2월2026년 7월
README

UDEMY COURSE WITH DISCOUNTED - Step by Step Development of this Repository -> https://www.udemy.com/course/microservices-architecture-and-implementation-on-dotnet/?couponCode=MARC26

See the overall picture of implementations on microservices with .net tools on real-world e-commerce microservices project;

microservices

There is a couple of microservices which implemented e-commerce modules over Catalog, Basket, Discount and Ordering microservices with NoSQL (DocumentDb, Redis) and Relational databases (PostgreSQL, Sql Server) with communicating over RabbitMQ Event Driven Communication and using Yarp API Gateway.

Check Explanation of this Repository on Medium

Whats Including In This Repository

We have implemented below features over the run-aspnetcore-microservices repository.

Catalog microservice which includes;

  • ASP.NET Core Minimal APIs and latest features of .NET8 and C# 12
  • Vertical Slice Architecture implementation with Feature folders and single .cs file includes different classes in one file
  • CQRS implementation using MediatR library
  • CQRS Validation Pipeline Behaviors with MediatR and FluentValidation
  • Use Marten library for .NET Transactional Document DB on PostgreSQL
  • Use Carter for Minimal API endpoint definition
  • Cross-cutting concerns Logging, Global Exception Handling and Health Checks

Basket microservice which includes;

  • ASP.NET 8 Web API application, Following REST API principles, CRUD
  • Using Redis as a Distributed Cache over basketdb
  • Implements Proxy, Decorator and Cache-aside patterns
  • Consume Discount Grpc Service for inter-service sync communication to calculate product final price
  • Publish BasketCheckout Queue with using MassTransit and RabbitMQ

Discount microservice which includes;

  • ASP.NET Grpc Server application
  • Build a Highly Performant inter-service gRPC Communication with Basket Microservice
  • Exposing Grpc Services with creating Protobuf messages
  • Entity Framework Core ORM — SQLite Data Provider and Migrations to simplify data access and ensure high performance
  • SQLite database connection and containerization

Microservices Communication

  • Sync inter-service gRPC Communication
  • Async Microservices Communication with RabbitMQ Message-Broker Service
  • Using RabbitMQ Publish/Subscribe Topic Exchange Model
  • Using MassTransit for abstraction over RabbitMQ Message-Broker system
  • Publishing BasketCheckout event queue from Basket microservices and Subscribing this event from Ordering microservices
  • Create RabbitMQ EventBus.Messages library and add references Microservices

Ordering Microservice

  • Implementing DDD, CQRS, and Clean Architecture with using Best Practices
  • Developing CQRS with using MediatR, FluentValidation and Mapster packages
  • Consuming RabbitMQ BasketCheckout event queue with using MassTransit-RabbitMQ Configuration
  • SqlServer database connection and containerization
  • Using Entity Framework Core ORM and auto migrate to SqlServer when application startup

Yarp API Gateway Microservice

  • Develop API Gateways with Yarp Reverse Proxy applying Gateway Routing Pattern
  • Yarp Reverse Proxy Configuration; Route, Cluster, Path, Transform, Destinations
  • Rate Limiting with FixedWindowLimiter on Yarp Reverse Proxy Configuration

WebUI ShoppingApp Microservice

  • ASP.NET Core Web Application with Bootstrap 4 and Razor template
  • Call Yarp APIs with Refit HttpClientFactory

Docker Compose establishment with all microservices on docker;

  • Containerization of microservices
  • Containerization of databases
  • Override Environment variables

Run The Project

You will need the following tools:

Installing

Follow these steps to get your development environment set up: (Before Run Start the Docker Desktop)

  1. Clone the repository
  2. Once Docker for Windows is installed, go to the Settings > Advanced option, from the Docker icon in the system tray, to configure the minimum amount of memory and CPU like so:
  • Memory: 4 GB
  • CPU: 2
  1. At the root directory of solution, select docker-compose and Set a startup project. Run docker-compose without debugging on visual studio. Or you can go to root directory which include docker-compose.yml files, run below command:
docker-compose -f docker-compose.yml -f docker-compose.override.yml up -d
  1. Wait for docker compose all microservices. That’s it! (some microservices need extra time to work so please wait if not worked in first shut)

  2. Launch Shopping Web UI -> https://localhost:6065 in your browser to view index page. You can use Web project in order to call microservices over Yarp API Gateway. When you checkout the basket you can follow queue record on RabbitMQ dashboard.

mainscreen2

Authors

See also the list of contributors who participated in this project. Check also gihtub page of repository.

관련 저장소
MoienTajik/AspNetCore-Developer-Roadmap

Roadmap to becoming an ASP.NET Core developer in 2026

asp-net-coreroadmap
19.6k2.5k
abpframework/abp

Open-source web application framework for ASP.NET Core! Offers an opinionated architecture to build enterprise software solutions with best practices on top of the .NET. Provides the fundamental infrastructure, cross-cutting-concern implementations, startup templates, application modules, UI themes, tooling and documentation.

C#GNU Lesser General Public License v3.0abpcsharp
abp.io
14.4k3.7k
dotnet/AspNetCore.Docs

Documentation for ASP.NET Core

C#Creative Commons Attribution 4.0 Internationalaspnetcoreaspnet-core
docs.microsoft.com/aspnet/core
13.1k24.7k
aspnetboilerplate/aspnetboilerplate

ASP.NET Boilerplate - Web Application Framework

C#MIT Licensec-sharpbest-practices
aspnetboilerplate.com
12k3.8k
YSGStudyHards/DotNetGuide

🌈【C#/.NET/.NET Core学习、工作、面试指南】记录、收集和总结C#/.NET/.NET Core基础知识、学习路线、开发实战、编程技巧练习、学习视频、文章、书籍、项目框架、社区组织、开发必备工具、技术前沿周刊、常见面试题、面试须知、简历模板、人才招聘、以及自己在学习和工作中的一些微薄见解。希望能和大家一起学习,共同进步。如果本知识库能为您提供帮助,别忘了给予支持哦(关注、点赞、分享)💖。

C#MIT Licensemicrosoftasp-net
yuque.com/ysgstudyhard/da6e0c
10.7k1.5k
dodyg/practical-aspnetcore

Practical samples of ASP.NET Core 11, 10, 9, 8.0, 7.0, 6.0, 5.0, 3.1, 2.2, and 2.1,projects you can use. Readme contains explanations on all projects.

C#MIT Licenseasp-net-coredotnet-core
10.4k1.4k
IdentityServer/IdentityServer4

OpenID Connect and OAuth 2.0 Framework for ASP.NET Core

C#openid-connectoauth2
identityserver.io
9.2k4k
Elfocrash/.NET-Backend-Developer-Roadmap

Roadmap for a .NET Backend Developer working with Microservices

roadmapdotnet
6.8k557
EduardoPires/EquinoxProject

Web Application ASP.NET 9 using Clean Architecture, DDD, CQRS, Event Sourcing and a lot of good practices

C#MIT Licenseequinoxcqrs
equinoxproject.azurewebsites.net
6.8k1.7k
jasontaylordev/NorthwindTraders

Northwind Traders is a sample application built using ASP.NET Core and Entity Framework Core.

C#MIT Licenseentity-framework-corenorthwind-database
5k1.6k
rafaelfgx/Architecture

.NET 10, Angular 21, Clean Architecture, Clean Code, SOLID, KISS, DRY, Mediator Pattern, Folder-by-Feature Structure

C#MIT Licensearchitecturesolid
3.3k804
mjebrahimi/Awesome-Microservices-DotNet

💎 A collection of awesome training series, articles, videos, books, courses, sample projects, and tools for Microservices in .NET

Creative Commons Zero v1.0 Universalmicroservicemicroservices
3.1k391