Skip to content

A microservices-based ecommerce platform demonstrating robust ordering, inventory, payment, and user management with distributed system best practices.

Notifications You must be signed in to change notification settings

vinayv-456/ecommerce-ordering-system

Repository files navigation

Ecommerce Ordering System

This project is a microservices-based ecommerce ordering system, demonstrating a simple product ordering flow and addressing several advanced distributed system topics.

Product Ordering Flow

  1. Cart Service: Users add products to their cart.
  2. Inventory Service: On checkout, the system checks inventory availability and reserves stock.
  3. Payment Service: Processes the payment for the order.
  4. Order Service: Finalizes the order and provides order listing/history for the user.

Key Topics Addressed

Inventory Service

  • Concurrent Request Handling: Ensures correct stock levels under high concurrency.
  • Transaction Propagation Levels: Manages transaction boundaries for inventory updates.
  • Locking Settings: Uses appropriate locking (e.g., pessimistic/optimistic) to prevent overselling.

Order Service

  • Indexing: Efficient order retrieval using database indexes.
  • SAGA Pattern Implementation: Coordinates distributed transactions across services (inventory, payment, order) to ensure data consistency.
  • Rollback Mechanisms: Handles failures by rolling back or compensating actions (e.g., restocking inventory if payment fails).

Microservices

  • api-gateway: Entry point for all client requests, routes to appropriate services.
  • auth-service: Handles authentication and authorization.
  • cart-service: Manages user carts.
  • inventory-service: Manages product stock and availability.
  • order-service: Handles order creation, listing, and SAGA orchestration.
  • payment-service: Processes payments.
  • config-server: Centralized configuration management.
  • eureka-server: Service discovery.
  • frontend: Angular-based user interface.

Technologies Used

Additional Architecture Highlights

  • Docker & Docker Compose: All services are containerized for consistent, reproducible deployments and easy local development.
  • Distributed Tracing & Monitoring: Integration with tools like Spring Cloud Sleuth and Zipkin for tracing requests across services. Prometheus/Grafana or similar can be used for metrics and dashboards.
  • Circuit Breakers & Resilience: Use of Resilience4j (or Hystrix) for circuit breaking, retries, and fallback mechanisms to handle service failures gracefully.
  • Centralized Configuration: Config Server externalizes configuration, supporting environment-specific and dynamic updates without redeploying services.
  • Service Discovery: Eureka enables dynamic registration and discovery of services, supporting scaling and resilience.
  • Authentication & Authorization: JWT/OAuth2-based security for protecting APIs and user data.
  • Test Coverage: Unit and integration tests for critical flows.
  • Frontend Features: Modern Angular UI, API integration, and user session management.


This project demonstrates best practices for building robust, scalable, and consistent distributed systems in an ecommerce context.

About

A microservices-based ecommerce platform demonstrating robust ordering, inventory, payment, and user management with distributed system best practices.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published