A production-grade e-commerce platform built with microservices architecture using Spring Boot and MongoDB.
The platform is built using a microservices architecture with the following services:
- API Gateway: Routes requests to appropriate microservices
- Service Registry: Manages service discovery and registration
- Config Server: Centralized configuration management
- Product Service: Manages product catalog and inventory
- Order Service: Handles order processing and management
- User Service: Manages user accounts and authentication
- Cart Service: Handles shopping cart operations
- Payment Service: Processes payments and transactions
- Inventory Service: Manages product inventory
- Review Service: Handles product reviews and ratings
- Notification Service: Manages notifications and alerts
- Analytics Service: Handles analytics and reporting
- Security Service: Manages security and authentication
- Backend: Spring Boot 3.2.3
- Database: MongoDB
- Search Engine: Elasticsearch
- Caching: Redis
- Service Discovery: Netflix Eureka
- Configuration Management: Spring Cloud Config
- API Documentation: OpenAPI (Swagger)
- Containerization: Docker
- Orchestration: Docker Compose
- Build Tool: Maven
- Java Version: 17
- JDK 17
- Maven
- Docker
- Docker Compose
- MongoDB
- Elasticsearch
- Redis
- Clone the repository:
git clone https://github.com/yourusername/shopsphere.git
cd shopsphere- Build the project:
mvn clean install- Start the services using Docker Compose:
docker-compose up -d- Access the services:
- API Gateway: http://localhost:8080
- Service Registry: http://localhost:8761
- Config Server: http://localhost:8888
- Product Service: http://localhost:8081
- Swagger UI: http://localhost:8081/swagger-ui.html
The API documentation is available through Swagger UI at:
- Product Service: http://localhost:8081/swagger-ui.html
shopsphere/
├── api-gateway/
├── service-registry/
├── config-server/
├── product-service/
├── order-service/
├── user-service/
├── cart-service/
├── payment-service/
├── inventory-service/
├── review-service/
├── notification-service/
├── analytics-service/
├── security-service/
└── common/
- Create a new module in the parent pom.xml
- Add necessary dependencies
- Create the service structure:
- Controller
- Service
- Repository
- Model
- DTO
- Mapper
- Add configuration in application.yml
- Create Dockerfile
- Update docker-compose.yml
Run tests using Maven:
mvn testThe application can be deployed using Docker Compose:
docker-compose up -d- Eureka Dashboard: http://localhost:8761
- Actuator Endpoints: http://localhost:8081/actuator
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.