Git Product home page Git Product logo

minishop-backend's Introduction

Minishop backend

Microservice-based webshop backend.

๐Ÿš€ Tech stack

  • RabbitMQ
  • SAGA Choreography pattern
  • Microservice apps in NodeJS, PHP, Python and Java

๐ŸŽฏ Motivation

I created this project to dive into the microservice patterns and RabbitMQ best practices. The goal was to implement a webshop backend with only mock functionality and in-memory databases, focusing on the SAGA Choreography pattern and RabbitMQ configurations in different programming languages.

๐Ÿ’ก Features

  • RabbitMQ communication between microservices
  • Microservices:
    • Cart service:
      • Stack: NodeJS, ExpressJS
      • Functionality: Receives POST /checkout request
    • Order service:
      • Stack: NodeJS, NestJS
      • Functionality: Creates, completes and cancels orders
    • Payment service:
      • Stack: PHP, Laravel
      • Functionality: Makes payments
    • Shipping service:
      • Stack: Python
      • Functionality: Makes shippings
    • Mail service:
      • Stack: Java, Spring Boot
      • Functionality: Sends emails



App workflow

Microservice setup

microservices

Exchanges

name type
carts topic
orders topic
payments topic
shippings topic
emails topic

Queue bindings

exchange routing key name
carts cart.checkout orders.create-order
orders order.created payments.make-payment
orders order.completed emails.send-order-completed-notification
orders order.cancelled emails.send-order-cancelled-notification
payments payment.success shippings.create-shipping
payments payment.failed orders.cancel-order
payments payment.failed emails.send-payment-failed-notification
shippings shipping.success orders.complete-order
shippings shipping.failed orders.cancel-order
shippings shipping.failed payments.cancel-payment
shippings shipping.failed emails.send-shipping-failed-notification

Test

Payment

card number result
3232323232323232 Payment will be failed immediately
4242424242424242 Payment will be failed with 3 second delay
5252525252525252 Payment will succeed with 3 second delay
Any other card number Payment will succeed immediately

minishop-backend's People

Contributors

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