# gmohanreddy/shopeaseapplication architecture

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

- Interactive diagram: https://gitdiagram.com/gmohanreddy/shopeaseapplication
- Repository: https://github.com/gmohanreddy/shopeaseapplication

## Overview

ShopEase is a full-stack shop application: customers browse products, authenticate, place orders, and view order history; administrators manage products and order status. The React app routes users through these workflows and calls a Spring API, whose services implement catalog, account, and ordering operations over repositories. Order placement also attempts an email confirmation. The graph includes documented controller/service and service/repository relationships; some frontend pages and backend security wiring are unsampled, so their internal links are omitted.

Main entry points: [`shopease-frontend/src/App.jsx`](https://github.com/gmohanreddy/shopeaseapplication/blob/main/shopease-frontend/src/App.jsx) (App routing), [`shopease-frontend/src/api/axiosInstance.js`](https://github.com/gmohanreddy/shopeaseapplication/blob/main/shopease-frontend/src/api/axiosInstance.js) (API client), [`src/main/java/com/shopease/repository`](https://github.com/gmohanreddy/shopeaseapplication/tree/main/src/main/java/com/shopease/repository) (Data repositories), [`src/main/java/com/shopease/controller/AuthController.java`](https://github.com/gmohanreddy/shopeaseapplication/blob/main/src/main/java/com/shopease/controller/AuthController.java) (Authentication API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Customer frontend"]
  node_app["App routing<br/>[App.jsx]"]
  node_authctx["Auth and cart<br/>[AuthContext.jsx]"]
  node_http["API client<br/>[axiosInstance.js]"]
  node_catalogui["Product catalog"]
  node_adminui["Product admin"]
  node_orderui["Place order<br/>[PlaceOrderPage.jsx]"]
  node_historyui["Order history"]
  node_authui["Login and register<br/>[LoginPage.jsx]"]
end

subgraph group_commerce["Commerce API"]
  node_productapi["Product API"]
  node_productview["Product view API"]
  node_productsvc["Product catalog service"]
  node_categoryapi["Category API"]
  node_categorysvc["Category service"]
  node_orderapi["Order API"]
  node_ordersvc["Order service<br/>[OrderService.java]"]
  node_userapi["User API"]
  node_usersvc["User service<br/>[UserService.java]"]
end

subgraph group_identity["Identity and security"]
  node_authapi["Authentication API"]
  node_authsvc["Authentication service<br/>[AuthService.java]"]
  node_jwt["JWT utilities<br/>[JwtUtil.java]"]
  node_security["Request security"]
end

subgraph group_data["Persistence and email"]
  node_repos[("Data repositories")]
  node_entities["Commerce entities"]
  node_email["Order email service<br/>[EmailService.java]"]
end

node_shopper(("Shopper"))
node_mail(("Mail provider"))

node_shopper -->|"uses"| node_app
node_app -->|"provides auth"| node_authctx
node_app -->|"routes to"| node_catalogui
node_app -->|"routes to"| node_adminui
node_app -->|"routes to"| node_orderui
node_app -->|"routes to"| node_historyui
node_app -->|"routes to"| node_authui
node_authctx -->|"calls API"| node_http
node_adminui -->|"calls API"| node_http
node_orderui -->|"calls API"| node_http
node_http -.->|"HTTP requests"| node_authapi
node_http -.->|"HTTP requests"| node_productapi
node_http -.->|"HTTP requests"| node_orderapi
node_shopper -->|"authenticates"| node_authapi
node_shopper -->|"browses and manages"| node_productapi
node_shopper -->|"places and views"| node_orderapi
node_authapi -->|"delegates"| node_authsvc
node_authsvc -->|"reads and saves"| node_repos
node_authsvc -->|"creates tokens"| node_jwt
node_productapi -->|"delegates"| node_productsvc
node_productview -->|"delegates"| node_productsvc
node_productsvc -->|"reads and writes"| node_repos
node_categoryapi -->|"delegates"| node_categorysvc
node_categorysvc -->|"reads and writes"| node_repos
node_orderapi -->|"delegates"| node_ordersvc
node_ordersvc -->|"reads and writes"| node_repos
node_ordersvc -->|"sends confirmation"| node_email
node_email -->|"sends message"| node_mail
node_userapi -.->|"delegates"| node_usersvc
node_usersvc -.->|"reads and writes"| node_repos
node_repos -.->|"persists"| node_entities
node_security -.->|"guards requests"| node_authapi

click node_app "https://github.com/gmohanreddy/shopeaseapplication/blob/main/shopease-frontend/src/App.jsx"
click node_authctx "https://github.com/gmohanreddy/shopeaseapplication/blob/main/shopease-frontend/src/context/AuthContext.jsx"
click node_http "https://github.com/gmohanreddy/shopeaseapplication/blob/main/shopease-frontend/src/api/axiosInstance.js"
click node_catalogui "https://github.com/gmohanreddy/shopeaseapplication/blob/main/shopease-frontend/src/pages/ProductCatalogPage.jsx"
click node_adminui "https://github.com/gmohanreddy/shopeaseapplication/blob/main/shopease-frontend/src/pages/AdminProductsPage.jsx"
click node_orderui "https://github.com/gmohanreddy/shopeaseapplication/blob/main/shopease-frontend/src/pages/PlaceOrderPage.jsx"
click node_historyui "https://github.com/gmohanreddy/shopeaseapplication/blob/main/shopease-frontend/src/pages/OrderHistoryPage.jsx"
click node_authui "https://github.com/gmohanreddy/shopeaseapplication/blob/main/shopease-frontend/src/pages/LoginPage.jsx"
click node_authapi "https://github.com/gmohanreddy/shopeaseapplication/blob/main/src/main/java/com/shopease/controller/AuthController.java"
click node_authsvc "https://github.com/gmohanreddy/shopeaseapplication/blob/main/src/main/java/com/shopease/service/AuthService.java"
click node_jwt "https://github.com/gmohanreddy/shopeaseapplication/blob/main/src/main/java/com/shopease/security/JwtUtil.java"
click node_security "https://github.com/gmohanreddy/shopeaseapplication/blob/main/src/main/java/com/shopease/security/SecurityConfig.java"
click node_productapi "https://github.com/gmohanreddy/shopeaseapplication/blob/main/src/main/java/com/shopease/controller/ProductController.java"
click node_productview "https://github.com/gmohanreddy/shopeaseapplication/blob/main/src/main/java/com/shopease/controller/ProductViewController.java"
click node_productsvc "https://github.com/gmohanreddy/shopeaseapplication/blob/main/src/main/java/com/shopease/service/ProductService.java"
click node_categoryapi "https://github.com/gmohanreddy/shopeaseapplication/blob/main/src/main/java/com/shopease/controller/CategoryController.java"
click node_categorysvc "https://github.com/gmohanreddy/shopeaseapplication/blob/main/src/main/java/com/shopease/service/CategoryService.java"
click node_orderapi "https://github.com/gmohanreddy/shopeaseapplication/blob/main/src/main/java/com/shopease/controller/OrderController.java"
click node_ordersvc "https://github.com/gmohanreddy/shopeaseapplication/blob/main/src/main/java/com/shopease/service/OrderService.java"
click node_userapi "https://github.com/gmohanreddy/shopeaseapplication/blob/main/src/main/java/com/shopease/controller/UserController.java"
click node_usersvc "https://github.com/gmohanreddy/shopeaseapplication/blob/main/src/main/java/com/shopease/service/UserService.java"
click node_repos "https://github.com/gmohanreddy/shopeaseapplication/tree/main/src/main/java/com/shopease/repository"
click node_entities "https://github.com/gmohanreddy/shopeaseapplication/tree/main/src/main/java/com/shopease/entity"
click node_email "https://github.com/gmohanreddy/shopeaseapplication/blob/main/src/main/java/com/shopease/service/EmailService.java"

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_app,node_authctx,node_http,node_catalogui,node_adminui,node_orderui,node_historyui,node_authui toneBlue
class node_productapi,node_productview,node_productsvc,node_categoryapi,node_categorysvc,node_orderapi,node_ordersvc,node_userapi,node_usersvc toneAmber
class node_authapi,node_authsvc,node_jwt,node_security toneMint
class node_repos,node_entities,node_email toneRose
class node_shopper,node_mail toneIndigo
```

## Components

### Customer frontend

- [App routing](https://github.com/gmohanreddy/shopeaseapplication/blob/main/shopease-frontend/src/App.jsx): `shopease-frontend/src/App.jsx`
- [Auth and cart](https://github.com/gmohanreddy/shopeaseapplication/blob/main/shopease-frontend/src/context/AuthContext.jsx): `shopease-frontend/src/context/AuthContext.jsx`
- [API client](https://github.com/gmohanreddy/shopeaseapplication/blob/main/shopease-frontend/src/api/axiosInstance.js): `shopease-frontend/src/api/axiosInstance.js`
- [Product catalog](https://github.com/gmohanreddy/shopeaseapplication/blob/main/shopease-frontend/src/pages/ProductCatalogPage.jsx): `shopease-frontend/src/pages/ProductCatalogPage.jsx`
- [Product admin](https://github.com/gmohanreddy/shopeaseapplication/blob/main/shopease-frontend/src/pages/AdminProductsPage.jsx): `shopease-frontend/src/pages/AdminProductsPage.jsx`
- [Place order](https://github.com/gmohanreddy/shopeaseapplication/blob/main/shopease-frontend/src/pages/PlaceOrderPage.jsx): `shopease-frontend/src/pages/PlaceOrderPage.jsx`
- [Order history](https://github.com/gmohanreddy/shopeaseapplication/blob/main/shopease-frontend/src/pages/OrderHistoryPage.jsx): `shopease-frontend/src/pages/OrderHistoryPage.jsx`
- [Login and register](https://github.com/gmohanreddy/shopeaseapplication/blob/main/shopease-frontend/src/pages/LoginPage.jsx): `shopease-frontend/src/pages/LoginPage.jsx`

### Commerce API

- [Product API](https://github.com/gmohanreddy/shopeaseapplication/blob/main/src/main/java/com/shopease/controller/ProductController.java): `src/main/java/com/shopease/controller/ProductController.java`
- [Product view API](https://github.com/gmohanreddy/shopeaseapplication/blob/main/src/main/java/com/shopease/controller/ProductViewController.java): `src/main/java/com/shopease/controller/ProductViewController.java`
- [Product catalog service](https://github.com/gmohanreddy/shopeaseapplication/blob/main/src/main/java/com/shopease/service/ProductService.java): `src/main/java/com/shopease/service/ProductService.java`
- [Category API](https://github.com/gmohanreddy/shopeaseapplication/blob/main/src/main/java/com/shopease/controller/CategoryController.java): `src/main/java/com/shopease/controller/CategoryController.java`
- [Category service](https://github.com/gmohanreddy/shopeaseapplication/blob/main/src/main/java/com/shopease/service/CategoryService.java): `src/main/java/com/shopease/service/CategoryService.java`
- [Order API](https://github.com/gmohanreddy/shopeaseapplication/blob/main/src/main/java/com/shopease/controller/OrderController.java): `src/main/java/com/shopease/controller/OrderController.java`
- [Order service](https://github.com/gmohanreddy/shopeaseapplication/blob/main/src/main/java/com/shopease/service/OrderService.java): `src/main/java/com/shopease/service/OrderService.java`
- [User API](https://github.com/gmohanreddy/shopeaseapplication/blob/main/src/main/java/com/shopease/controller/UserController.java): `src/main/java/com/shopease/controller/UserController.java`
- [User service](https://github.com/gmohanreddy/shopeaseapplication/blob/main/src/main/java/com/shopease/service/UserService.java): `src/main/java/com/shopease/service/UserService.java`

### Identity and security

- [Authentication API](https://github.com/gmohanreddy/shopeaseapplication/blob/main/src/main/java/com/shopease/controller/AuthController.java): `src/main/java/com/shopease/controller/AuthController.java`
- [Authentication service](https://github.com/gmohanreddy/shopeaseapplication/blob/main/src/main/java/com/shopease/service/AuthService.java): `src/main/java/com/shopease/service/AuthService.java`
- [JWT utilities](https://github.com/gmohanreddy/shopeaseapplication/blob/main/src/main/java/com/shopease/security/JwtUtil.java): `src/main/java/com/shopease/security/JwtUtil.java`
- [Request security](https://github.com/gmohanreddy/shopeaseapplication/blob/main/src/main/java/com/shopease/security/SecurityConfig.java): `src/main/java/com/shopease/security/SecurityConfig.java`

### Persistence and email

- [Data repositories](https://github.com/gmohanreddy/shopeaseapplication/tree/main/src/main/java/com/shopease/repository): `src/main/java/com/shopease/repository`
- [Commerce entities](https://github.com/gmohanreddy/shopeaseapplication/tree/main/src/main/java/com/shopease/entity): `src/main/java/com/shopease/entity`
- [Order email service](https://github.com/gmohanreddy/shopeaseapplication/blob/main/src/main/java/com/shopease/service/EmailService.java): `src/main/java/com/shopease/service/EmailService.java`

### Other components

- **Shopper**
- **Mail provider**

## Connections

- Shopper → App routing: uses (evidence: `shopease-frontend/src/App.jsx`)
- App routing → Auth and cart: provides auth (evidence: `shopease-frontend/src/App.jsx`)
- App routing → Product catalog: routes to (evidence: `shopease-frontend/src/App.jsx`)
- App routing → Product admin: routes to (evidence: `shopease-frontend/src/App.jsx`)
- App routing → Place order: routes to (evidence: `shopease-frontend/src/App.jsx`)
- App routing → Order history: routes to (evidence: `shopease-frontend/src/App.jsx`)
- App routing → Login and register: routes to (evidence: `shopease-frontend/src/App.jsx`)
- Auth and cart → API client: calls API (evidence: `shopease-frontend/src/context/AuthContext.jsx`)
- Product admin → API client: calls API (evidence: `shopease-frontend/src/pages/AdminProductsPage.jsx`)
- Place order → API client: calls API (evidence: `shopease-frontend/src/pages/PlaceOrderPage.jsx`)
- API client → Authentication API: HTTP requests
- API client → Product API: HTTP requests
- API client → Order API: HTTP requests
- Shopper → Authentication API: authenticates (evidence: `src/main/java/com/shopease/controller/AuthController.java`)
- Shopper → Product API: browses and manages (evidence: `src/main/java/com/shopease/controller/ProductController.java`)
- Shopper → Order API: places and views (evidence: `src/main/java/com/shopease/controller/OrderController.java`)
- Authentication API → Authentication service: delegates (evidence: `src/main/java/com/shopease/controller/AuthController.java`)
- Authentication service → Data repositories: reads and saves (evidence: `src/main/java/com/shopease/service/AuthService.java`)
- Authentication service → JWT utilities: creates tokens (evidence: `src/main/java/com/shopease/service/AuthService.java`)
- Product API → Product catalog service: delegates (evidence: `src/main/java/com/shopease/controller/ProductController.java`)
- Product view API → Product catalog service: delegates (evidence: `src/main/java/com/shopease/controller/ProductViewController.java`)
- Product catalog service → Data repositories: reads and writes (evidence: `src/main/java/com/shopease/service/ProductService.java`)
- Category API → Category service: delegates (evidence: `src/main/java/com/shopease/controller/CategoryController.java`)
- Category service → Data repositories: reads and writes (evidence: `src/main/java/com/shopease/service/CategoryService.java`)
- Order API → Order service: delegates (evidence: `src/main/java/com/shopease/controller/OrderController.java`)
- Order service → Data repositories: reads and writes (evidence: `src/main/java/com/shopease/service/OrderService.java`)
- Order service → Order email service: sends confirmation (evidence: `src/main/java/com/shopease/service/OrderService.java`)
- Order email service → Mail provider: sends message (evidence: `src/main/java/com/shopease/service/EmailService.java`)
- User API → User service: delegates
- User service → Data repositories: reads and writes (evidence: `src/main/java/com/shopease/service/UserService.java`)
- Data repositories → Commerce entities: persists (evidence: `src/main/java/com/shopease/repository/ProductRepository.java`)
- Request security → Authentication API: guards requests
