# orlanto2100/percy-inventory-mvp architecture

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

- Interactive diagram: https://gitdiagram.com/orlanto2100/percy-inventory-mvp
- Repository: https://github.com/orlanto2100/percy-inventory-mvp

## Overview

Percy Inventory MVP is a full-stack inventory management application: users work in a React interface, which uses a Spring Boot API backed by PostgreSQL. The main operational workflow covers product and warehouse/location setup, purchase-order management, receiving against outstanding order lines, and inventory movement tracking; dashboards, user administration, and JWT login are supporting capabilities. The graph preserves these documented feature areas. Detailed backend edges are limited to relationships visible in sampled source or the SOURCE INDEX; frontend feature-to-API wiring is not inferred from the tree alone.

Main entry points: [`inventory-frontend/src/app`](https://github.com/orlanto2100/percy-inventory-mvp/tree/main/inventory-frontend/src/app) (React application), [`inventory-backend/src/main/java/com/percy/percyinventorymvp/stockmovement/StockMovementService.java`](https://github.com/orlanto2100/percy-inventory-mvp/blob/main/inventory-backend/src/main/java/com/percy/percyinventorymvp/stockmovement/StockMovementService.java) (Stock movements), [`inventory-backend/src/main/java/com/percy/percyinventorymvp/purchaseorder/PurchaseOrderService.java`](https://github.com/orlanto2100/percy-inventory-mvp/blob/main/inventory-backend/src/main/java/com/percy/percyinventorymvp/purchaseorder/PurchaseOrderService.java) (Purchase orders), [`inventory-backend/src/main/java/com/percy/percyinventorymvp/user/UserService.java`](https://github.com/orlanto2100/percy-inventory-mvp/blob/main/inventory-backend/src/main/java/com/percy/percyinventorymvp/user/UserService.java) (User management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web application"]
  node_frontend["React application"]
  node_dashboard["Dashboard"]
  node_inventory_ui["Inventory views"]
  node_purchasing_ui["Purchasing views"]
  node_receipts_ui["Receiving views"]
  node_movement_ui["Movement views"]
  node_catalog_ui["Catalog administration"]
  node_locations_ui["Warehouse administration"]
  node_users_ui["User administration"]
end

subgraph group_identity["Identity and access"]
  node_auth_ui["Login and route access"]
  node_auth_service["JWT authentication"]
  node_user_service["User management<br/>[UserService.java]"]
end

subgraph group_catalog["Catalog and locations"]
  node_product_service["Product management"]
  node_warehouse_service["Warehouse management"]
  node_location_service["Location management"]
end

subgraph group_operations["Inventory operations"]
  node_purchase_service["Purchase orders"]
  node_receivable_query["Receivable order lines"]
  node_receipt_service["Receipt processing"]
  node_movement_service["Stock movements"]
  node_inventory_service["Inventory balances"]
  node_dashboard_service["Dashboard data"]
end

subgraph group_platform["Persistence"]
  node_postgres[("PostgreSQL")]
end

node_operator(("Inventory user"))

node_operator -->|"uses"| node_frontend
node_frontend -.->|"authenticates through"| node_auth_ui
node_frontend -.->|"views"| node_dashboard
node_frontend -.->|"views"| node_inventory_ui
node_frontend -.->|"manages orders"| node_purchasing_ui
node_frontend -.->|"records receipts"| node_receipts_ui
node_frontend -.->|"tracks movements"| node_movement_ui
node_frontend -.->|"manages products"| node_catalog_ui
node_frontend -.->|"manages locations"| node_locations_ui
node_frontend -.->|"manages users"| node_users_ui
node_frontend -->|"uses backend API"| node_auth_service
node_frontend -.->|"uses backend API"| node_product_service
node_frontend -.->|"uses backend API"| node_warehouse_service
node_frontend -.->|"uses backend API"| node_location_service
node_frontend -.->|"uses backend API"| node_purchase_service
node_frontend -.->|"uses backend API"| node_receipt_service
node_frontend -.->|"uses backend API"| node_movement_service
node_frontend -.->|"uses backend API"| node_dashboard_service
node_frontend -.->|"uses backend API"| node_user_service
node_auth_service -->|"loads accounts"| node_user_service
node_purchase_service -->|"loads products"| node_product_service
node_purchase_service -->|"loads creator"| node_user_service
node_receivable_query -->|"queries order data"| node_purchase_service
node_movement_service -->|"updates balances"| node_inventory_service
node_movement_service -->|"loads products"| node_product_service
node_movement_service -->|"loads warehouses"| node_warehouse_service
node_movement_service -->|"loads locations"| node_location_service
node_movement_service -->|"loads acting user"| node_user_service
node_frontend -->|"application data via backend"| node_postgres

click node_frontend "https://github.com/orlanto2100/percy-inventory-mvp/tree/main/inventory-frontend/src/app"
click node_dashboard "https://github.com/orlanto2100/percy-inventory-mvp/tree/main/inventory-frontend/src/features/dashboard"
click node_inventory_ui "https://github.com/orlanto2100/percy-inventory-mvp/tree/main/inventory-frontend/src/features/inventory"
click node_purchasing_ui "https://github.com/orlanto2100/percy-inventory-mvp/tree/main/inventory-frontend/src/features/purchase-orders"
click node_receipts_ui "https://github.com/orlanto2100/percy-inventory-mvp/tree/main/inventory-frontend/src/features/receipts"
click node_movement_ui "https://github.com/orlanto2100/percy-inventory-mvp/tree/main/inventory-frontend/src/features/stock-movements"
click node_catalog_ui "https://github.com/orlanto2100/percy-inventory-mvp/tree/main/inventory-frontend/src/features/products"
click node_locations_ui "https://github.com/orlanto2100/percy-inventory-mvp/tree/main/inventory-frontend/src/features/warehouses"
click node_users_ui "https://github.com/orlanto2100/percy-inventory-mvp/tree/main/inventory-frontend/src/features/users"
click node_auth_ui "https://github.com/orlanto2100/percy-inventory-mvp/tree/main/inventory-frontend/src/features/auth"
click node_auth_service "https://github.com/orlanto2100/percy-inventory-mvp/tree/main/inventory-backend/src/main/java/com/percy/percyinventorymvp/auth"
click node_user_service "https://github.com/orlanto2100/percy-inventory-mvp/blob/main/inventory-backend/src/main/java/com/percy/percyinventorymvp/user/UserService.java"
click node_product_service "https://github.com/orlanto2100/percy-inventory-mvp/tree/main/inventory-backend/src/main/java/com/percy/percyinventorymvp/product"
click node_warehouse_service "https://github.com/orlanto2100/percy-inventory-mvp/tree/main/inventory-backend/src/main/java/com/percy/percyinventorymvp/warehouse"
click node_location_service "https://github.com/orlanto2100/percy-inventory-mvp/tree/main/inventory-backend/src/main/java/com/percy/percyinventorymvp/location"
click node_purchase_service "https://github.com/orlanto2100/percy-inventory-mvp/blob/main/inventory-backend/src/main/java/com/percy/percyinventorymvp/purchaseorder/PurchaseOrderService.java"
click node_receivable_query "https://github.com/orlanto2100/percy-inventory-mvp/blob/main/inventory-backend/src/main/java/com/percy/percyinventorymvp/receipt/ReceivablePurchaseOrderQueryService.java"
click node_receipt_service "https://github.com/orlanto2100/percy-inventory-mvp/tree/main/inventory-backend/src/main/java/com/percy/percyinventorymvp/receipt"
click node_movement_service "https://github.com/orlanto2100/percy-inventory-mvp/blob/main/inventory-backend/src/main/java/com/percy/percyinventorymvp/stockmovement/StockMovementService.java"
click node_inventory_service "https://github.com/orlanto2100/percy-inventory-mvp/tree/main/inventory-backend/src/main/java/com/percy/percyinventorymvp/inventory"
click node_dashboard_service "https://github.com/orlanto2100/percy-inventory-mvp/tree/main/inventory-backend/src/main/java/com/percy/percyinventorymvp/dashboard"

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_frontend,node_dashboard,node_inventory_ui,node_purchasing_ui,node_receipts_ui,node_movement_ui,node_catalog_ui,node_locations_ui,node_users_ui,node_operator toneBlue
class node_auth_ui,node_auth_service,node_user_service toneAmber
class node_product_service,node_warehouse_service,node_location_service toneMint
class node_purchase_service,node_receivable_query,node_receipt_service,node_movement_service,node_inventory_service,node_dashboard_service toneRose
class node_postgres toneIndigo
```

## Components

### Web application

- [React application](https://github.com/orlanto2100/percy-inventory-mvp/tree/main/inventory-frontend/src/app): `inventory-frontend/src/app`
- [Dashboard](https://github.com/orlanto2100/percy-inventory-mvp/tree/main/inventory-frontend/src/features/dashboard): `inventory-frontend/src/features/dashboard`
- [Inventory views](https://github.com/orlanto2100/percy-inventory-mvp/tree/main/inventory-frontend/src/features/inventory): `inventory-frontend/src/features/inventory`
- [Purchasing views](https://github.com/orlanto2100/percy-inventory-mvp/tree/main/inventory-frontend/src/features/purchase-orders): `inventory-frontend/src/features/purchase-orders`
- [Receiving views](https://github.com/orlanto2100/percy-inventory-mvp/tree/main/inventory-frontend/src/features/receipts): `inventory-frontend/src/features/receipts`
- [Movement views](https://github.com/orlanto2100/percy-inventory-mvp/tree/main/inventory-frontend/src/features/stock-movements): `inventory-frontend/src/features/stock-movements`
- [Catalog administration](https://github.com/orlanto2100/percy-inventory-mvp/tree/main/inventory-frontend/src/features/products): `inventory-frontend/src/features/products`
- [Warehouse administration](https://github.com/orlanto2100/percy-inventory-mvp/tree/main/inventory-frontend/src/features/warehouses): `inventory-frontend/src/features/warehouses`
- [User administration](https://github.com/orlanto2100/percy-inventory-mvp/tree/main/inventory-frontend/src/features/users): `inventory-frontend/src/features/users`

### Identity and access

- [Login and route access](https://github.com/orlanto2100/percy-inventory-mvp/tree/main/inventory-frontend/src/features/auth): `inventory-frontend/src/features/auth`
- [JWT authentication](https://github.com/orlanto2100/percy-inventory-mvp/tree/main/inventory-backend/src/main/java/com/percy/percyinventorymvp/auth): `inventory-backend/src/main/java/com/percy/percyinventorymvp/auth`
- [User management](https://github.com/orlanto2100/percy-inventory-mvp/blob/main/inventory-backend/src/main/java/com/percy/percyinventorymvp/user/UserService.java): `inventory-backend/src/main/java/com/percy/percyinventorymvp/user/UserService.java`

### Catalog and locations

- [Product management](https://github.com/orlanto2100/percy-inventory-mvp/tree/main/inventory-backend/src/main/java/com/percy/percyinventorymvp/product): `inventory-backend/src/main/java/com/percy/percyinventorymvp/product`
- [Warehouse management](https://github.com/orlanto2100/percy-inventory-mvp/tree/main/inventory-backend/src/main/java/com/percy/percyinventorymvp/warehouse): `inventory-backend/src/main/java/com/percy/percyinventorymvp/warehouse`
- [Location management](https://github.com/orlanto2100/percy-inventory-mvp/tree/main/inventory-backend/src/main/java/com/percy/percyinventorymvp/location): `inventory-backend/src/main/java/com/percy/percyinventorymvp/location`

### Inventory operations

- [Purchase orders](https://github.com/orlanto2100/percy-inventory-mvp/blob/main/inventory-backend/src/main/java/com/percy/percyinventorymvp/purchaseorder/PurchaseOrderService.java): `inventory-backend/src/main/java/com/percy/percyinventorymvp/purchaseorder/PurchaseOrderService.java`
- [Receivable order lines](https://github.com/orlanto2100/percy-inventory-mvp/blob/main/inventory-backend/src/main/java/com/percy/percyinventorymvp/receipt/ReceivablePurchaseOrderQueryService.java): `inventory-backend/src/main/java/com/percy/percyinventorymvp/receipt/ReceivablePurchaseOrderQueryService.java`
- [Receipt processing](https://github.com/orlanto2100/percy-inventory-mvp/tree/main/inventory-backend/src/main/java/com/percy/percyinventorymvp/receipt): `inventory-backend/src/main/java/com/percy/percyinventorymvp/receipt`
- [Stock movements](https://github.com/orlanto2100/percy-inventory-mvp/blob/main/inventory-backend/src/main/java/com/percy/percyinventorymvp/stockmovement/StockMovementService.java): `inventory-backend/src/main/java/com/percy/percyinventorymvp/stockmovement/StockMovementService.java`
- [Inventory balances](https://github.com/orlanto2100/percy-inventory-mvp/tree/main/inventory-backend/src/main/java/com/percy/percyinventorymvp/inventory): `inventory-backend/src/main/java/com/percy/percyinventorymvp/inventory`
- [Dashboard data](https://github.com/orlanto2100/percy-inventory-mvp/tree/main/inventory-backend/src/main/java/com/percy/percyinventorymvp/dashboard): `inventory-backend/src/main/java/com/percy/percyinventorymvp/dashboard`

### Persistence

- **PostgreSQL**

### Other components

- **Inventory user**

## Connections

- Inventory user → React application: uses
- React application → Login and route access: authenticates through (evidence: `inventory-frontend/src/app/router.tsx`)
- React application → Dashboard: views (evidence: `inventory-frontend/src/app/router.tsx`)
- React application → Inventory views: views (evidence: `inventory-frontend/src/app/router.tsx`)
- React application → Purchasing views: manages orders (evidence: `inventory-frontend/src/app/router.tsx`)
- React application → Receiving views: records receipts (evidence: `inventory-frontend/src/app/router.tsx`)
- React application → Movement views: tracks movements (evidence: `inventory-frontend/src/app/router.tsx`)
- React application → Catalog administration: manages products (evidence: `inventory-frontend/src/app/router.tsx`)
- React application → Warehouse administration: manages locations (evidence: `inventory-frontend/src/app/router.tsx`)
- React application → User administration: manages users (evidence: `inventory-frontend/src/app/router.tsx`)
- React application → JWT authentication: uses backend API
- React application → Product management: uses backend API
- React application → Warehouse management: uses backend API
- React application → Location management: uses backend API
- React application → Purchase orders: uses backend API
- React application → Receipt processing: uses backend API
- React application → Stock movements: uses backend API
- React application → Dashboard data: uses backend API
- React application → User management: uses backend API
- JWT authentication → User management: loads accounts (evidence: `inventory-backend/src/main/java/com/percy/percyinventorymvp/auth/AuthService.java`)
- Purchase orders → Product management: loads products (evidence: `inventory-backend/src/main/java/com/percy/percyinventorymvp/purchaseorder/PurchaseOrderService.java`)
- Purchase orders → User management: loads creator (evidence: `inventory-backend/src/main/java/com/percy/percyinventorymvp/purchaseorder/PurchaseOrderService.java`)
- Receivable order lines → Purchase orders: queries order data (evidence: `inventory-backend/src/main/java/com/percy/percyinventorymvp/receipt/ReceivablePurchaseOrderQueryService.java`)
- Stock movements → Inventory balances: updates balances (evidence: `inventory-backend/src/main/java/com/percy/percyinventorymvp/stockmovement/StockMovementService.java`)
- Stock movements → Product management: loads products (evidence: `inventory-backend/src/main/java/com/percy/percyinventorymvp/stockmovement/StockMovementService.java`)
- Stock movements → Warehouse management: loads warehouses (evidence: `inventory-backend/src/main/java/com/percy/percyinventorymvp/stockmovement/StockMovementService.java`)
- Stock movements → Location management: loads locations (evidence: `inventory-backend/src/main/java/com/percy/percyinventorymvp/stockmovement/StockMovementService.java`)
- Stock movements → User management: loads acting user (evidence: `inventory-backend/src/main/java/com/percy/percyinventorymvp/stockmovement/StockMovementService.java`)
- React application → PostgreSQL: application data via backend
