Skip to content
This repository has been archived by the owner on Sep 28, 2023. It is now read-only.

RianNegreiros/microservices-k8s

Repository files navigation

E-commerce Microservices

Deploy to Azure Kubernetes Services (AKS) through CI/CD Azure Pipelines

Image Status
Catalog API Build Status
Basket API Build Status
Discount API Build Status
Ordering API Build Status
Discount GRPC Build Status
Ocelot API Gateway Build Status
Shopping Agreggator Build Status
Shopping Web Build Status

Features

Catalog microservice which includes

  • ASP.NET Core Web API application
  • REST API principles, CRUD operations
  • MongoDB database connection and containerization
  • Repository Pattern Implementation
  • Swagger Open API implementation

Basket microservice which includes

  • ASP.NET Web API application
  • REST API principles, CRUD operations
  • Redis database connection and containerization
  • 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
  • Using Dapper for micro-orm implementation to simplify data access and ensure high performance
  • PostgreSQL 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 AutoMapper 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

API Gateway Ocelot Microservice

  • Implement API Gateways with Ocelot
  • Sample microservices/containers to reroute through the API Gateways
  • Run multiple different API Gateway/BFF container types
  • The Gateway aggregation pattern in Shopping.Aggregator

WebUI ShoppingApp Microservice

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

How to run

Prerequesites

1 - At the root directory which include docker-compose.yml, run:

docker-compose up --build

2 - Wait for docker compose all microservices.

3 - You can launch the microservices in the URLS below:

Web UI Screenshot