Spring Cloud | Service Discovery Spring Cloud | API Gateway
Microservice | User Service Microservice | Product Service Microservice | Payment Service Microservice | Email Service
User.Service.-.Demo.mp4
π₯ User Service Demonstration!
- Introduction
- Architecture Diagram
- Project Structure
- Tech Stack
- Product Requirements Document (PRD)
- Resources
- Contributing
- License
- Author
A scalable and modular e-commerce platform built using a microservices architecture. The system is designed to handle core e-commerce functionalities such as product management, cart operations, order processing, payment integration, and user management through independently deployable backend services.
The project demonstrates real-world backend engineering concepts including RESTful APIs, database design, asynchronous communication, scalability, service abstraction, caching, payment gateway integration, and microservices-based system design using Spring Boot and related technologies.
High-Level Architecture
E-Commerce-Platform/
β
βββ ServiceDiscovery/ # Eureka Service Registry
βββ ApiGateway/ # API Gateway
βββ UserService/ # User Management
βββ ProductService/ # Product Catalog Management
βββ PaymentService/ # Payment Integration
βββ EmailService/ # Email Notifications
| Technology | Purpose |
|---|---|
| Java 21 | Programming Language |
| Spring Boot 3.4.6 | Backend Framework |
| Spring Web | REST API Development |
| Spring Data JPA | ORM & Database Access |
| MySQL | Relational Database |
| Spring Security | Authentication & Authorization |
| Spring Authorization Server | OAuth 2.1 Authorization Server & Token Management |
| Apache Commons Lang 3 | Utility Library |
| Lombok | Boilerplate Code Reduction |
| Spring Kafka | Event-Driven Messaging & Asynchronous Communication |
| Spring Cloud Netflix Eureka Client | Service Discovery & Service Registration |
| Spring Boot DevTools | Development Productivity & Automatic Restart |
| Maven | Dependency Management & Build Tool |
| JUnit 5 | Unit & Integration Testing |
| IntelliJ IDEA | Development Environment |
- Registration: Allow users to register via email or social media profiles.
- Login: Secure user login with credentials.
- Profile Management: Enable users to view and edit their profiles.
- Password Reset: Allow password resets through secure email links.
- Browsing: Users can browse products by category.
- Product Details: Product pages include images, descriptions, specifications, and more.
- Search: Provide search functionality with keyword-based queries.
- Add to Cart: Users can add products to their cart.
- Cart Review: View selected items with price, quantity, and totals.
- Checkout: Seamless process to finalize purchases, including delivery details and payment options.
- Order Confirmation: Confirm orders with details after purchase.
- Order History: Allow users to view past orders.
- Order Tracking: Provide delivery status tracking.
- Multiple Payment Options: Support credit/debit cards, online banking, and other methods.
- Secure Transactions: Ensure secure payment handling.
- Payment Receipt: Generate receipts for successful payments.
- Secure Authentication: Protect user data during login and active sessions.
- Session Management: Allow users to stay logged in until they log out or after a specified duration.
1οΈβ£ Load Balancers (LB): Distribute traffic across servers for high availability (e.g., AWS ELB).
2οΈβ£ API Gateway: Entry point for routing requests, managing rate limits, and handling authentication (e.g., Kong).
3οΈβ£ Microservices: Separate services for modular and scalable architecture.
4οΈβ£ Databases: MySQL and MongoDB for structured and unstructured data.
5οΈβ£ Message Broker (Kafka): Enable asynchronous inter-service communication.
6οΈβ£ Caching (Redis): Boost response times for frequently accessed data.
7οΈβ£ Search & Analytics (Elasticsearch): Efficient product searches with advanced capabilities.
1οΈβ£ User logs in and searches for a product.
2οΈβ£ Request passes through the Load Balancer to the API Gateway.
3οΈβ£ API Gateway routes the search request to the Product Catalog Service.
4οΈβ£ Product Catalog Service queries Elasticsearch for results.
1οΈβ£ User adds a product to the cart.
2οΈβ£ Cart Service stores the item in MongoDB and produces a Kafka message.
1οΈβ£ User checks out.
2οΈβ£ Order Management Service processes the order and sends a Kafka message.
3οΈβ£ Payment Service consumes the message to handle payment.
Spring Security BCrypt Auth0 Auth0 JWT BCrypt MDN AWS Spring Authorization Server Spring Authorization Server JWT
Contributions are welcome. Before submitting changes, please review:
This project is licensed under the Apache 2.0 License.
Thank you for exploring this project. If you find it helpful, consider giving the repository a β to support its continued development.