# marioshehan22/inventory-management-react-springboot architecture

> Architecture diagram of the GitHub repository marioshehan22/inventory-management-react-springboot, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/marioshehan22/inventory-management-react-springboot
- Repository: https://github.com/marioshehan22/inventory-management-react-springboot

## Overview

This is a point-of-sale and inventory management system: an admin web application fronts a Spring service with product, stock, customer, order, payment, and loyalty capabilities. The visible order workflow creates an order, processes its items against batch stock, records inventory changes and payment, and may send a customer confirmation. The frontend-to-backend transport is not shown in the sampled sources, so no API connection is asserted; unsampled capabilities are represented at their known module paths.

Main entry points: [`inventory-admin/src/App.tsx`](https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-admin/src/App.tsx) (Admin navigation), [`inventory-spring/src/main/java/com/pos/system/service/impl/OrderDetailServiceImpl.java`](https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-spring/src/main/java/com/pos/system/service/impl/OrderDetailServiceImpl.java) (Order processing), [`inventory-admin/src/pages/OrderPage.tsx`](https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-admin/src/pages/OrderPage.tsx) (Order management), [`inventory-spring/src/main/java/com/pos/system/service/impl/ProductServiceImpl.java`](https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-spring/src/main/java/com/pos/system/service/impl/ProductServiceImpl.java) (Product operations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_admin["Admin interface"]
  node_adminapp["Admin navigation<br/>[App.tsx]"]
  node_dashboard["Dashboard<br/>[DashboardPage.tsx]"]
  node_catalogui["Catalog management<br/>[ProductPage.tsx]"]
  node_customerui["Customer management<br/>[CustomerPage.tsx]"]
  node_supplierui["Supplier management<br/>[SupplierPage.tsx]"]
  node_batchui["Batch management<br/>[BatchPage.tsx]"]
  node_orderui["Order management<br/>[OrderPage.tsx]"]
  node_orderpanel["Order entry<br/>[OrderPanel.tsx]"]
  node_paymentloyaltyui["Payment and loyalty"]
  node_auth["Role-based sign-in<br/>[useAuth.ts]"]
end

subgraph group_catalog["Catalog and stock"]
end

subgraph group_commerce["Orders and payments"]
  node_orderlogic["Order processing"]
end

subgraph group_backend["Spring API and services"]
  node_productapi["Product endpoints"]
  node_productservice["Product operations"]
  node_batchapi["Batch endpoints"]
  node_itemapi["Item detail endpoints"]
  node_orderapi["Order endpoints"]
  node_paymentapi["Payment endpoints"]
  node_loyaltyapi["Loyalty endpoints"]
  node_customerapi["Customer endpoints"]
  node_inventory_backend_batch["Batch operations"]
  node_item_service["Item detail operations"]
  node_payment_service["Payment operations"]
  node_loyalty_service["Loyalty operations"]
  node_customer_service["Customer operations"]
  node_product_store["Product repository<br/>[ProductRepo.java]"]
end

subgraph group_state["Persistent domain state"]
  node_stockstore[("Batch and inventory state<br/>[Batch.java]")]
  node_itemstate[("Order item state<br/>[ItemDetail.java]")]
  node_orderstate[("Order state<br/>[OrderDetail.java]")]
end

node_operator(("POS operator"))
node_identity{{"Keycloak identity"}}
node_mail{{"Mail service"}}

node_operator -->|"uses"| node_adminapp
node_adminapp -->|"renders"| node_dashboard
node_adminapp -->|"renders"| node_catalogui
node_adminapp -->|"renders"| node_customerui
node_adminapp -->|"renders"| node_supplierui
node_adminapp -->|"renders"| node_batchui
node_adminapp -->|"renders"| node_orderui
node_adminapp -->|"renders"| node_paymentloyaltyui
node_orderui -.->|"uses"| node_orderpanel
node_auth -->|"reads token"| node_identity
node_productapi -->|"delegates to"| node_productservice
node_batchapi -->|"delegates to"| node_inventory_backend_batch
node_itemapi -->|"delegates to"| node_item_service
node_orderapi -.->|"delegates to"| node_orderlogic
node_paymentapi -.->|"delegates to"| node_payment_service
node_loyaltyapi -.->|"delegates to"| node_loyalty_service
node_customerapi -.->|"delegates to"| node_customer_service
node_productservice -->|"reads/writes"| node_product_store
node_orderlogic -->|"updates stock"| node_stockstore
node_orderlogic -->|"creates items"| node_itemstate
node_orderlogic -->|"creates order"| node_orderstate
node_orderlogic -->|"sends confirmation"| node_mail

click node_adminapp "https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-admin/src/App.tsx"
click node_dashboard "https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-admin/src/pages/DashboardPage.tsx"
click node_catalogui "https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-admin/src/pages/ProductPage.tsx"
click node_customerui "https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-admin/src/pages/CustomerPage.tsx"
click node_supplierui "https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-admin/src/pages/SupplierPage.tsx"
click node_batchui "https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-admin/src/pages/BatchPage.tsx"
click node_orderui "https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-admin/src/pages/OrderPage.tsx"
click node_orderpanel "https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-admin/src/pages/OrderPanel.tsx"
click node_paymentloyaltyui "https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-admin/src/pages/PaymentLoyaltyPages.tsx"
click node_auth "https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-admin/src/auth/useAuth.ts"
click node_productapi "https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-spring/src/main/java/com/pos/system/controller/ProductController.java"
click node_productservice "https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-spring/src/main/java/com/pos/system/service/impl/ProductServiceImpl.java"
click node_batchapi "https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-spring/src/main/java/com/pos/system/controller/BatchController.java"
click node_itemapi "https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-spring/src/main/java/com/pos/system/controller/ItemDetailController.java"
click node_orderapi "https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-spring/src/main/java/com/pos/system/controller/OrderController.java"
click node_orderlogic "https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-spring/src/main/java/com/pos/system/service/impl/OrderDetailServiceImpl.java"
click node_paymentapi "https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-spring/src/main/java/com/pos/system/controller/PaymentController.java"
click node_loyaltyapi "https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-spring/src/main/java/com/pos/system/controller/LoyaltyCardController.java"
click node_customerapi "https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-spring/src/main/java/com/pos/system/controller/CustomerController.java"
click node_stockstore "https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-spring/src/main/java/com/pos/system/entity/Batch.java"
click node_itemstate "https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-spring/src/main/java/com/pos/system/entity/ItemDetail.java"
click node_orderstate "https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-spring/src/main/java/com/pos/system/entity/OrderDetail.java"
click node_inventory_backend_batch "https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-spring/src/main/java/com/pos/system/service/impl/BatchServiceImpl.java"
click node_item_service "https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-spring/src/main/java/com/pos/system/service/impl/ItemDetailServiceImpl.java"
click node_payment_service "https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-spring/src/main/java/com/pos/system/service/impl/PaymentServiceImpl.java"
click node_loyalty_service "https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-spring/src/main/java/com/pos/system/service/impl/LoyaltyCardServiceImpl.java"
click node_customer_service "https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-spring/src/main/java/com/pos/system/service/impl/CustomerServiceImpl.java"
click node_product_store "https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-spring/src/main/java/com/pos/system/repo/ProductRepo.java"

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_adminapp,node_dashboard,node_catalogui,node_customerui,node_supplierui,node_batchui,node_orderui,node_orderpanel,node_paymentloyaltyui,node_auth toneBlue
class node_orderlogic toneMint
class node_productapi,node_productservice,node_batchapi,node_itemapi,node_orderapi,node_paymentapi,node_loyaltyapi,node_customerapi,node_inventory_backend_batch,node_item_service,node_payment_service,node_loyalty_service,node_customer_service,node_product_store toneRose
class node_stockstore,node_itemstate,node_orderstate,node_operator,node_identity,node_mail toneIndigo
```

## Components

### Admin interface

- [Admin navigation](https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-admin/src/App.tsx): `inventory-admin/src/App.tsx`
- [Dashboard](https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-admin/src/pages/DashboardPage.tsx): `inventory-admin/src/pages/DashboardPage.tsx`
- [Catalog management](https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-admin/src/pages/ProductPage.tsx): `inventory-admin/src/pages/ProductPage.tsx`
- [Customer management](https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-admin/src/pages/CustomerPage.tsx): `inventory-admin/src/pages/CustomerPage.tsx`
- [Supplier management](https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-admin/src/pages/SupplierPage.tsx): `inventory-admin/src/pages/SupplierPage.tsx`
- [Batch management](https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-admin/src/pages/BatchPage.tsx): `inventory-admin/src/pages/BatchPage.tsx`
- [Order management](https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-admin/src/pages/OrderPage.tsx): `inventory-admin/src/pages/OrderPage.tsx`
- [Order entry](https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-admin/src/pages/OrderPanel.tsx): `inventory-admin/src/pages/OrderPanel.tsx`
- [Payment and loyalty](https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-admin/src/pages/PaymentLoyaltyPages.tsx): `inventory-admin/src/pages/PaymentLoyaltyPages.tsx`
- [Role-based sign-in](https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-admin/src/auth/useAuth.ts): `inventory-admin/src/auth/useAuth.ts`

### Orders and payments

- [Order processing](https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-spring/src/main/java/com/pos/system/service/impl/OrderDetailServiceImpl.java): `inventory-spring/src/main/java/com/pos/system/service/impl/OrderDetailServiceImpl.java`

### Spring API and services

- [Product endpoints](https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-spring/src/main/java/com/pos/system/controller/ProductController.java): `inventory-spring/src/main/java/com/pos/system/controller/ProductController.java`
- [Product operations](https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-spring/src/main/java/com/pos/system/service/impl/ProductServiceImpl.java): `inventory-spring/src/main/java/com/pos/system/service/impl/ProductServiceImpl.java`
- [Batch endpoints](https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-spring/src/main/java/com/pos/system/controller/BatchController.java): `inventory-spring/src/main/java/com/pos/system/controller/BatchController.java`
- [Item detail endpoints](https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-spring/src/main/java/com/pos/system/controller/ItemDetailController.java): `inventory-spring/src/main/java/com/pos/system/controller/ItemDetailController.java`
- [Order endpoints](https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-spring/src/main/java/com/pos/system/controller/OrderController.java): `inventory-spring/src/main/java/com/pos/system/controller/OrderController.java`
- [Payment endpoints](https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-spring/src/main/java/com/pos/system/controller/PaymentController.java): `inventory-spring/src/main/java/com/pos/system/controller/PaymentController.java`
- [Loyalty endpoints](https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-spring/src/main/java/com/pos/system/controller/LoyaltyCardController.java): `inventory-spring/src/main/java/com/pos/system/controller/LoyaltyCardController.java`
- [Customer endpoints](https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-spring/src/main/java/com/pos/system/controller/CustomerController.java): `inventory-spring/src/main/java/com/pos/system/controller/CustomerController.java`
- [Batch operations](https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-spring/src/main/java/com/pos/system/service/impl/BatchServiceImpl.java): `inventory-spring/src/main/java/com/pos/system/service/impl/BatchServiceImpl.java`
- [Item detail operations](https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-spring/src/main/java/com/pos/system/service/impl/ItemDetailServiceImpl.java): `inventory-spring/src/main/java/com/pos/system/service/impl/ItemDetailServiceImpl.java`
- [Payment operations](https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-spring/src/main/java/com/pos/system/service/impl/PaymentServiceImpl.java): `inventory-spring/src/main/java/com/pos/system/service/impl/PaymentServiceImpl.java`
- [Loyalty operations](https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-spring/src/main/java/com/pos/system/service/impl/LoyaltyCardServiceImpl.java): `inventory-spring/src/main/java/com/pos/system/service/impl/LoyaltyCardServiceImpl.java`
- [Customer operations](https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-spring/src/main/java/com/pos/system/service/impl/CustomerServiceImpl.java): `inventory-spring/src/main/java/com/pos/system/service/impl/CustomerServiceImpl.java`
- [Product repository](https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-spring/src/main/java/com/pos/system/repo/ProductRepo.java): `inventory-spring/src/main/java/com/pos/system/repo/ProductRepo.java`

### Persistent domain state

- [Batch and inventory state](https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-spring/src/main/java/com/pos/system/entity/Batch.java): `inventory-spring/src/main/java/com/pos/system/entity/Batch.java`
- [Order item state](https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-spring/src/main/java/com/pos/system/entity/ItemDetail.java): `inventory-spring/src/main/java/com/pos/system/entity/ItemDetail.java`
- [Order state](https://github.com/marioshehan22/inventory-management-react-springboot/blob/developer/inventory-spring/src/main/java/com/pos/system/entity/OrderDetail.java): `inventory-spring/src/main/java/com/pos/system/entity/OrderDetail.java`

### Other components

- **POS operator**
- **Keycloak identity**
- **Mail service**

## Connections

- POS operator → Admin navigation: uses
- Admin navigation → Dashboard: renders (evidence: `inventory-admin/src/App.tsx`)
- Admin navigation → Catalog management: renders (evidence: `inventory-admin/src/App.tsx`)
- Admin navigation → Customer management: renders (evidence: `inventory-admin/src/App.tsx`)
- Admin navigation → Supplier management: renders (evidence: `inventory-admin/src/App.tsx`)
- Admin navigation → Batch management: renders (evidence: `inventory-admin/src/App.tsx`)
- Admin navigation → Order management: renders (evidence: `inventory-admin/src/App.tsx`)
- Admin navigation → Payment and loyalty: renders (evidence: `inventory-admin/src/App.tsx`)
- Order management → Order entry: uses
- Role-based sign-in → Keycloak identity: reads token (evidence: `inventory-admin/src/auth/useAuth.ts`)
- Product endpoints → Product operations: delegates to (evidence: `inventory-spring/src/main/java/com/pos/system/controller/ProductController.java`)
- Batch endpoints → Batch operations: delegates to (evidence: `inventory-spring/src/main/java/com/pos/system/controller/BatchController.java`)
- Item detail endpoints → Item detail operations: delegates to (evidence: `inventory-spring/src/main/java/com/pos/system/controller/ItemDetailController.java`)
- Order endpoints → Order processing: delegates to
- Payment endpoints → Payment operations: delegates to
- Loyalty endpoints → Loyalty operations: delegates to
- Customer endpoints → Customer operations: delegates to
- Product operations → Product repository: reads/writes (evidence: `inventory-spring/src/main/java/com/pos/system/service/impl/ProductServiceImpl.java`)
- Order processing → Batch and inventory state: updates stock (evidence: `inventory-spring/src/main/java/com/pos/system/service/impl/OrderDetailServiceImpl.java`)
- Order processing → Order item state: creates items (evidence: `inventory-spring/src/main/java/com/pos/system/service/impl/OrderDetailServiceImpl.java`)
- Order processing → Order state: creates order (evidence: `inventory-spring/src/main/java/com/pos/system/service/impl/OrderDetailServiceImpl.java`)
- Order processing → Mail service: sends confirmation (evidence: `inventory-spring/src/main/java/com/pos/system/service/impl/OrderDetailServiceImpl.java`)
