# jaiswaladi246/7-microservice-project architecture

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

- Interactive diagram: https://gitdiagram.com/jaiswaladi246/7-microservice-project
- Repository: https://github.com/jaiswaladi246/7-microservice-project

## Overview

This is a local polyglot commerce application: a React interface drives authentication, catalog browsing, inventory management, order checkout, payment/refund, notifications, and analytics across seven independently database-owning services. The main workflow is cart-to-order: Orders fetches authoritative catalog prices, reserves inventory, persists the order, and sends a notification; Payments validates the order and updates its status. Analytics aggregates service APIs and can persist snapshots. Service interactions beyond sampled excerpts are included only where the README documents them.

Main entry points: [`frontend/src/api.js`](https://github.com/jaiswaladi246/7-microservice-project/blob/main/frontend/src/api.js) (API client), [`services/order-service/app/main.py`](https://github.com/jaiswaladi246/7-microservice-project/blob/main/services/order-service/app/main.py) (Order lifecycle), [`services/analytics-service/router.php`](https://github.com/jaiswaladi246/7-microservice-project/blob/main/services/analytics-service/router.php) (Analytics summaries), [`services/payment-service/Program.cs`](https://github.com/jaiswaladi246/7-microservice-project/blob/main/services/payment-service/Program.cs) (Payments)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_ui["React UI<br/>[App.jsx]"]
  node_api["API client<br/>[api.js]"]
end

subgraph group_commerce["Commerce services"]
  node_auth["Authentication"]
  node_catalog["Product catalog<br/>[main.go]"]
  node_inventory["Inventory control<br/>[index.js]"]
  node_orders["Order lifecycle<br/>[main.py]"]
  node_payments["Payments<br/>[Program.cs]"]
end

subgraph group_insights["Notifications and analytics"]
  node_notifications["Notification inbox<br/>[app.rb]"]
  node_analytics["Analytics summaries<br/>[router.php]"]
end

subgraph group_data["Service-owned databases"]
  node_authdb[("Auth database<br/>[bootstrap.sql]")]
  node_catalogdb[("Catalog database<br/>[bootstrap.sql]")]
  node_inventorydb[("Inventory database<br/>[bootstrap.sql]")]
  node_orderdb[("Order database<br/>[bootstrap.sql]")]
  node_paymentdb[("Payment database<br/>[bootstrap.sql]")]
  node_notificationdb[("Notification database<br/>[bootstrap.sql]")]
  node_analyticsdb[("Analytics database<br/>[bootstrap.sql]")]
end

node_shopper(("Shopper"))

node_shopper -->|"uses"| node_ui
node_ui -->|"requests through"| node_api
node_api -->|"routes requests"| node_auth
node_api -->|"routes requests"| node_catalog
node_api -->|"routes requests"| node_inventory
node_api -->|"routes requests"| node_orders
node_api -->|"routes requests"| node_payments
node_api -->|"routes requests"| node_notifications
node_api -->|"routes requests"| node_analytics
node_orders -->|"fetches prices"| node_catalog
node_orders -->|"reserves stock"| node_inventory
node_orders -->|"sends order notice"| node_notifications
node_payments -->|"checks and updates"| node_orders
node_payments -->|"sends payment notice"| node_notifications
node_analytics -->|"reads products"| node_catalog
node_analytics -->|"reads stock"| node_inventory
node_analytics -->|"reads orders"| node_orders
node_analytics -->|"reads payments"| node_payments
node_auth -->|"reads and writes"| node_authdb
node_catalog -->|"reads and writes"| node_catalogdb
node_inventory -->|"reads and writes"| node_inventorydb
node_orders -->|"reads and writes"| node_orderdb
node_payments -->|"reads and writes"| node_paymentdb
node_notifications -->|"reads and writes"| node_notificationdb
node_analytics -->|"saves snapshots"| node_analyticsdb

click node_ui "https://github.com/jaiswaladi246/7-microservice-project/blob/main/frontend/src/App.jsx"
click node_api "https://github.com/jaiswaladi246/7-microservice-project/blob/main/frontend/src/api.js"
click node_auth "https://github.com/jaiswaladi246/7-microservice-project/blob/main/services/auth-service/src/main/java/com/devopsshack/auth/AuthController.java"
click node_catalog "https://github.com/jaiswaladi246/7-microservice-project/blob/main/services/catalog-service/main.go"
click node_inventory "https://github.com/jaiswaladi246/7-microservice-project/blob/main/services/inventory-service/src/index.js"
click node_orders "https://github.com/jaiswaladi246/7-microservice-project/blob/main/services/order-service/app/main.py"
click node_payments "https://github.com/jaiswaladi246/7-microservice-project/blob/main/services/payment-service/Program.cs"
click node_notifications "https://github.com/jaiswaladi246/7-microservice-project/blob/main/services/notification-service/app.rb"
click node_analytics "https://github.com/jaiswaladi246/7-microservice-project/blob/main/services/analytics-service/router.php"
click node_authdb "https://github.com/jaiswaladi246/7-microservice-project/blob/main/database/bootstrap.sql"
click node_catalogdb "https://github.com/jaiswaladi246/7-microservice-project/blob/main/database/bootstrap.sql"
click node_inventorydb "https://github.com/jaiswaladi246/7-microservice-project/blob/main/database/bootstrap.sql"
click node_orderdb "https://github.com/jaiswaladi246/7-microservice-project/blob/main/database/bootstrap.sql"
click node_paymentdb "https://github.com/jaiswaladi246/7-microservice-project/blob/main/database/bootstrap.sql"
click node_notificationdb "https://github.com/jaiswaladi246/7-microservice-project/blob/main/database/bootstrap.sql"
click node_analyticsdb "https://github.com/jaiswaladi246/7-microservice-project/blob/main/database/bootstrap.sql"

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_ui,node_api toneBlue
class node_auth,node_catalog,node_inventory,node_orders,node_payments toneAmber
class node_notifications,node_analytics toneMint
class node_authdb,node_catalogdb,node_inventorydb,node_orderdb,node_paymentdb,node_notificationdb,node_analyticsdb toneRose
class node_shopper toneIndigo
```

## Components

### Web interface

- [React UI](https://github.com/jaiswaladi246/7-microservice-project/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [API client](https://github.com/jaiswaladi246/7-microservice-project/blob/main/frontend/src/api.js): `frontend/src/api.js`

### Commerce services

- [Authentication](https://github.com/jaiswaladi246/7-microservice-project/blob/main/services/auth-service/src/main/java/com/devopsshack/auth/AuthController.java): `services/auth-service/src/main/java/com/devopsshack/auth/AuthController.java`
- [Product catalog](https://github.com/jaiswaladi246/7-microservice-project/blob/main/services/catalog-service/main.go): `services/catalog-service/main.go`
- [Inventory control](https://github.com/jaiswaladi246/7-microservice-project/blob/main/services/inventory-service/src/index.js): `services/inventory-service/src/index.js`
- [Order lifecycle](https://github.com/jaiswaladi246/7-microservice-project/blob/main/services/order-service/app/main.py): `services/order-service/app/main.py`
- [Payments](https://github.com/jaiswaladi246/7-microservice-project/blob/main/services/payment-service/Program.cs): `services/payment-service/Program.cs`

### Notifications and analytics

- [Notification inbox](https://github.com/jaiswaladi246/7-microservice-project/blob/main/services/notification-service/app.rb): `services/notification-service/app.rb`
- [Analytics summaries](https://github.com/jaiswaladi246/7-microservice-project/blob/main/services/analytics-service/router.php): `services/analytics-service/router.php`

### Service-owned databases

- [Auth database](https://github.com/jaiswaladi246/7-microservice-project/blob/main/database/bootstrap.sql): `database/bootstrap.sql`
- [Catalog database](https://github.com/jaiswaladi246/7-microservice-project/blob/main/database/bootstrap.sql): `database/bootstrap.sql`
- [Inventory database](https://github.com/jaiswaladi246/7-microservice-project/blob/main/database/bootstrap.sql): `database/bootstrap.sql`
- [Order database](https://github.com/jaiswaladi246/7-microservice-project/blob/main/database/bootstrap.sql): `database/bootstrap.sql`
- [Payment database](https://github.com/jaiswaladi246/7-microservice-project/blob/main/database/bootstrap.sql): `database/bootstrap.sql`
- [Notification database](https://github.com/jaiswaladi246/7-microservice-project/blob/main/database/bootstrap.sql): `database/bootstrap.sql`
- [Analytics database](https://github.com/jaiswaladi246/7-microservice-project/blob/main/database/bootstrap.sql): `database/bootstrap.sql`

### Other components

- **Shopper**

## Connections

- Shopper → React UI: uses (evidence: `README.md`)
- React UI → API client: requests through (evidence: `frontend/src/App.jsx`)
- API client → Authentication: routes requests (evidence: `README.md`)
- API client → Product catalog: routes requests (evidence: `README.md`)
- API client → Inventory control: routes requests (evidence: `README.md`)
- API client → Order lifecycle: routes requests (evidence: `README.md`)
- API client → Payments: routes requests (evidence: `README.md`)
- API client → Notification inbox: routes requests (evidence: `README.md`)
- API client → Analytics summaries: routes requests (evidence: `README.md`)
- Order lifecycle → Product catalog: fetches prices (evidence: `services/order-service/app/main.py`)
- Order lifecycle → Inventory control: reserves stock (evidence: `services/order-service/app/main.py`)
- Order lifecycle → Notification inbox: sends order notice (evidence: `services/order-service/app/main.py`)
- Payments → Order lifecycle: checks and updates (evidence: `services/payment-service/Program.cs`)
- Payments → Notification inbox: sends payment notice (evidence: `README.md`)
- Analytics summaries → Product catalog: reads products (evidence: `services/analytics-service/router.php`)
- Analytics summaries → Inventory control: reads stock (evidence: `services/analytics-service/router.php`)
- Analytics summaries → Order lifecycle: reads orders (evidence: `services/analytics-service/router.php`)
- Analytics summaries → Payments: reads payments (evidence: `services/analytics-service/router.php`)
- Authentication → Auth database: reads and writes (evidence: `services/auth-service/src/main/java/com/devopsshack/auth/AuthController.java`)
- Product catalog → Catalog database: reads and writes (evidence: `services/catalog-service/main.go`)
- Inventory control → Inventory database: reads and writes (evidence: `README.md`)
- Order lifecycle → Order database: reads and writes (evidence: `services/order-service/app/main.py`)
- Payments → Payment database: reads and writes (evidence: `README.md`)
- Notification inbox → Notification database: reads and writes (evidence: `services/notification-service/app.rb`)
- Analytics summaries → Analytics database: saves snapshots (evidence: `services/analytics-service/router.php`)
