Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/chinh00/cshop

Microservice Learning Project
https://github.com/chinh00/cshop

cicd domain-driven-design dotnet event-sourcing eventdrivenarchitecture kafka masstransit microservices sonarqube

Last synced: 3 days ago
JSON representation

Microservice Learning Project

Awesome Lists containing this project

README

        

# Overview project 🎇
![Screenshot 2024-11-06 at 13 04 34](./assets/383426968-9017703a-d7d5-4092-b27a-93dd498e3415.png)

# Technical stack 🔥

✔ Using [`Mediator`](https://github.com/jbogard/MediatR) for read and write in database

✔ Using [`FluentValidation`](https://docs.fluentvalidation.net/en/latest/) for validate request and a Validation Pipeline Behaviour on top of MediatR

✔ Using [`Kafka`](https://kafka.apache.org/) for communicate services

✔ Using [`Debezium`](https://debezium.io/) for CDC [`Sqlserver`](https://www.microsoft.com/en-us/sql-server/sql-server-downloads) implement `OutboxPattern`

✔ Using [`SchemaRegistry`](https://docs.confluent.io/platform/current/schema-registry/index.html) persist version message

✔ Using [`Redis`](https://redis.io/) for caching data

✔ Using [`Yarp`](https://microsoft.github.io/reverse-proxy/) as a microservices gateway

✔ Using `Minimal API` for all endpoints

✔ Using `Docker compose` for our deployment mechanism

✔ Using `gRPC` for internal communication between our microservices

# Instruction 🙄

| Service | Status |
|----------------------|---------|
| Catalog service | Success |
| Order service | Success |
| Basket service | Success |
| Identity service | Success |
| Notification service | Pending |
| Search service | Pending |
| Web client | Pending |

# How to run project 🏃🏻
* Create folder certs and create file https.pfx (for https into communication grpc)
* Using dev-certs tools dotnet
```shell
dotnet dev-certs -ep ./certs/https.pfx -p
```
* Using openssl
```shell

```

* Create file `.env` with your environments
```dotenv
MSSQL_PASSWORD=@P@ssw0rd02
Dabatabase_Name=sqlserver


ConnectionStrings__Db=Server=sqlserver;Database=Db;Encrypt=false;User Id=sa;Password=@P@ssw0rd02
SchemaRegistry__Url=http://schema-registry:8085

```

And after run command into terminal
```shell
docker compose -f docker-compose.yml up -d
```
# Review code with SonarQube 😀
Url: https://de7c-113-190-242-151.ngrok-free.app/

Uname/upass: cshopuser/Admin123123!@
![image](./assets/Screenshot%202024-12-10%20at%2021.19.33.png)