An E-Commerce Platform built using Spring Boot and a Microservices Architecture. This project adheres to industry-standard design patterns and demonstrates modern software development practices, including distributed systems, containerization, and cloud-native technologies.
- User Authentication: Secure authentication using JWT and OAuth2.
- Product Catalog: CRUD operations for products with search and filtering.
- Shopping Cart: Add/remove products and save cart for logged-in users.
- Order Management: Place orders, track order status, and view order history.
- Payment Integration: Seamless payment processing using Stripe/PayPal.
- Inventory Management: Track product stock levels and notify sellers.
- Recommendation Engine: Suggest products based on user behavior.
- Notifications: Email and SMS notifications for order updates.
- Analytics: Generate reports for sales, revenue, and customer behavior.
The application is divided into the following microservices:
- User Service: Handles user registration, authentication, and profile management.
- Product Service: Manages product catalog, categories, and inventory.
- Cart Service: Manages shopping cart functionality. (Repo not linked yet)
- Order Service: Handles order creation, payment processing, and order tracking.
- Payment Service: Integrates with third-party payment gateways.
- Notification Service: Sends emails, SMS, or push notifications.
- Recommendation Service: Provides product recommendations. (Repo not linked yet)
- API Gateway: Acts as a single entry point for all client requests.
- Service Discovery (Eureka Server): Uses Netflix Eureka for service registration and discovery.
- Inventory Service: Tracks product stock levels and notifies sellers.
- Config Server: Centralized configuration management using Spring Cloud Config. (Repo not linked yet)
This project implements the following industry-standard design patterns:
- Controller Layer: Handles HTTP requests and responses.
- Service Layer: Contains business logic and interacts with repositories.
- Repository Layer: Manages data access and database interactions.
- Single Responsibility Principle (SRP): Each microservice is responsible for a single business capability.
- Decentralized Data Management: Each service has its own database, ensuring loose coupling.
- The API Gateway acts as a single entry point for all client requests, routing them to the appropriate microservices.
- Netflix Eureka is used for service registration and discovery, enabling dynamic scaling and load balancing.
- Resilience4j is used to handle failures gracefully and prevent cascading failures in distributed systems.
- The Saga Pattern is used to manage distributed transactions (e.g., order creation involving multiple services).
- Separates read and write operations for better scalability and performance.
- Stores the state of a business entity as a sequence of events, enabling auditability and replayability.
- Spring Boot: For building microservices.
- Spring Cloud: For service discovery, API Gateway, and distributed configuration.
- Spring Security: For authentication and authorization.
- Spring Data JPA: For database interactions.
- Docker: For containerization.
- Kubernetes: For orchestration and scaling.
- Kafka: For asynchronous communication between services.
- Redis: For caching.
- Elasticsearch: For advanced search functionality.
- MySQL: For relational data storage.
- MongoDB: For NoSQL data storage.
- Swagger: For API documentation.
- Prometheus: For monitoring and visualization.
- Java 17 or higher
- Docker and Docker Compose
- Kubernetes (optional)
- Maven
- Clone the Repository:
git clone https://github.com/eric-muganga/springboot-microservices-ecommerce-api.git cd springboot-microservices-ecommerce-api