A scalable microservices-based backend system built with Java Spring Boot, demonstrating secure user management, provider operations, and email notifications across services.
This project is composed of three independent services communicating over HTTP and secured using OAuth2. It showcases core components of a distributed e-commerce system.
1. π UserService
- Handles user registration, login, and role-based access.
 - Secured using Spring Security + OAuth2 Resource Server.
 - Exposes REST APIs for user CRUD operations.
 - Supports JWT-based authentication and scope validation.
 
2. π¬ ProviderService
- Simulates vendor/product-provider functionalities.
 - Communicates securely with UserService using OAuth2 tokens.
 - Protected with Role-Based Access Control (RBAC).
 - Contains business logic for managing provider-specific resources.
 
3. π§ EmailService
- Event-driven email notification system.
 - Listens to events from other services and sends templated emails.
 - Built for horizontal scalability.
 - Integrates with third-party mail clients (e.g., SMTP, SendGrid-ready).
 
- OAuth2 Resource Server and Authorization Server integration.
 - Uses JWT tokens with role and scope validation.
 - Enforces secure inter-service communication via token headers.
 
- Java 17, Spring Boot 3+
 - Spring Security, Spring Data JPA, Redis
 - MySQL, Maven, REST APIs
 - OAuth2, JWT
 - Docker-ready setup (optional)
 - Postman Collection (available for API testing)
 
- Clone the repository
 - Configure MySQL for each service
 - Run each microservice from its module directory
 - Use Postman collection to test secured endpoints
 
- API Gateway & Service Discovery using Spring Cloud
 - Order Service as a Mircroservice
 - Enhance monitoring with tools like Prometheus and Grafana.
 
git clone https://github.com/rahulkotha07/ECommerce-Microservices.git
cd ECommerce-Microservices
git submodule update --init --recursive