A DevOps Project to build a scalable app.
Documentation for this project can be found at GITBOOK
Tracking of this project progress at JIRA
A DevOps project to build a scalable e-commerce application using microservices, targeting AWS deployment.
This project implements four microservices to simulate an e-commerce platform:
- User Service: Manages user data (Java, Spring Boot).
- Product Service: Handles product catalog (Node.js, Express).
- Order Service: Processes orders by calling User and Product (Python, Flask).
- Recommend Service: Suggests products by calling Product (Go).
- Microservices: REST APIs running locally on ports 8080 (User), 3000 (Product), 5000 (Order), 8081 (Recommend).
- Communication: Services interact via HTTP GET requests.
- Error Handling: Graceful failures for unavailable services.
- Future: Docker, Kubernetes, CI/CD, monitoring on AWS Free Tier.
- Clone the Repo:
git clone https://github.com/charan-happy/Ecommerce-Microservices-DevOps-project.git
cd Ecommerce-Microservices-DevOps-project- Install Dependencies:
- User: cd user-service && mvn package
- Product: cd product-service && npm install
- Order: cd order-service && pip3 install -r requirements.txt
- Recommend: cd recommend-service && go mod tidy
- Run Services (in separate terminal):
- User: java -jar target/user-service-1.0-SNAPSHOT.jar
- Product: node app.js
- Order: python3 app.py
- Recommend: go run main.go
- Test Endpoints:
-
curl -X POST -H "Content-Type: application/json" -d '{"user_id": 1, "product_id": 101}'
- User Management: Visit
http://localhost:8080/to add, update, or delete users. - Product Management: Visit
http://localhost:3000/to add or delete products.
- GitHub Actions: Automated CI pipeline (
.github/workflows/ci.yml):- Builds Docker images for all services.
- Runs API health checks and unit tests.
- Triggered on push/pull to
main
- User Service:
GET /users: List all users.GET /users/{id}: Get user by ID.POST /users: Create user ({"name": "Alice"}).PUT /users/{id}: Update user.DELETE /users/{id}: Delete user.
- Product Service:
GET /products: List all products.GET /products/{id}: Get product by ID.POST /products: Create product ({"name": "Phone", "price": 499}).PUT /products/{id}: Update product.DELETE /products/{id}: Delete product.
- Order Service:
POST /orders: Create order ({"user_id": 1, "product_id": 101}).
- Recommend Service:
GET /recommend: Get recommended product.