# suryansh2188/e-commerce-application architecture

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

- Interactive diagram: https://gitdiagram.com/suryansh2188/e-commerce-application
- Repository: https://github.com/suryansh2188/e-commerce-application

## Overview

ShopiTry is a decoupled e-commerce platform. Customers browse the storefront, manage a cart, and check out through the gateway and order service; checkout invokes payment processing, while order-status changes can trigger notifications. Administrators use a separate dashboard for catalog and order operations and service-health monitoring. The README documents the broad service architecture; sampled source confirms catalog seeding and storage behavior, checkout calls to payment and notification services, and local Lambda adapters. Some frontend and service integrations are documented but not visible in the sampled call sites.

Main entry points: [`backend/gateway-service/src/index.js`](https://github.com/suryansh2188/e-commerce-application/blob/main/backend/gateway-service/src/index.js) (API Gateway), [`backend/order-service/src/index.js`](https://github.com/suryansh2188/e-commerce-application/blob/main/backend/order-service/src/index.js) (Order Service), [`backend/catalog-service/src/index.js`](https://github.com/suryansh2188/e-commerce-application/blob/main/backend/catalog-service/src/index.js) (Catalog Service), [`backend/payment-service/src/local-server.js`](https://github.com/suryansh2188/e-commerce-application/blob/main/backend/payment-service/src/local-server.js) (Payment HTTP Adapter)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_apps["Web Applications"]
  node_storefront["Storefront<br/>[App.jsx]"]
  node_admin["Admin Dashboard<br/>[App.jsx]"]
end

subgraph group_commerce["Commerce Services"]
  node_gateway["API Gateway<br/>[index.js]"]
  node_catalog["Catalog Service<br/>[index.js]"]
  node_cart["Cart Service<br/>[index.js]"]
  node_orders["Order Service<br/>[index.js]"]
end

subgraph group_events["Payment and Notifications"]
  node_payment["Payment Handler<br/>[handler.js]"]
  node_payment_adapter["Payment HTTP Adapter<br/>[local-server.js]"]
  node_notification["Notification Handler<br/>[handler.js]"]
  node_notification_adapter["Notification HTTP Adapter<br/>[local-server.js]"]
end

subgraph group_data["Product Data"]
  node_seed["Catalog Seed Data<br/>[seedData.js]"]
  node_catalog_db[("MongoDB Atlas")]
  node_orders_state[("Order State<br/>[index.js]")]
end

node_customer(("Customer"))
node_administrator(("Administrator"))

node_customer -->|"uses"| node_storefront
node_administrator -->|"uses"| node_admin
node_storefront -->|"API requests"| node_gateway
node_admin -->|"API requests"| node_gateway
node_gateway -->|"proxies requests"| node_catalog
node_gateway -->|"proxies requests"| node_cart
node_gateway -->|"proxies requests"| node_orders
node_gateway -->|"proxies requests"| node_payment_adapter
node_gateway -->|"proxies requests"| node_notification_adapter
node_orders -->|"requests payment"| node_payment_adapter
node_payment_adapter -->|"invokes handler"| node_payment
node_orders -->|"sends status update"| node_notification_adapter
node_notification_adapter -->|"invokes handler"| node_notification
node_catalog -->|"loads seed data"| node_seed
node_catalog -->|"reads and writes"| node_catalog_db
node_orders -->|"reads and updates"| node_orders_state

click node_storefront "https://github.com/suryansh2188/e-commerce-application/blob/main/frontend/storefront/src/App.jsx"
click node_admin "https://github.com/suryansh2188/e-commerce-application/blob/main/frontend/admin-dashboard/src/App.jsx"
click node_gateway "https://github.com/suryansh2188/e-commerce-application/blob/main/backend/gateway-service/src/index.js"
click node_catalog "https://github.com/suryansh2188/e-commerce-application/blob/main/backend/catalog-service/src/index.js"
click node_cart "https://github.com/suryansh2188/e-commerce-application/blob/main/backend/cart-service/src/index.js"
click node_orders "https://github.com/suryansh2188/e-commerce-application/blob/main/backend/order-service/src/index.js"
click node_payment "https://github.com/suryansh2188/e-commerce-application/blob/main/backend/payment-service/src/handler.js"
click node_payment_adapter "https://github.com/suryansh2188/e-commerce-application/blob/main/backend/payment-service/src/local-server.js"
click node_notification "https://github.com/suryansh2188/e-commerce-application/blob/main/backend/notification-service/src/handler.js"
click node_notification_adapter "https://github.com/suryansh2188/e-commerce-application/blob/main/backend/notification-service/src/local-server.js"
click node_seed "https://github.com/suryansh2188/e-commerce-application/blob/main/backend/catalog-service/src/seedData.js"
click node_orders_state "https://github.com/suryansh2188/e-commerce-application/blob/main/backend/order-service/src/index.js"

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_storefront,node_admin toneBlue
class node_gateway,node_catalog,node_cart,node_orders toneAmber
class node_payment,node_payment_adapter,node_notification,node_notification_adapter toneMint
class node_seed,node_catalog_db,node_orders_state toneRose
class node_customer,node_administrator toneIndigo
```

## Components

### Web Applications

- [Storefront](https://github.com/suryansh2188/e-commerce-application/blob/main/frontend/storefront/src/App.jsx): `frontend/storefront/src/App.jsx`
- [Admin Dashboard](https://github.com/suryansh2188/e-commerce-application/blob/main/frontend/admin-dashboard/src/App.jsx): `frontend/admin-dashboard/src/App.jsx`

### Commerce Services

- [API Gateway](https://github.com/suryansh2188/e-commerce-application/blob/main/backend/gateway-service/src/index.js): `backend/gateway-service/src/index.js`
- [Catalog Service](https://github.com/suryansh2188/e-commerce-application/blob/main/backend/catalog-service/src/index.js): `backend/catalog-service/src/index.js`
- [Cart Service](https://github.com/suryansh2188/e-commerce-application/blob/main/backend/cart-service/src/index.js): `backend/cart-service/src/index.js`
- [Order Service](https://github.com/suryansh2188/e-commerce-application/blob/main/backend/order-service/src/index.js): `backend/order-service/src/index.js`

### Payment and Notifications

- [Payment Handler](https://github.com/suryansh2188/e-commerce-application/blob/main/backend/payment-service/src/handler.js): `backend/payment-service/src/handler.js`
- [Payment HTTP Adapter](https://github.com/suryansh2188/e-commerce-application/blob/main/backend/payment-service/src/local-server.js): `backend/payment-service/src/local-server.js`
- [Notification Handler](https://github.com/suryansh2188/e-commerce-application/blob/main/backend/notification-service/src/handler.js): `backend/notification-service/src/handler.js`
- [Notification HTTP Adapter](https://github.com/suryansh2188/e-commerce-application/blob/main/backend/notification-service/src/local-server.js): `backend/notification-service/src/local-server.js`

### Product Data

- [Catalog Seed Data](https://github.com/suryansh2188/e-commerce-application/blob/main/backend/catalog-service/src/seedData.js): `backend/catalog-service/src/seedData.js`
- **MongoDB Atlas**
- [Order State](https://github.com/suryansh2188/e-commerce-application/blob/main/backend/order-service/src/index.js): `backend/order-service/src/index.js`

### Other components

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

## Connections

- Customer → Storefront: uses (evidence: `README.md`)
- Administrator → Admin Dashboard: uses (evidence: `README.md`)
- Storefront → API Gateway: API requests (evidence: `README.md`)
- Admin Dashboard → API Gateway: API requests (evidence: `frontend/admin-dashboard/src/App.jsx`)
- API Gateway → Catalog Service: proxies requests (evidence: `README.md`)
- API Gateway → Cart Service: proxies requests (evidence: `README.md`)
- API Gateway → Order Service: proxies requests (evidence: `README.md`)
- API Gateway → Payment HTTP Adapter: proxies requests (evidence: `README.md`)
- API Gateway → Notification HTTP Adapter: proxies requests (evidence: `README.md`)
- Order Service → Payment HTTP Adapter: requests payment (evidence: `backend/order-service/src/index.js`)
- Payment HTTP Adapter → Payment Handler: invokes handler (evidence: `backend/payment-service/src/local-server.js`)
- Order Service → Notification HTTP Adapter: sends status update (evidence: `backend/order-service/src/index.js`)
- Notification HTTP Adapter → Notification Handler: invokes handler (evidence: `backend/notification-service/src/local-server.js`)
- Catalog Service → Catalog Seed Data: loads seed data (evidence: `backend/catalog-service/src/index.js`)
- Catalog Service → MongoDB Atlas: reads and writes (evidence: `backend/catalog-service/src/index.js`)
- Order Service → Order State: reads and updates (evidence: `backend/order-service/src/index.js`)
