E-Commerce Store

A Full-stack web app made with microservices, server-side rendering and event-based architecture. All the services are dockerized and deployed to kubernetes cluster hosted in Digital Ocean with CI/CD pipeline powered by GitHub actions.


See Live

On the frontend, I used React and Next JS to present content to users. Each service is created using Node and Express. Data for each service is held in either a Mongo database or Redis. The entire app is deployed and runs in Docker containers executed in a Kubernetes cluster. Finally, almost all of the code in this course is written with Typescript.

General flow of the store allows to create a ticket for sale(Ticket service). Upon creationg, tickets can be seen by other users, who can start purchase process by creating an order(Order service). When an order is created, the ticket becomes reserved and not available for purchasing by other users until an order is cancelled or expired (Expiration service). After an order is created, the user can pay for it using Stripe payment API (Payment service). Only logged in users can create new tickets or buy existing items (Auth service)

Each service is backed by a separate MongoDB instance. Communication between services is enabled by NATS Streaming Server.

Traffic is routed by ingress nginx load balancer.

Different services share some amount of code, especially express endpoints middlewares, events publishers/listeners and TypeScript type definintions.

To handle that I created a shared npm library that can be found in npm and GitHub