# aragondadinesh/7-microservice-project architecture

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

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

## Overview

This is a local polyglot commerce application: a React UI supports login, catalog browsing, stock management, checkout, payment, notifications, and analytics across seven independently owned services. The main checkout path is UI → Orders, which validates catalog prices, reserves inventory, persists the order, and requests a notification; payment separately updates order status and can trigger refunds. The graph preserves documented capabilities and database ownership. Some service internals and UI calls are unsampled, so those relationships rely on README evidence rather than inspected implementations.

Main entry points: [`frontend/src/App.jsx`](https://github.com/aragondadinesh/7-microservice-project/blob/main/frontend/src/App.jsx) (Commerce UI), [`database/bootstrap.sql`](https://github.com/aragondadinesh/7-microservice-project/blob/main/database/bootstrap.sql) (PostgreSQL databases), [`services/order-service/app/main.py`](https://github.com/aragondadinesh/7-microservice-project/blob/main/services/order-service/app/main.py) (Order service), [`services/analytics-service/router.php`](https://github.com/aragondadinesh/7-microservice-project/blob/main/services/analytics-service/router.php) (Analytics service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_ui["Commerce UI<br/>[App.jsx]"]
  node_api["HTTP client<br/>[api.js]"]
end

subgraph group_commerce["Commerce services"]
  node_catalog["Catalog service<br/>[main.go]"]
  node_inventory["Inventory service<br/>[index.js]"]
  node_orders["Order service<br/>[main.py]"]
  node_payments["Payment service<br/>[Program.cs]"]
end

subgraph group_identity["Identity and messaging"]
  node_auth["Auth service"]
  node_authinit["Auth setup"]
  node_notifications["Notification service<br/>[app.rb]"]
end

subgraph group_insights["Analytics"]
  node_analytics["Analytics service<br/>[router.php]"]
end

subgraph group_state["Service data"]
  node_pg[("PostgreSQL databases<br/>[bootstrap.sql]")]
end

node_user(("Shopper / admin"))

node_user -->|"uses"| node_ui
node_ui -->|"sends requests"| node_api
node_ui -->|"authenticates"| node_auth
node_ui -->|"manages products"| node_catalog
node_ui -->|"adjusts stock"| node_inventory
node_ui -->|"creates orders"| node_orders
node_ui -->|"captures / refunds"| node_payments
node_ui -->|"views inbox"| node_notifications
node_ui -->|"views summaries"| node_analytics
node_authinit -->|"initializes tables"| node_pg
node_auth -->|"reads / writes"| node_pg
node_catalog -->|"reads / writes"| node_pg
node_inventory -->|"reads / writes"| node_pg
node_orders -->|"validates prices"| node_catalog
node_orders -->|"reserves / releases"| node_inventory
node_orders -->|"stores orders"| node_pg
node_orders -->|"requests notice"| node_notifications
node_payments -->|"checks / updates status"| node_orders
node_payments -->|"commits / releases stock"| node_inventory
node_payments -->|"requests notice"| node_notifications
node_payments -->|"stores payments"| node_pg
node_notifications -->|"reads / writes inbox"| node_pg
node_analytics -->|"fetches products"| node_catalog
node_analytics -->|"fetches stock"| node_inventory
node_analytics -->|"fetches orders"| node_orders
node_analytics -->|"fetches payments"| node_payments
node_analytics -->|"saves snapshots"| node_pg

click node_ui "https://github.com/aragondadinesh/7-microservice-project/blob/main/frontend/src/App.jsx"
click node_api "https://github.com/aragondadinesh/7-microservice-project/blob/main/frontend/src/api.js"
click node_auth "https://github.com/aragondadinesh/7-microservice-project/blob/main/services/auth-service/src/main/java/com/devopsshack/auth/AuthController.java"
click node_authinit "https://github.com/aragondadinesh/7-microservice-project/blob/main/services/auth-service/src/main/java/com/devopsshack/auth/AuthApplication.java"
click node_catalog "https://github.com/aragondadinesh/7-microservice-project/blob/main/services/catalog-service/main.go"
click node_inventory "https://github.com/aragondadinesh/7-microservice-project/blob/main/services/inventory-service/src/index.js"
click node_orders "https://github.com/aragondadinesh/7-microservice-project/blob/main/services/order-service/app/main.py"
click node_payments "https://github.com/aragondadinesh/7-microservice-project/blob/main/services/payment-service/Program.cs"
click node_notifications "https://github.com/aragondadinesh/7-microservice-project/blob/main/services/notification-service/app.rb"
click node_analytics "https://github.com/aragondadinesh/7-microservice-project/blob/main/services/analytics-service/router.php"
click node_pg "https://github.com/aragondadinesh/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_catalog,node_inventory,node_orders,node_payments toneAmber
class node_auth,node_authinit,node_notifications toneMint
class node_analytics toneRose
class node_pg,node_user toneIndigo
```

## Components

### Web application

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

### Commerce services

- [Catalog service](https://github.com/aragondadinesh/7-microservice-project/blob/main/services/catalog-service/main.go): `services/catalog-service/main.go`
- [Inventory service](https://github.com/aragondadinesh/7-microservice-project/blob/main/services/inventory-service/src/index.js): `services/inventory-service/src/index.js`
- [Order service](https://github.com/aragondadinesh/7-microservice-project/blob/main/services/order-service/app/main.py): `services/order-service/app/main.py`
- [Payment service](https://github.com/aragondadinesh/7-microservice-project/blob/main/services/payment-service/Program.cs): `services/payment-service/Program.cs`

### Identity and messaging

- [Auth service](https://github.com/aragondadinesh/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`
- [Auth setup](https://github.com/aragondadinesh/7-microservice-project/blob/main/services/auth-service/src/main/java/com/devopsshack/auth/AuthApplication.java): `services/auth-service/src/main/java/com/devopsshack/auth/AuthApplication.java`
- [Notification service](https://github.com/aragondadinesh/7-microservice-project/blob/main/services/notification-service/app.rb): `services/notification-service/app.rb`

### Analytics

- [Analytics service](https://github.com/aragondadinesh/7-microservice-project/blob/main/services/analytics-service/router.php): `services/analytics-service/router.php`

### Service data

- [PostgreSQL databases](https://github.com/aragondadinesh/7-microservice-project/blob/main/database/bootstrap.sql): `database/bootstrap.sql`

### Other components

- **Shopper / admin**

## Connections

- Shopper / admin → Commerce UI: uses (evidence: `README.md`)
- Commerce UI → HTTP client: sends requests (evidence: `frontend/src/App.jsx`)
- Commerce UI → Auth service: authenticates (evidence: `frontend/src/App.jsx`)
- Commerce UI → Catalog service: manages products (evidence: `frontend/src/App.jsx`)
- Commerce UI → Inventory service: adjusts stock (evidence: `frontend/src/App.jsx`)
- Commerce UI → Order service: creates orders (evidence: `frontend/src/App.jsx`)
- Commerce UI → Payment service: captures / refunds (evidence: `frontend/src/App.jsx`)
- Commerce UI → Notification service: views inbox (evidence: `README.md`)
- Commerce UI → Analytics service: views summaries (evidence: `README.md`)
- Auth setup → PostgreSQL databases: initializes tables (evidence: `services/auth-service/src/main/java/com/devopsshack/auth/AuthApplication.java`)
- Auth service → PostgreSQL databases: reads / writes (evidence: `services/auth-service/src/main/java/com/devopsshack/auth/AuthController.java`)
- Catalog service → PostgreSQL databases: reads / writes (evidence: `services/catalog-service/main.go`)
- Inventory service → PostgreSQL databases: reads / writes (evidence: `services/inventory-service/src/index.js`)
- Order service → Catalog service: validates prices (evidence: `services/order-service/app/main.py`)
- Order service → Inventory service: reserves / releases (evidence: `services/order-service/app/main.py`)
- Order service → PostgreSQL databases: stores orders (evidence: `services/order-service/app/main.py`)
- Order service → Notification service: requests notice (evidence: `services/order-service/app/main.py`)
- Payment service → Order service: checks / updates status (evidence: `services/payment-service/Program.cs`)
- Payment service → Inventory service: commits / releases stock (evidence: `README.md`)
- Payment service → Notification service: requests notice (evidence: `services/payment-service/Program.cs`)
- Payment service → PostgreSQL databases: stores payments (evidence: `services/payment-service/Program.cs`)
- Notification service → PostgreSQL databases: reads / writes inbox (evidence: `services/notification-service/app.rb`)
- Analytics service → Catalog service: fetches products (evidence: `services/analytics-service/router.php`)
- Analytics service → Inventory service: fetches stock (evidence: `services/analytics-service/router.php`)
- Analytics service → Order service: fetches orders (evidence: `services/analytics-service/router.php`)
- Analytics service → Payment service: fetches payments (evidence: `services/analytics-service/router.php`)
- Analytics service → PostgreSQL databases: saves snapshots (evidence: `services/analytics-service/router.php`)
