Skip to content

A Microservice based e-shop Sample implemented in .NET Core

License

Notifications You must be signed in to change notification settings

HesamKashefi/MicroShop

Repository files navigation

MicroShop E-Shop

This is a sample project for Microservices Architecture that I've developed just to learn by practice!

Since I've been learning by looking at the Microsoft's sample, EShopOnContainers, You'll see many similarities here to that project!

Main View:

Main View UI

Admin:

Admin UI

Build Status

Image Status
cart-api Build Cart Api
orders-api Build Orders Api
orders-singalR Build Orders SignalR
payments-api Build Payments Api
catalog-api Build Catalog Api
identity-api Build Identity Api
apiggateway Build ApiGateway
healthchecksui Build HealthChecksUI
view Build View
admin Build Admin

Some of the technologies, patterns and tools used in this project

  • #Docker
  • #ASP.NET Core
  • #SQL Server
  • #MongoDB
  • #Redis
  • #RabbitMQ
  • #gRPC
  • #OpenIddict
  • #Datalust_Seq
  • #NLOG
  • #DDD
  • #EventDrivenArchitecture
  • #CQRS
  • #ClearnArchitecture
  • #YARP
  • #Angular

How To Run

You need docker, Visual Studio 2022, .NET 7.0 SDK and node.js installed to run this project.

First replace your machine's IP in the .env file.

In this path: Src/View/Admin/ClientApp run this command: npm install -f

In Visual Studio Simply hit F5 to run and debug.

Note: Admin takes a lot of time to start but it generally depends on your machine's speed. When it gets started, replace the localhost in the address bar with your machine's IP and hit refresh.

To login use UserName/Password : hesam/hesam

Architecture

Addresses:

Service Address
View https://+:8000
Admin http://+:7011
APIGateway https://+:8001
Identity.Api https://+:8002
Catalog.Api https://+:8003
Cart.Api https://+:8004
Orders.Api https://+:8005
Orders.SignalR https://+:8006
Payments.Api https://+:8007
HealthChecks https://+:8010/hc-ui
Seq http://+:5340

View

https://+:8000

View is an AspNetCore UI

Admin

http://+:7011

Admin implemented in Angular

APIGateway

https://+:8001

The APIGateway implemented using Yarp.ReverseProxy

Identity.Api

https://+:8002

This service is responsible for Authentication.

I've used OpenIddict-Core library to create an openid connect server and SqlServer as the database.

Catalog.Api

https://+:8003

Maintains a list of products.

Built using CQRS pattern.

MongoDb is used as the database.

Cart.Api

https://+:8004

Cart/Basket information.

Redist is used as the database.

Orders.Api

https://+:8005

Orders information.

Built using CQRS pattern. SQL Server is used as the database.

Seq

http://+:5340

Datalust Seq is used to monitor application logs

HealthChecks

https://+:8010/hc-ui

Use to monitor the health of the services