Code Monkey home page Code Monkey logo

aspnetcore-microservices's Introduction

Online Mobile Catalog - a microservice-powered shopping portal

A sample shopping website based on Microservices architecture. This application incorporates multiple microservices like:

  • Catalog API
  • Basket API
  • Discount API
  • Order API

that are aggregated using an Aggregator pattern.

An API gateway exposes the relative endpoints for performing API actions like adding items to the basket, displaying the product catalogue and placing an order by calling the required microservice endpoint(s). The API gateway acts as a Backend for Front (BFF pattern) end that allows restricted access to the microservices only exposed via the gateway.

Design patterns used in this Microservices architecture:

Pattern Name: Project

  • API Gateway: Ocelot.ApiGw
  • Aggregator: Shopping.Aggregator
  • Backend for Front-end: Shopping.Aggregator
  • Database per Service: The Basket, Catalog and Ordering microservices have their own version of the database
  • Command Query Responsibility Segregation (CQRS): Ordering microservice implements CQRS pattern internally
  • Mediator: Ordering microservice uses Mediator pattern to fire commands and queries from the API controller to the application layer
  • Event-Driven Architecture: The Basket.API project publishes an event using MassTransit message broker on RabbitMQ instance. Checkout action in Ordering.API is subscribed to the checkout fired by Basket.API which as a result invokes SendMail action via the EmailService.

The UI part is a simple MVC website that communicates with the API gateway for performing portal operations like displaying and ordering products.

Technologies and packages used:

  • .NET Core 6
  • Ocelot API gateway
  • Rabbit MQ with Mass transit
  • Docker containers
  • Dapper
  • Redis
  • Mongo DB
  • Protobuf with messages over gRPC
  • Fluent Validations
  • Entity Framework Core 7
  • Automapper
  • MediatR

aspnetcore-microservices's People

Contributors

dev-victory avatar

Stargazers

 avatar  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.