This project is a microservices-based e-commerce platform with advanced features such as Role-Based Access Control (RBAC), complex transactions, event handling using Kafka, GraphQL, caching, and centralized logging. The backend is developed using Spring Boot, and the frontend is built with React.js. The project is deployed using Docker and Docker Compose, with a CI/CD pipeline for automated deployment and testing.
Handles user authentication, authorization, and management.
- Endpoints:
POST /users/register: Register a new user.POST /users/login: Log in a user.GET /users/{id}: Get user details.PUT /users/{id}: Update user details.DELETE /users/{id}: Delete a user.
Manages product catalog, including CRUD operations on products.
- Endpoints:
GET /products: List all products.GET /products/{id}: Get product details.POST /products: Create a new product.PUT /products/{id}: Update a product.DELETE /products/{id}: Delete a product.
Handles order management, including creating and tracking orders.
- Endpoints:
GET /orders: List all orders.GET /orders/{id}: Get order details.POST /orders: Create a new order.PUT /orders/{id}: Update an order.DELETE /orders/{id}: Cancel an order.
Manages inventory levels and tracks product stock.
- Endpoints:
GET /inventory: List all inventory items.GET /inventory/{id}: Get inventory details.POST /inventory: Add new inventory.PUT /inventory/{id}: Update inventory.DELETE /inventory/{id}: Remove inventory.
Processes payments and handles payment-related data.
- Endpoints:
POST /payments: Process a payment.GET /payments/{id}: Get payment details.
Sends notifications for various events (e.g., order status updates).
- Endpoints:
POST /notifications: Send a notification.GET /notifications/{id}: Get notification details.
Allows users to review products.
- GraphQL Schema:
type Review { id: ID! productId: ID! userId: ID! rating: Int! comment: String createdAt: String } type Query { reviews(productId: ID!): [Review] review(id: ID!): Review } type Mutation { addReview(productId: ID!, userId: ID!, rating: Int!, comment: String): Review updateReview(id: ID!, rating: Int!, comment: String): Review deleteReview(id: ID!): Boolean }
Utilizes Redis for caching frequently accessed data.
- Frontend: React.js
- Backend: Spring Boot microservices
- Database: PostgreSQL (or any other RDBMS)
- Messaging: Apache Kafka
- Caching: Redis
- Logging: ELK Stack (Elasticsearch, Logstash, Kibana)
- Containerization: Docker, Docker Compose
- CI/CD: Jenkins or GitHub Actions
- Docker and Docker Compose
- Java 17+
- Node.js and npm
- Redis
- Kafka
-
Clone the repository:
git clone https://github.com/your-repo/microservices-ecommerce.git cd microservices-ecommerce -
Build and start services using Docker Compose:
docker-compose up --build
-
Access the frontend:
- Navigate to
http://localhost:3000in your browser.
- Navigate to
-
API Documentation:
- Access API documentation at
http://localhost:8080/swagger-ui.html.
- Access API documentation at
- Unit Tests:
./gradlew test - Integration Tests:
./gradlew integrationTest
- Continuous Integration:
- Set up to run on each push to the repository. It includes building, testing, and packaging the application.
- Continuous Deployment:
- Automatically deploys to the staging environment on successful builds.
Please read CONTRIBUTING.md for details on the code of conduct, and the process for submitting pull requests.
This project is licensed under the MIT License - see the LICENSE.md file for details.
For any inquiries, please contact the project maintainer at sivakg2000@gmail.com.