Skip to content

Adarsh6158/E-Commerce-Microservices-Platform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

113 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🛒 ShopFlux: E-Commerce Microservices Platform

A highly scalable, production-oriented E-Commerce platform built using Spring Boot microservices, Kafka, Redis, and React Micro-Frontends.

Core Features

  • Micro-Frontend Architecture: Decoupled React frontends (Shell, Admin, Cart, Product, Search, Order).
  • Distributed Microservices: 10 independent Spring Boot services (Auth, Catalog, Inventory, Payment, etc.).
  • Event-Driven Workflows: Asynchronous communication and notifications using Apache Kafka.
  • High-Performance Caching: Distributed caching and session management using Redis.
  • Polyglot Persistence: Utilizing PostgreSQL (relational) and MongoDB (document) based on service domain needs.
  • Advanced Search: Integrated Elasticsearch for rapid, robust product querying.

Architecture

System Overview

Architecture_design

Database Design

DB Design

Tech Stack

Backend
Java   Spring Boot   Kafka

Databases & Cache
PostgreSQL   MongoDB   Redis

Frontend
React   TailwindCSS   Vite

Search & DevOps
Elasticsearch   Docker

Design Highlights

  • Database per Service Pattern: Each microservice owns its own database to ensure loose coupling.
  • Event-Driven Sagas: Kafka enables distributed transactions and asynchronous orchestration.
  • Module Federation: Frontend applications are independently deployable and loaded dynamically at runtime.

Getting Started

I have built a suite of automated terminal scripts within the /Scripts directory to make running this complex architecture incredibly simple.

1. Start the Infrastructure (Databases, Kafka, Redis)

Spins up all necessary background services via Docker Compose.

cd Scripts
./start-infra.sh

2. Seed the Databases with Sample Data

Populates your databases with sample products, pricing rules, and inventory.

./seed-data.sh

3. Start the Backend Microservices

Boots all 10 Spring Boot services in the background.

./start-backend.sh

4. Start the Frontend Application

Starts the Micro-Frontend shell and all individual sub-applications.

./start-frontend.sh

Stopping the Platform

Use our teardown scripts to cleanly turn everything off. They gracefully stop the processes and keep your computer clean.

cd Scripts
./stop-frontend.sh
./stop-backend.sh
./stop-infra.sh

(Note: To completely wipe the database data, run docker compose down -v inside the Infra/ folder).

Why this project

Built to understand how real distributed e-commerce systems are designed, how polyglot persistence strategies are applied, how to manage distributed state using Kafka, and how Micro-Frontend architectures scale in production environments.

About

A highly scalable, event-driven E-Commerce blueprint showcasing modern system design, polyglot persistence, and module federation

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors