# harishkumardraksharan/ecommerce-platform architecture

> Architecture diagram of the GitHub repository harishkumardraksharan/ecommerce-platform, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/harishkumardraksharan/ecommerce-platform
- Repository: https://github.com/harishkumardraksharan/ecommerce-platform

## Overview

ShopSphere is a full-stack commerce platform: customers browse and compare products, manage carts and wishlists, check out, pay, and track orders; administrators manage the catalog, sales, and users. The React client communicates with Spring REST controllers, which delegate business operations through services to relational and document persistence. The README documents key capabilities, but many controllers and services were not sampled, so those branches are represented at subsystem level and their links rely on README statements rather than inspected calls.

Main entry points: [`backend/src/main/java/com/shopsphere/controller`](https://github.com/harishkumardraksharan/ecommerce-platform/tree/main/backend/src/main/java/com/shopsphere/controller) (REST controllers), [`frontend/src/App.jsx`](https://github.com/harishkumardraksharan/ecommerce-platform/blob/main/frontend/src/App.jsx) (React application), [`backend/src/main/java/com/shopsphere/repository`](https://github.com/harishkumardraksharan/ecommerce-platform/tree/main/backend/src/main/java/com/shopsphere/repository) (JPA repositories), [`backend/src/main/java/com/shopsphere/service/AuthService.java`](https://github.com/harishkumardraksharan/ecommerce-platform/blob/main/backend/src/main/java/com/shopsphere/service/AuthService.java) (Authentication)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Customer experience"]
  node_frontend["React application<br/>[App.jsx]"]
  node_authui["Authentication UI"]
  node_catalogui["Product discovery"]
  node_cartui["Cart and checkout<br/>[CheckoutPage.jsx]"]
  node_orderui["Orders and payments"]
  node_reviewsui["Reviews<br/>[ReviewSection.jsx]"]
  node_state["Client state<br/>[AuthContext.jsx]"]
  node_api["HTTP client<br/>[api.js]"]
end

subgraph group_backend["Commerce API"]
  node_controllers["REST controllers"]
end

subgraph group_services["Business services"]
  node_authservice["Authentication<br/>[AuthService.java]"]
  node_productservice["Catalog services"]
  node_cartservice["Cart service<br/>[CartService.java]"]
  node_orderservice["Order service<br/>[OrderService.java]"]
  node_paymentservice["Payment service"]
  node_reviewservice["Review service<br/>[ReviewService.java]"]
  node_adminservice["Admin services<br/>[AdminService.java]"]
  node_email["Email delivery<br/>[EmailService.java]"]
  node_files["Image storage"]
end

subgraph group_data["Persistence"]
  node_relational[("Commerce records")]
  node_repositories["JPA repositories"]
  node_documents[("Review and activity documents")]
  node_reviewrepo["Review repository"]
end

subgraph group_admin["Administration"]
  node_adminui["Admin console"]
end

node_customer(("Customer"))
node_razorpay["Razorpay"]
node_mysql[("MySQL")]
node_mongodb[("MongoDB")]

node_customer -->|"uses"| node_frontend
node_frontend -.->|"routes to"| node_authui
node_frontend -.->|"routes to"| node_catalogui
node_frontend -.->|"routes to"| node_cartui
node_frontend -.->|"routes to"| node_orderui
node_frontend -.->|"renders"| node_reviewsui
node_frontend -->|"provides"| node_state
node_frontend -->|"requests data"| node_api
node_api -->|"calls REST API"| node_controllers
node_controllers -.->|"delegates"| node_authservice
node_controllers -->|"delegates"| node_productservice
node_controllers -->|"delegates"| node_cartservice
node_controllers -.->|"delegates"| node_orderservice
node_controllers -.->|"delegates"| node_paymentservice
node_controllers -->|"delegates"| node_reviewservice
node_controllers -.->|"delegates"| node_adminservice
node_authservice -->|"reads and writes"| node_repositories
node_cartservice -->|"reads and writes"| node_repositories
node_orderservice -->|"reads and writes"| node_repositories
node_reviewservice -->|"reads and writes"| node_reviewrepo
node_reviewservice -->|"updates ratings"| node_repositories
node_repositories -->|"persists"| node_relational
node_reviewrepo -->|"stores reviews"| node_documents
node_documents -->|"stored in"| node_mongodb
node_relational -->|"stored in"| node_mysql
node_authservice -->|"sends verification mail"| node_email
node_adminui -.->|"manages commerce"| node_controllers
node_paymentservice -.->|"processes payments"| node_razorpay
node_orderservice -->|"uses cart"| node_cartservice
node_adminservice -.->|"uploads images"| node_files

click node_frontend "https://github.com/harishkumardraksharan/ecommerce-platform/blob/main/frontend/src/App.jsx"
click node_authui "https://github.com/harishkumardraksharan/ecommerce-platform/tree/main/frontend/src/pages/auth"
click node_catalogui "https://github.com/harishkumardraksharan/ecommerce-platform/blob/main/frontend/src/pages/ProductListingPage.jsx"
click node_cartui "https://github.com/harishkumardraksharan/ecommerce-platform/blob/main/frontend/src/pages/CheckoutPage.jsx"
click node_orderui "https://github.com/harishkumardraksharan/ecommerce-platform/blob/main/frontend/src/pages/OrderHistoryPage.jsx"
click node_reviewsui "https://github.com/harishkumardraksharan/ecommerce-platform/blob/main/frontend/src/components/review/ReviewSection.jsx"
click node_state "https://github.com/harishkumardraksharan/ecommerce-platform/blob/main/frontend/src/context/AuthContext.jsx"
click node_api "https://github.com/harishkumardraksharan/ecommerce-platform/blob/main/frontend/src/services/api.js"
click node_controllers "https://github.com/harishkumardraksharan/ecommerce-platform/tree/main/backend/src/main/java/com/shopsphere/controller"
click node_authservice "https://github.com/harishkumardraksharan/ecommerce-platform/blob/main/backend/src/main/java/com/shopsphere/service/AuthService.java"
click node_productservice "https://github.com/harishkumardraksharan/ecommerce-platform/blob/main/backend/src/main/java/com/shopsphere/service/ProductService.java"
click node_cartservice "https://github.com/harishkumardraksharan/ecommerce-platform/blob/main/backend/src/main/java/com/shopsphere/service/CartService.java"
click node_orderservice "https://github.com/harishkumardraksharan/ecommerce-platform/blob/main/backend/src/main/java/com/shopsphere/service/OrderService.java"
click node_paymentservice "https://github.com/harishkumardraksharan/ecommerce-platform/blob/main/backend/src/main/java/com/shopsphere/service/PaymentService.java"
click node_reviewservice "https://github.com/harishkumardraksharan/ecommerce-platform/blob/main/backend/src/main/java/com/shopsphere/service/ReviewService.java"
click node_adminservice "https://github.com/harishkumardraksharan/ecommerce-platform/blob/main/backend/src/main/java/com/shopsphere/service/AdminService.java"
click node_email "https://github.com/harishkumardraksharan/ecommerce-platform/blob/main/backend/src/main/java/com/shopsphere/service/EmailService.java"
click node_files "https://github.com/harishkumardraksharan/ecommerce-platform/blob/main/backend/src/main/java/com/shopsphere/service/FileStorageService.java"
click node_relational "https://github.com/harishkumardraksharan/ecommerce-platform/tree/main/backend/src/main/java/com/shopsphere/entity"
click node_repositories "https://github.com/harishkumardraksharan/ecommerce-platform/tree/main/backend/src/main/java/com/shopsphere/repository"
click node_documents "https://github.com/harishkumardraksharan/ecommerce-platform/tree/main/backend/src/main/java/com/shopsphere/document"
click node_reviewrepo "https://github.com/harishkumardraksharan/ecommerce-platform/blob/main/backend/src/main/java/com/shopsphere/repository/ReviewRepository.java"
click node_adminui "https://github.com/harishkumardraksharan/ecommerce-platform/tree/main/frontend/src/pages/admin"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_frontend,node_authui,node_catalogui,node_cartui,node_orderui,node_reviewsui,node_state,node_api toneBlue
class node_controllers,node_mysql,node_mongodb toneAmber
class node_authservice,node_productservice,node_cartservice,node_orderservice,node_paymentservice,node_reviewservice,node_adminservice,node_email,node_files toneMint
class node_relational,node_repositories,node_documents,node_reviewrepo toneRose
class node_adminui,node_customer,node_razorpay toneIndigo
```

## Components

### Customer experience

- [React application](https://github.com/harishkumardraksharan/ecommerce-platform/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Authentication UI](https://github.com/harishkumardraksharan/ecommerce-platform/tree/main/frontend/src/pages/auth): `frontend/src/pages/auth`
- [Product discovery](https://github.com/harishkumardraksharan/ecommerce-platform/blob/main/frontend/src/pages/ProductListingPage.jsx): `frontend/src/pages/ProductListingPage.jsx`
- [Cart and checkout](https://github.com/harishkumardraksharan/ecommerce-platform/blob/main/frontend/src/pages/CheckoutPage.jsx): `frontend/src/pages/CheckoutPage.jsx`
- [Orders and payments](https://github.com/harishkumardraksharan/ecommerce-platform/blob/main/frontend/src/pages/OrderHistoryPage.jsx): `frontend/src/pages/OrderHistoryPage.jsx`
- [Reviews](https://github.com/harishkumardraksharan/ecommerce-platform/blob/main/frontend/src/components/review/ReviewSection.jsx): `frontend/src/components/review/ReviewSection.jsx`
- [Client state](https://github.com/harishkumardraksharan/ecommerce-platform/blob/main/frontend/src/context/AuthContext.jsx): `frontend/src/context/AuthContext.jsx`
- [HTTP client](https://github.com/harishkumardraksharan/ecommerce-platform/blob/main/frontend/src/services/api.js): `frontend/src/services/api.js`

### Commerce API

- [REST controllers](https://github.com/harishkumardraksharan/ecommerce-platform/tree/main/backend/src/main/java/com/shopsphere/controller): `backend/src/main/java/com/shopsphere/controller`

### Business services

- [Authentication](https://github.com/harishkumardraksharan/ecommerce-platform/blob/main/backend/src/main/java/com/shopsphere/service/AuthService.java): `backend/src/main/java/com/shopsphere/service/AuthService.java`
- [Catalog services](https://github.com/harishkumardraksharan/ecommerce-platform/blob/main/backend/src/main/java/com/shopsphere/service/ProductService.java): `backend/src/main/java/com/shopsphere/service/ProductService.java`
- [Cart service](https://github.com/harishkumardraksharan/ecommerce-platform/blob/main/backend/src/main/java/com/shopsphere/service/CartService.java): `backend/src/main/java/com/shopsphere/service/CartService.java`
- [Order service](https://github.com/harishkumardraksharan/ecommerce-platform/blob/main/backend/src/main/java/com/shopsphere/service/OrderService.java): `backend/src/main/java/com/shopsphere/service/OrderService.java`
- [Payment service](https://github.com/harishkumardraksharan/ecommerce-platform/blob/main/backend/src/main/java/com/shopsphere/service/PaymentService.java): `backend/src/main/java/com/shopsphere/service/PaymentService.java`
- [Review service](https://github.com/harishkumardraksharan/ecommerce-platform/blob/main/backend/src/main/java/com/shopsphere/service/ReviewService.java): `backend/src/main/java/com/shopsphere/service/ReviewService.java`
- [Admin services](https://github.com/harishkumardraksharan/ecommerce-platform/blob/main/backend/src/main/java/com/shopsphere/service/AdminService.java): `backend/src/main/java/com/shopsphere/service/AdminService.java`
- [Email delivery](https://github.com/harishkumardraksharan/ecommerce-platform/blob/main/backend/src/main/java/com/shopsphere/service/EmailService.java): `backend/src/main/java/com/shopsphere/service/EmailService.java`
- [Image storage](https://github.com/harishkumardraksharan/ecommerce-platform/blob/main/backend/src/main/java/com/shopsphere/service/FileStorageService.java): `backend/src/main/java/com/shopsphere/service/FileStorageService.java`

### Persistence

- [Commerce records](https://github.com/harishkumardraksharan/ecommerce-platform/tree/main/backend/src/main/java/com/shopsphere/entity): `backend/src/main/java/com/shopsphere/entity`
- [JPA repositories](https://github.com/harishkumardraksharan/ecommerce-platform/tree/main/backend/src/main/java/com/shopsphere/repository): `backend/src/main/java/com/shopsphere/repository`
- [Review and activity documents](https://github.com/harishkumardraksharan/ecommerce-platform/tree/main/backend/src/main/java/com/shopsphere/document): `backend/src/main/java/com/shopsphere/document`
- [Review repository](https://github.com/harishkumardraksharan/ecommerce-platform/blob/main/backend/src/main/java/com/shopsphere/repository/ReviewRepository.java): `backend/src/main/java/com/shopsphere/repository/ReviewRepository.java`

### Administration

- [Admin console](https://github.com/harishkumardraksharan/ecommerce-platform/tree/main/frontend/src/pages/admin): `frontend/src/pages/admin`

### Other components

- **Customer**
- **Razorpay**
- **MySQL**
- **MongoDB**

## Connections

- Customer → React application: uses (evidence: `README.md`)
- React application → Authentication UI: routes to
- React application → Product discovery: routes to
- React application → Cart and checkout: routes to
- React application → Orders and payments: routes to
- React application → Reviews: renders
- React application → Client state: provides (evidence: `frontend/src/main.jsx`)
- React application → HTTP client: requests data (evidence: `README.md`)
- HTTP client → REST controllers: calls REST API (evidence: `README.md`)
- REST controllers → Authentication: delegates
- REST controllers → Catalog services: delegates (evidence: `backend/src/main/java/com/shopsphere/controller/ProductController.java`)
- REST controllers → Cart service: delegates (evidence: `backend/src/main/java/com/shopsphere/controller/CartController.java`)
- REST controllers → Order service: delegates
- REST controllers → Payment service: delegates
- REST controllers → Review service: delegates (evidence: `backend/src/main/java/com/shopsphere/controller/ReviewController.java`)
- REST controllers → Admin services: delegates
- Authentication → JPA repositories: reads and writes (evidence: `backend/src/main/java/com/shopsphere/service/AuthService.java`)
- Cart service → JPA repositories: reads and writes (evidence: `backend/src/main/java/com/shopsphere/service/CartService.java`)
- Order service → JPA repositories: reads and writes (evidence: `backend/src/main/java/com/shopsphere/service/OrderService.java`)
- Review service → Review repository: reads and writes (evidence: `backend/src/main/java/com/shopsphere/service/ReviewService.java`)
- Review service → JPA repositories: updates ratings (evidence: `backend/src/main/java/com/shopsphere/service/ReviewService.java`)
- JPA repositories → Commerce records: persists (evidence: `README.md`)
- Review repository → Review and activity documents: stores reviews (evidence: `backend/src/main/java/com/shopsphere/repository/ReviewRepository.java`)
- Review and activity documents → MongoDB: stored in (evidence: `README.md`)
- Commerce records → MySQL: stored in (evidence: `README.md`)
- Authentication → Email delivery: sends verification mail (evidence: `backend/src/main/java/com/shopsphere/service/AuthService.java`)
- Admin console → REST controllers: manages commerce
- Payment service → Razorpay: processes payments (evidence: `README.md`)
- Order service → Cart service: uses cart (evidence: `backend/src/main/java/com/shopsphere/service/OrderService.java`)
- Admin services → Image storage: uploads images (evidence: `README.md`)
