# senthilvytcdc/ceg-ariyalur-batch2 architecture

> Architecture diagram of the GitHub repository senthilvytcdc/ceg-ariyalur-batch2, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/senthilvytcdc/ceg-ariyalur-batch2
- Repository: https://github.com/senthilvytcdc/ceg-ariyalur-batch2

## Overview

SmileMart is a full-stack ecommerce website. Shoppers browse and search products, register or log in, manage a cart, submit a shipping address to place an order, then view order confirmation and history. The sampled frontend shows route dispatch, local auth state, and API calls; backend source and database wiring were not sampled, so backend links are marked unverified rather than asserted. The tree also contains SQL data files, but no README documents additional capabilities.

Main entry points: [`frontend/ecommerce-frontend/src/App.jsx`](https://github.com/senthilvytcdc/ceg-ariyalur-batch2/blob/main/frontend/ecommerce-frontend/src/App.jsx) (Route app), [`frontend/ecommerce-frontend/src/api/axiosConfig.js`](https://github.com/senthilvytcdc/ceg-ariyalur-batch2/blob/main/frontend/ecommerce-frontend/src/api/axiosConfig.js) (API client), [`frontend/ecommerce-frontend/src/context/AuthContext.jsx`](https://github.com/senthilvytcdc/ceg-ariyalur-batch2/blob/main/frontend/ecommerce-frontend/src/context/AuthContext.jsx) (Auth context), [`EcommerceWebsite/src/main/java/udhaya/example/ecommercewebsite`](https://github.com/senthilvytcdc/ceg-ariyalur-batch2/tree/main/EcommerceWebsite/src/main/java/udhaya/example/ecommercewebsite) (Spring application)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Shopper frontend"]
  node_app["Route app<br/>[App.jsx]"]
  node_home["Product browsing<br/>[HomePage.jsx]"]
  node_cart["Cart management<br/>[cartpage.jsx]"]
  node_checkout["Order checkout<br/>[orderpage.jsx]"]
  node_confirmation["Order confirmation"]
  node_history["Order history<br/>[OrdersPage.jsx]"]
  node_api["API client<br/>[axiosConfig.js]"]
end

subgraph group_identity["Identity and session"]
  node_login["Login form<br/>[LoginPage.jsx]"]
  node_registration["Registration form<br/>[RegisterPage.jsx]"]
  node_auth["Auth context<br/>[AuthContext.jsx]"]
end

subgraph group_backend["Commerce backend"]
  node_backend_app["Spring application"]
  node_product_api["Product endpoints"]
  node_user_api["User endpoints"]
  node_cart_api["Cart endpoints"]
  node_order_api["Order endpoints"]
  node_services["Commerce services"]
  node_repositories["Data repositories"]
  node_entities["Commerce entities"]
end

subgraph group_persistence["Persistence"]
  node_sql_data[("SQL data files")]
end

node_shopper(("Shopper"))

node_shopper -->|"uses"| node_app
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_registration
node_app -->|"routes to"| node_cart
node_app -->|"routes to"| node_checkout
node_app -->|"routes to"| node_confirmation
node_app -->|"routes to"| node_history
node_app -->|"provides context"| node_auth
node_login -->|"sets session"| node_auth
node_home -->|"reads session"| node_auth
node_cart -->|"reads session"| node_auth
node_checkout -->|"reads session"| node_auth
node_history -->|"reads session"| node_auth
node_home -->|"requests products"| node_api
node_home -->|"updates cart"| node_api
node_login -->|"submits login"| node_api
node_registration -->|"submits registration"| node_api
node_cart -->|"manages cart"| node_api
node_checkout -->|"submits order"| node_api
node_history -->|"fetches history"| node_api
node_api -.->|"calls API"| node_backend_app
node_backend_app -.->|"dispatches"| node_product_api
node_backend_app -.->|"dispatches"| node_user_api
node_backend_app -.->|"dispatches"| node_cart_api
node_backend_app -.->|"dispatches"| node_order_api
node_product_api -.->|"delegates to"| node_services
node_user_api -.->|"delegates to"| node_services
node_cart_api -.->|"delegates to"| node_services
node_order_api -.->|"delegates to"| node_services
node_services -.->|"uses"| node_repositories
node_repositories -.->|"persists"| node_entities
node_repositories -.->|"stores data"| node_sql_data

click node_app "https://github.com/senthilvytcdc/ceg-ariyalur-batch2/blob/main/frontend/ecommerce-frontend/src/App.jsx"
click node_home "https://github.com/senthilvytcdc/ceg-ariyalur-batch2/blob/main/frontend/ecommerce-frontend/src/pages/HomePage.jsx"
click node_cart "https://github.com/senthilvytcdc/ceg-ariyalur-batch2/blob/main/frontend/ecommerce-frontend/src/pages/cartpage.jsx"
click node_checkout "https://github.com/senthilvytcdc/ceg-ariyalur-batch2/blob/main/frontend/ecommerce-frontend/src/pages/orderpage.jsx"
click node_confirmation "https://github.com/senthilvytcdc/ceg-ariyalur-batch2/blob/main/frontend/ecommerce-frontend/src/pages/OrderSuccessPage.jsx"
click node_history "https://github.com/senthilvytcdc/ceg-ariyalur-batch2/blob/main/frontend/ecommerce-frontend/src/pages/OrdersPage.jsx"
click node_login "https://github.com/senthilvytcdc/ceg-ariyalur-batch2/blob/main/frontend/ecommerce-frontend/src/pages/LoginPage.jsx"
click node_registration "https://github.com/senthilvytcdc/ceg-ariyalur-batch2/blob/main/frontend/ecommerce-frontend/src/pages/RegisterPage.jsx"
click node_auth "https://github.com/senthilvytcdc/ceg-ariyalur-batch2/blob/main/frontend/ecommerce-frontend/src/context/AuthContext.jsx"
click node_api "https://github.com/senthilvytcdc/ceg-ariyalur-batch2/blob/main/frontend/ecommerce-frontend/src/api/axiosConfig.js"
click node_backend_app "https://github.com/senthilvytcdc/ceg-ariyalur-batch2/tree/main/EcommerceWebsite/src/main/java/udhaya/example/ecommercewebsite"
click node_product_api "https://github.com/senthilvytcdc/ceg-ariyalur-batch2/tree/main/EcommerceWebsite/src/main/java/udhaya/example/ecommercewebsite/controller"
click node_user_api "https://github.com/senthilvytcdc/ceg-ariyalur-batch2/tree/main/EcommerceWebsite/src/main/java/udhaya/example/ecommercewebsite/controller"
click node_cart_api "https://github.com/senthilvytcdc/ceg-ariyalur-batch2/tree/main/EcommerceWebsite/src/main/java/udhaya/example/ecommercewebsite/controller"
click node_order_api "https://github.com/senthilvytcdc/ceg-ariyalur-batch2/tree/main/EcommerceWebsite/src/main/java/udhaya/example/ecommercewebsite/controller"
click node_services "https://github.com/senthilvytcdc/ceg-ariyalur-batch2/tree/main/EcommerceWebsite/src/main/java/udhaya/example/ecommercewebsite/Service"
click node_repositories "https://github.com/senthilvytcdc/ceg-ariyalur-batch2/tree/main/EcommerceWebsite/src/main/java/udhaya/example/ecommercewebsite/Repository"
click node_entities "https://github.com/senthilvytcdc/ceg-ariyalur-batch2/tree/main/EcommerceWebsite/src/main/java/udhaya/example/ecommercewebsite/Entity"
click node_sql_data "https://github.com/senthilvytcdc/ceg-ariyalur-batch2/tree/main/database"

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_home,node_cart,node_checkout,node_confirmation,node_history,node_api toneBlue
class node_login,node_registration,node_auth toneAmber
class node_backend_app,node_product_api,node_user_api,node_cart_api,node_order_api,node_services,node_repositories,node_entities toneMint
class node_sql_data toneRose
class node_shopper toneIndigo
```

## Components

### Shopper frontend

- [Route app](https://github.com/senthilvytcdc/ceg-ariyalur-batch2/blob/main/frontend/ecommerce-frontend/src/App.jsx): `frontend/ecommerce-frontend/src/App.jsx`
- [Product browsing](https://github.com/senthilvytcdc/ceg-ariyalur-batch2/blob/main/frontend/ecommerce-frontend/src/pages/HomePage.jsx): `frontend/ecommerce-frontend/src/pages/HomePage.jsx`
- [Cart management](https://github.com/senthilvytcdc/ceg-ariyalur-batch2/blob/main/frontend/ecommerce-frontend/src/pages/cartpage.jsx): `frontend/ecommerce-frontend/src/pages/cartpage.jsx`
- [Order checkout](https://github.com/senthilvytcdc/ceg-ariyalur-batch2/blob/main/frontend/ecommerce-frontend/src/pages/orderpage.jsx): `frontend/ecommerce-frontend/src/pages/orderpage.jsx`
- [Order confirmation](https://github.com/senthilvytcdc/ceg-ariyalur-batch2/blob/main/frontend/ecommerce-frontend/src/pages/OrderSuccessPage.jsx): `frontend/ecommerce-frontend/src/pages/OrderSuccessPage.jsx`
- [Order history](https://github.com/senthilvytcdc/ceg-ariyalur-batch2/blob/main/frontend/ecommerce-frontend/src/pages/OrdersPage.jsx): `frontend/ecommerce-frontend/src/pages/OrdersPage.jsx`
- [API client](https://github.com/senthilvytcdc/ceg-ariyalur-batch2/blob/main/frontend/ecommerce-frontend/src/api/axiosConfig.js): `frontend/ecommerce-frontend/src/api/axiosConfig.js`

### Identity and session

- [Login form](https://github.com/senthilvytcdc/ceg-ariyalur-batch2/blob/main/frontend/ecommerce-frontend/src/pages/LoginPage.jsx): `frontend/ecommerce-frontend/src/pages/LoginPage.jsx`
- [Registration form](https://github.com/senthilvytcdc/ceg-ariyalur-batch2/blob/main/frontend/ecommerce-frontend/src/pages/RegisterPage.jsx): `frontend/ecommerce-frontend/src/pages/RegisterPage.jsx`
- [Auth context](https://github.com/senthilvytcdc/ceg-ariyalur-batch2/blob/main/frontend/ecommerce-frontend/src/context/AuthContext.jsx): `frontend/ecommerce-frontend/src/context/AuthContext.jsx`

### Commerce backend

- [Spring application](https://github.com/senthilvytcdc/ceg-ariyalur-batch2/tree/main/EcommerceWebsite/src/main/java/udhaya/example/ecommercewebsite): `EcommerceWebsite/src/main/java/udhaya/example/ecommercewebsite`
- [Product endpoints](https://github.com/senthilvytcdc/ceg-ariyalur-batch2/tree/main/EcommerceWebsite/src/main/java/udhaya/example/ecommercewebsite/controller): `EcommerceWebsite/src/main/java/udhaya/example/ecommercewebsite/controller`
- [User endpoints](https://github.com/senthilvytcdc/ceg-ariyalur-batch2/tree/main/EcommerceWebsite/src/main/java/udhaya/example/ecommercewebsite/controller): `EcommerceWebsite/src/main/java/udhaya/example/ecommercewebsite/controller`
- [Cart endpoints](https://github.com/senthilvytcdc/ceg-ariyalur-batch2/tree/main/EcommerceWebsite/src/main/java/udhaya/example/ecommercewebsite/controller): `EcommerceWebsite/src/main/java/udhaya/example/ecommercewebsite/controller`
- [Order endpoints](https://github.com/senthilvytcdc/ceg-ariyalur-batch2/tree/main/EcommerceWebsite/src/main/java/udhaya/example/ecommercewebsite/controller): `EcommerceWebsite/src/main/java/udhaya/example/ecommercewebsite/controller`
- [Commerce services](https://github.com/senthilvytcdc/ceg-ariyalur-batch2/tree/main/EcommerceWebsite/src/main/java/udhaya/example/ecommercewebsite/Service): `EcommerceWebsite/src/main/java/udhaya/example/ecommercewebsite/Service`
- [Data repositories](https://github.com/senthilvytcdc/ceg-ariyalur-batch2/tree/main/EcommerceWebsite/src/main/java/udhaya/example/ecommercewebsite/Repository): `EcommerceWebsite/src/main/java/udhaya/example/ecommercewebsite/Repository`
- [Commerce entities](https://github.com/senthilvytcdc/ceg-ariyalur-batch2/tree/main/EcommerceWebsite/src/main/java/udhaya/example/ecommercewebsite/Entity): `EcommerceWebsite/src/main/java/udhaya/example/ecommercewebsite/Entity`

### Persistence

- [SQL data files](https://github.com/senthilvytcdc/ceg-ariyalur-batch2/tree/main/database): `database`

### Other components

- **Shopper**

## Connections

- Shopper → Route app: uses
- Route app → Product browsing: routes to (evidence: `frontend/ecommerce-frontend/src/App.jsx`)
- Route app → Login form: routes to (evidence: `frontend/ecommerce-frontend/src/App.jsx`)
- Route app → Registration form: routes to (evidence: `frontend/ecommerce-frontend/src/App.jsx`)
- Route app → Cart management: routes to (evidence: `frontend/ecommerce-frontend/src/App.jsx`)
- Route app → Order checkout: routes to (evidence: `frontend/ecommerce-frontend/src/App.jsx`)
- Route app → Order confirmation: routes to (evidence: `frontend/ecommerce-frontend/src/App.jsx`)
- Route app → Order history: routes to (evidence: `frontend/ecommerce-frontend/src/App.jsx`)
- Route app → Auth context: provides context (evidence: `frontend/ecommerce-frontend/src/App.jsx`)
- Login form → Auth context: sets session (evidence: `frontend/ecommerce-frontend/src/pages/LoginPage.jsx`)
- Product browsing → Auth context: reads session (evidence: `frontend/ecommerce-frontend/src/pages/HomePage.jsx`)
- Cart management → Auth context: reads session (evidence: `frontend/ecommerce-frontend/src/pages/cartpage.jsx`)
- Order checkout → Auth context: reads session (evidence: `frontend/ecommerce-frontend/src/pages/orderpage.jsx`)
- Order history → Auth context: reads session (evidence: `frontend/ecommerce-frontend/src/pages/OrdersPage.jsx`)
- Product browsing → API client: requests products (evidence: `frontend/ecommerce-frontend/src/pages/HomePage.jsx`)
- Product browsing → API client: updates cart (evidence: `frontend/ecommerce-frontend/src/pages/HomePage.jsx`)
- Login form → API client: submits login (evidence: `frontend/ecommerce-frontend/src/pages/LoginPage.jsx`)
- Registration form → API client: submits registration (evidence: `frontend/ecommerce-frontend/src/pages/RegisterPage.jsx`)
- Cart management → API client: manages cart (evidence: `frontend/ecommerce-frontend/src/pages/cartpage.jsx`)
- Order checkout → API client: submits order (evidence: `frontend/ecommerce-frontend/src/pages/orderpage.jsx`)
- Order history → API client: fetches history (evidence: `frontend/ecommerce-frontend/src/pages/OrdersPage.jsx`)
- API client → Spring application: calls API
- Spring application → Product endpoints: dispatches
- Spring application → User endpoints: dispatches
- Spring application → Cart endpoints: dispatches
- Spring application → Order endpoints: dispatches
- Product endpoints → Commerce services: delegates to
- User endpoints → Commerce services: delegates to
- Cart endpoints → Commerce services: delegates to
- Order endpoints → Commerce services: delegates to
- Commerce services → Data repositories: uses
- Data repositories → Commerce entities: persists
- Data repositories → SQL data files: stores data
