Skip to content

UtkarshShah0/E-Commerce-Microservices

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

E-Commerce Microservices Platform

A full-stack e-commerce application built with Angular 18 frontend and Spring Boot microservices architecture.

πŸ—οΈ Architecture Overview

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Angular 18    β”‚    β”‚   API Gateway    β”‚    β”‚   Microservices     β”‚
β”‚   Frontend      │◄──►│   (Port 9090)    │◄──►│   Ecosystem         β”‚
β”‚   (Port 4200)   β”‚    β”‚                  β”‚    β”‚                     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                β”‚
                                β–Ό
        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        β”‚                 Microservices                         β”‚
        β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
        β”‚ User Serviceβ”‚ Product     β”‚ Cart Serviceβ”‚ Order       β”‚
        β”‚ (Port 8089) β”‚ Catalog     β”‚ (Port 8085) β”‚ Management  β”‚
        β”‚             β”‚ (Port 8082) β”‚             β”‚ (Port 8084) β”‚
        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                β”‚
                                β–Ό
                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚   MySQL Database    β”‚
                    β”‚   (Port 3306)       β”‚
                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸš€ Features

Core E-Commerce Features

  • User Management: Registration, Login, Profile Management
  • Product Catalog: Browse products, categories, search, reviews
  • Shopping Cart: Add/remove items, quantity management
  • Order Management: Place orders, order history, tracking
  • Payment Processing: Multiple payment methods (Card, UPI, COD, BNPL)
  • Address Management: Multiple shipping addresses
  • Inventory Management: Real-time stock tracking

Technical Features

  • Microservices Architecture: Scalable, maintainable service separation
  • API Gateway: Centralized routing and load balancing
  • Service Communication: Feign clients for inter-service communication
  • Database Per Service: Independent data management
  • Responsive UI: Mobile-first Angular application
  • Real-time Updates: Dynamic cart and inventory updates

πŸ› οΈ Technology Stack

Frontend

  • Angular 18 - Modern web framework
  • TypeScript - Type-safe JavaScript
  • Tailwind CSS - Utility-first CSS framework
  • RxJS - Reactive programming
  • Angular Router - Client-side routing

Backend

  • Spring Boot 3.x - Java microservices framework
  • Spring Cloud Gateway - API Gateway
  • Spring Data JPA - Data persistence
  • OpenFeign - Service-to-service communication
  • MySQL - Relational database
  • Maven - Dependency management

πŸ“‹ Prerequisites

  • Java 17+
  • Node.js 18+
  • MySQL 8.0+
  • Maven 3.6+
  • Angular CLI 18+

πŸš€ Quick Start

1. Database Setup

CREATE DATABASE Training;
-- Run seed.sql from product-catalog service

2. Backend Services

# Start services in order:
cd oss-backend/eureka-server && mvn spring-boot:run
cd oss-backend/api-gateway && mvn spring-boot:run
cd oss-backend/user-service && mvn spring-boot:run
cd oss-backend/product-catalog && mvn spring-boot:run
cd oss-backend/cart-service && mvn spring-boot:run
cd oss-backend/order-management-master && mvn spring-boot:run

3. Frontend

cd oss-frontend
npm install
npm start

4. Access Application

πŸ“Š Service Ports

Service Port Purpose
Frontend 4200 Angular Application
API Gateway 9090 Request Routing
User Service 8089 User Management
Product Catalog 8082 Product Management
Cart Service 8085 Shopping Cart
Order Management 8084 Order Processing
Eureka Server 8761 Service Discovery

πŸ”„ Application Workflow

User Journey

  1. Registration/Login β†’ User Service
  2. Browse Products β†’ Product Catalog Service
  3. Add to Cart β†’ Cart Service
  4. Checkout Process β†’ Multiple Services
  5. Place Order β†’ Order Management Service
  6. Inventory Update β†’ Product Catalog Service

Data Flow

Frontend β†’ API Gateway β†’ Microservice β†’ Database
    ↑                                      ↓
    └──────── Response β†β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“ Project Structure

β”œβ”€β”€ oss-frontend/                 # Angular Frontend
β”‚   β”œβ”€β”€ src/app/
β”‚   β”‚   β”œβ”€β”€ pages/               # Page Components
β”‚   β”‚   β”œβ”€β”€ services/            # API Services
β”‚   β”‚   └── shared/              # Shared Components
β”œβ”€β”€ oss-backend/                 # Spring Boot Backend
β”‚   β”œβ”€β”€ api-gateway/             # API Gateway Service
β”‚   β”œβ”€β”€ user-service/            # User Management
β”‚   β”œβ”€β”€ product-catalog/         # Product Management
β”‚   β”œβ”€β”€ cart-service/            # Shopping Cart
β”‚   β”œβ”€β”€ order-management-master/ # Order Processing
β”‚   └── eureka-server/           # Service Discovery
└── docs/                        # Documentation

πŸ“š Documentation

πŸ” Authentication

Currently uses localStorage-based session management:

  • Simple token storage for development
  • User data persisted in browser storage
  • No JWT implementation (suitable for demo/development)

πŸ§ͺ Testing

Frontend Testing

cd oss-frontend
npm test

Backend Testing

cd oss-backend/[service-name]
mvn test

πŸš€ Deployment

Development

  • All services run locally
  • MySQL database on localhost
  • Frontend served by Angular CLI

Production Considerations

  • Containerize services with Docker
  • Use Kubernetes for orchestration
  • Implement proper JWT authentication
  • Add monitoring and logging
  • Set up CI/CD pipelines

🀝 Contributing

  1. Fork the repository
  2. Create feature branch (git checkout -b feature/AmazingFeature)
  3. Commit changes (git commit -m 'Add AmazingFeature')
  4. Push to branch (git push origin feature/AmazingFeature)
  5. Open Pull Request

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ‘₯ Team

  • Frontend: Angular 18, TypeScript, Tailwind CSS
  • Backend: Spring Boot, Microservices, MySQL
  • Architecture: API Gateway, Service Discovery, Inter-service Communication

πŸ“ž Support

For support and questions:

  • Create an issue in the repository
  • Check documentation in /docs folder
  • Review API endpoints in service documentation

Built with ❀️ using modern web technologies and microservices architecture

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published