# sarveshss45/ecommerceapp architecture

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

- Interactive diagram: https://gitdiagram.com/sarveshss45/ecommerceapp
- Repository: https://github.com/sarveshss45/ecommerceapp

## Overview

ECommerceApp is a full-stack storefront and admin platform. Customers discover products, manage a cart, authenticate, and proceed through checkout, payment, and order tracking; storefront capabilities also include reviews, wishlists, addresses, and coupons. Administrators manage products and images, categories, orders, and sales analytics. The README documents the controller–service–repository–database backend pattern and the frontend API layer. Source excerpts establish detailed wiring for reviews and application registration; other feature branches are included from documented capabilities, with unverified internal links omitted or dashed.

Main entry points: [`frontend/src/App.jsx`](https://github.com/sarveshss45/ecommerceapp/blob/main/frontend/src/App.jsx) (React routes), [`frontend/src/services/api.js`](https://github.com/sarveshss45/ecommerceapp/blob/main/frontend/src/services/api.js) (API clients), [`frontend/src/pages/CheckoutPage.jsx`](https://github.com/sarveshss45/ecommerceapp/blob/main/frontend/src/pages/CheckoutPage.jsx) (Cart and checkout), [`backend/ECommerceApp/ECommerce.Application/Services/OrderService.cs`](https://github.com/sarveshss45/ecommerceapp/blob/main/backend/ECommerceApp/ECommerce.Application/Services/OrderService.cs) (Feature services)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Storefront UI"]
  node_app["React routes<br/>[App.jsx]"]
  node_catalog_ui["Catalog and details<br/>[ProductPage.jsx]"]
  node_cart_checkout["Cart and checkout<br/>[CheckoutPage.jsx]"]
  node_customer_orders["Order tracking<br/>[MyOrders.jsx]"]
  node_account_ui["Account and addresses<br/>[MyProfile.jsx]"]
  node_wishlist_ui["Wishlist<br/>[WishlistPage.jsx]"]
  node_review_ui["Reviews UI<br/>[ReviewForm.jsx]"]
  node_frontend_services["API clients<br/>[api.js]"]
end

subgraph group_api["API and application"]
  node_controllers["API controllers"]
  node_review_controller["Review endpoint"]
  node_application_services["Feature services<br/>[OrderService.cs]"]
  node_review_service["Review rules<br/>[ReviewService.cs]"]
  node_auth_service["Authentication<br/>[AuthService.cs]"]
end

subgraph group_data["Domain and persistence"]
  node_entities["Commerce entities<br/>[Product.cs]"]
  node_review_entity["Review entity<br/>[Review.cs]"]
  node_repositories["Feature repositories<br/>[OrderRepository.cs]"]
  node_review_repository["Review repository"]
  node_db_context["EF data context<br/>[AppDbContext.cs]"]
  node_sql[("SQL Server")]
end

subgraph group_admin["Admin operations"]
  node_admin_ui["Admin screens<br/>[AdminDashboard.jsx]"]
  node_admin_controllers["Admin endpoints"]
end

subgraph group_integrations["External services"]
  node_payment_service["Razorpay service<br/>[PaymentService.cs]"]
  node_razorpay["Razorpay"]
end

node_customer(("Customer"))
node_admin_actor(("Administrator"))

node_customer -->|"uses"| node_app
node_admin_actor -->|"uses"| node_app
node_app -->|"routes to"| node_catalog_ui
node_app -->|"routes to"| node_cart_checkout
node_app -->|"routes to"| node_customer_orders
node_app -->|"routes to"| node_account_ui
node_app -->|"routes to"| node_wishlist_ui
node_app -->|"routes to"| node_admin_ui
node_catalog_ui -.->|"requests data"| node_frontend_services
node_cart_checkout -.->|"requests data"| node_frontend_services
node_customer_orders -.->|"requests data"| node_frontend_services
node_account_ui -.->|"requests data"| node_frontend_services
node_wishlist_ui -.->|"requests data"| node_frontend_services
node_review_ui -->|"uses"| node_frontend_services
node_frontend_services -.->|"calls API"| node_controllers
node_frontend_services -.->|"calls API"| node_review_controller
node_review_controller -->|"delegates to"| node_review_service
node_review_service -->|"queries"| node_review_repository
node_review_repository -->|"reads and writes"| node_db_context
node_db_context -.->|"persists"| node_sql
node_controllers -.->|"delegates to"| node_application_services
node_application_services -.->|"uses"| node_repositories
node_repositories -.->|"uses"| node_db_context
node_admin_ui -.->|"manages via"| node_admin_controllers
node_admin_controllers -.->|"delegates to"| node_application_services
node_cart_checkout -.->|"initiates payment"| node_payment_service
node_payment_service -.->|"creates payment"| node_razorpay
node_auth_service -.->|"uses user data"| node_repositories

click node_app "https://github.com/sarveshss45/ecommerceapp/blob/main/frontend/src/App.jsx"
click node_catalog_ui "https://github.com/sarveshss45/ecommerceapp/blob/main/frontend/src/pages/ProductPage.jsx"
click node_cart_checkout "https://github.com/sarveshss45/ecommerceapp/blob/main/frontend/src/pages/CheckoutPage.jsx"
click node_customer_orders "https://github.com/sarveshss45/ecommerceapp/blob/main/frontend/src/pages/MyOrders.jsx"
click node_account_ui "https://github.com/sarveshss45/ecommerceapp/blob/main/frontend/src/pages/MyProfile.jsx"
click node_wishlist_ui "https://github.com/sarveshss45/ecommerceapp/blob/main/frontend/src/pages/WishlistPage.jsx"
click node_review_ui "https://github.com/sarveshss45/ecommerceapp/blob/main/frontend/src/components/ReviewForm.jsx"
click node_frontend_services "https://github.com/sarveshss45/ecommerceapp/blob/main/frontend/src/services/api.js"
click node_controllers "https://github.com/sarveshss45/ecommerceapp/blob/main/backend/ECommerceApp/ECommerceApp/Controllers/OrdersController.cs"
click node_review_controller "https://github.com/sarveshss45/ecommerceapp/blob/main/backend/ECommerceApp/ECommerceApp/Controllers/ReviewsController.cs"
click node_application_services "https://github.com/sarveshss45/ecommerceapp/blob/main/backend/ECommerceApp/ECommerce.Application/Services/OrderService.cs"
click node_review_service "https://github.com/sarveshss45/ecommerceapp/blob/main/backend/ECommerceApp/ECommerce.Application/Services/ReviewService.cs"
click node_auth_service "https://github.com/sarveshss45/ecommerceapp/blob/main/backend/ECommerceApp/ECommerce.Application/Services/AuthService.cs"
click node_entities "https://github.com/sarveshss45/ecommerceapp/blob/main/backend/ECommerceApp/ECommerce.Domain/Entities/Product.cs"
click node_review_entity "https://github.com/sarveshss45/ecommerceapp/blob/main/backend/ECommerceApp/ECommerce.Domain/Entities/Review.cs"
click node_repositories "https://github.com/sarveshss45/ecommerceapp/blob/main/backend/ECommerceApp/ECommerce.Infrastructure/Repositories/OrderRepository.cs"
click node_review_repository "https://github.com/sarveshss45/ecommerceapp/blob/main/backend/ECommerceApp/ECommerce.Infrastructure/Repositories/ReviewRepository.cs"
click node_db_context "https://github.com/sarveshss45/ecommerceapp/blob/main/backend/ECommerceApp/ECommerce.Infrastructure/Data/AppDbContext.cs"
click node_admin_ui "https://github.com/sarveshss45/ecommerceapp/blob/main/frontend/src/pages/admin/AdminDashboard.jsx"
click node_admin_controllers "https://github.com/sarveshss45/ecommerceapp/blob/main/backend/ECommerceApp/ECommerceApp/Controllers/AdminProductsController.cs"
click node_payment_service "https://github.com/sarveshss45/ecommerceapp/blob/main/backend/ECommerceApp/ECommerce.Infrastructure/Services/PaymentService.cs"

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_catalog_ui,node_cart_checkout,node_customer_orders,node_account_ui,node_wishlist_ui,node_review_ui,node_frontend_services toneBlue
class node_controllers,node_review_controller,node_application_services,node_review_service,node_auth_service toneAmber
class node_entities,node_review_entity,node_repositories,node_review_repository,node_db_context,node_sql toneMint
class node_admin_ui,node_admin_controllers toneRose
class node_payment_service,node_razorpay,node_customer,node_admin_actor toneIndigo
```

## Components

### Storefront UI

- [React routes](https://github.com/sarveshss45/ecommerceapp/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Catalog and details](https://github.com/sarveshss45/ecommerceapp/blob/main/frontend/src/pages/ProductPage.jsx): `frontend/src/pages/ProductPage.jsx`
- [Cart and checkout](https://github.com/sarveshss45/ecommerceapp/blob/main/frontend/src/pages/CheckoutPage.jsx): `frontend/src/pages/CheckoutPage.jsx`
- [Order tracking](https://github.com/sarveshss45/ecommerceapp/blob/main/frontend/src/pages/MyOrders.jsx): `frontend/src/pages/MyOrders.jsx`
- [Account and addresses](https://github.com/sarveshss45/ecommerceapp/blob/main/frontend/src/pages/MyProfile.jsx): `frontend/src/pages/MyProfile.jsx`
- [Wishlist](https://github.com/sarveshss45/ecommerceapp/blob/main/frontend/src/pages/WishlistPage.jsx): `frontend/src/pages/WishlistPage.jsx`
- [Reviews UI](https://github.com/sarveshss45/ecommerceapp/blob/main/frontend/src/components/ReviewForm.jsx): `frontend/src/components/ReviewForm.jsx`
- [API clients](https://github.com/sarveshss45/ecommerceapp/blob/main/frontend/src/services/api.js): `frontend/src/services/api.js`

### API and application

- [API controllers](https://github.com/sarveshss45/ecommerceapp/blob/main/backend/ECommerceApp/ECommerceApp/Controllers/OrdersController.cs): `backend/ECommerceApp/ECommerceApp/Controllers/OrdersController.cs`
- [Review endpoint](https://github.com/sarveshss45/ecommerceapp/blob/main/backend/ECommerceApp/ECommerceApp/Controllers/ReviewsController.cs): `backend/ECommerceApp/ECommerceApp/Controllers/ReviewsController.cs`
- [Feature services](https://github.com/sarveshss45/ecommerceapp/blob/main/backend/ECommerceApp/ECommerce.Application/Services/OrderService.cs): `backend/ECommerceApp/ECommerce.Application/Services/OrderService.cs`
- [Review rules](https://github.com/sarveshss45/ecommerceapp/blob/main/backend/ECommerceApp/ECommerce.Application/Services/ReviewService.cs): `backend/ECommerceApp/ECommerce.Application/Services/ReviewService.cs`
- [Authentication](https://github.com/sarveshss45/ecommerceapp/blob/main/backend/ECommerceApp/ECommerce.Application/Services/AuthService.cs): `backend/ECommerceApp/ECommerce.Application/Services/AuthService.cs`

### Domain and persistence

- [Commerce entities](https://github.com/sarveshss45/ecommerceapp/blob/main/backend/ECommerceApp/ECommerce.Domain/Entities/Product.cs): `backend/ECommerceApp/ECommerce.Domain/Entities/Product.cs`
- [Review entity](https://github.com/sarveshss45/ecommerceapp/blob/main/backend/ECommerceApp/ECommerce.Domain/Entities/Review.cs): `backend/ECommerceApp/ECommerce.Domain/Entities/Review.cs`
- [Feature repositories](https://github.com/sarveshss45/ecommerceapp/blob/main/backend/ECommerceApp/ECommerce.Infrastructure/Repositories/OrderRepository.cs): `backend/ECommerceApp/ECommerce.Infrastructure/Repositories/OrderRepository.cs`
- [Review repository](https://github.com/sarveshss45/ecommerceapp/blob/main/backend/ECommerceApp/ECommerce.Infrastructure/Repositories/ReviewRepository.cs): `backend/ECommerceApp/ECommerce.Infrastructure/Repositories/ReviewRepository.cs`
- [EF data context](https://github.com/sarveshss45/ecommerceapp/blob/main/backend/ECommerceApp/ECommerce.Infrastructure/Data/AppDbContext.cs): `backend/ECommerceApp/ECommerce.Infrastructure/Data/AppDbContext.cs`
- **SQL Server**

### Admin operations

- [Admin screens](https://github.com/sarveshss45/ecommerceapp/blob/main/frontend/src/pages/admin/AdminDashboard.jsx): `frontend/src/pages/admin/AdminDashboard.jsx`
- [Admin endpoints](https://github.com/sarveshss45/ecommerceapp/blob/main/backend/ECommerceApp/ECommerceApp/Controllers/AdminProductsController.cs): `backend/ECommerceApp/ECommerceApp/Controllers/AdminProductsController.cs`

### External services

- [Razorpay service](https://github.com/sarveshss45/ecommerceapp/blob/main/backend/ECommerceApp/ECommerce.Infrastructure/Services/PaymentService.cs): `backend/ECommerceApp/ECommerce.Infrastructure/Services/PaymentService.cs`
- **Razorpay**

### Other components

- **Customer**
- **Administrator**

## Connections

- Customer → React routes: uses
- Administrator → React routes: uses
- React routes → Catalog and details: routes to (evidence: `frontend/src/App.jsx`)
- React routes → Cart and checkout: routes to (evidence: `frontend/src/App.jsx`)
- React routes → Order tracking: routes to (evidence: `frontend/src/App.jsx`)
- React routes → Account and addresses: routes to (evidence: `frontend/src/App.jsx`)
- React routes → Wishlist: routes to (evidence: `frontend/src/App.jsx`)
- React routes → Admin screens: routes to (evidence: `frontend/src/App.jsx`)
- Catalog and details → API clients: requests data
- Cart and checkout → API clients: requests data
- Order tracking → API clients: requests data
- Account and addresses → API clients: requests data (evidence: `frontend/src/pages/MyProfile.jsx`)
- Wishlist → API clients: requests data
- Reviews UI → API clients: uses (evidence: `frontend/src/components/ReviewForm.jsx`)
- API clients → API controllers: calls API
- API clients → Review endpoint: calls API
- Review endpoint → Review rules: delegates to (evidence: `backend/ECommerceApp/ECommerceApp/Controllers/ReviewsController.cs`)
- Review rules → Review repository: queries (evidence: `backend/ECommerceApp/ECommerce.Application/Services/ReviewService.cs`)
- Review repository → EF data context: reads and writes (evidence: `backend/ECommerceApp/ECommerce.Infrastructure/Repositories/ReviewRepository.cs`)
- EF data context → SQL Server: persists
- API controllers → Feature services: delegates to
- Feature services → Feature repositories: uses
- Feature repositories → EF data context: uses
- Admin screens → Admin endpoints: manages via
- Admin endpoints → Feature services: delegates to
- Cart and checkout → Razorpay service: initiates payment
- Razorpay service → Razorpay: creates payment
- Authentication → Feature repositories: uses user data
