Skip to content

Repository files navigation

A DevOps Project to build a scalable app.

Documentation for this project can be found at GITBOOK

Tracking of this project progress at JIRA

E-commerce Microservices Platform

A DevOps project to build a scalable e-commerce application using microservices, targeting AWS deployment.

Overview

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).

Architecture

  • 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.

Setup and Running Locally

  1. Clone the Repo:
   git clone https://github.com/charan-happy/Ecommerce-Microservices-DevOps-project.git
   cd Ecommerce-Microservices-DevOps-project
  1. 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
  1. 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
  1. Test Endpoints:

User Interface

  • User Management: Visit http://localhost:8080/ to add, update, or delete users.
  • Product Management: Visit http://localhost:3000/ to add or delete products.

CI Pipeline

  • 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

API Endpoints

  • 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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages