# cent-hub/inventory_team architecture

> Architecture diagram of the GitHub repository cent-hub/inventory_team, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/cent-hub/inventory_team
- Repository: https://github.com/cent-hub/inventory_team

## Overview

This is a PHP, warehouse-scoped inventory management application. Operators authenticate and use the web interface to manage item SKUs, receive and dispatch stock, transfer stock between warehouses, reconcile adjustments and damaged goods, then review balances, alerts, and transaction reports. StockService is the central transactional layer for inventory movements; the sampled pages show both direct database queries and service-backed actions. The README is empty, so capability coverage comes from the tree and sampled views; unsampled API wiring is not inferred.

Main entry points: [`index.php`](https://github.com/cent-hub/inventory_team/blob/main/index.php) (Application entry), [`config/database.php`](https://github.com/cent-hub/inventory_team/blob/main/config/database.php) (Application database), [`helpers/StockService.php`](https://github.com/cent-hub/inventory_team/blob/main/helpers/StockService.php) (Stock service), [`views/stock_in/index.php`](https://github.com/cent-hub/inventory_team/blob/main/views/stock_in/index.php) (Stock receiving)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and shell"]
  node_web["Application entry<br/>[index.php]"]
  node_auth["Authentication<br/>[AuthController.php]"]
  node_accounts["Users and accounts<br/>[index.php]"]
end

subgraph group_catalog["Catalog and stock"]
  node_itemcatalog["Item catalog<br/>[index.php]"]
  node_inventoryviews["Inventory views<br/>[index.php]"]
  node_finishedgoods["Finished goods<br/>[finished_goods.php]"]
  node_stockcard["Stock card<br/>[stock_card.php]"]
end

subgraph group_movement["Stock movements"]
  node_stockservice["Stock service<br/>[StockService.php]"]
  node_inbound["Inbound and outbound hub<br/>[index.php]"]
  node_stockin["Stock receiving<br/>[index.php]"]
  node_stockout["Stock dispatch<br/>[index.php]"]
  node_transfers["Warehouse transfers<br/>[index.php]"]
  node_adjustments["Stock adjustments<br/>[index.php]"]
  node_operations["Operations hub<br/>[index.php]"]
  node_badproducts["Damaged goods<br/>[create.php]"]
end

subgraph group_oversight["Inventory oversight"]
  node_dashboard["Dashboard<br/>[index.php]"]
  node_reports["Reports<br/>[index.php]"]
  node_stockreports["Transaction reports"]
  node_settings["Preferences and accountability<br/>[accountability.php]"]
end

node_operator(("Warehouse operator"))
node_database[("Application database<br/>[database.php]")]

node_operator -->|"uses"| node_web
node_web -->|"authenticates"| node_auth
node_web -->|"routes"| node_accounts
node_web -->|"routes"| node_itemcatalog
node_web -->|"routes"| node_inbound
node_web -->|"routes"| node_stockin
node_web -->|"routes"| node_stockout
node_web -->|"routes"| node_transfers
node_web -->|"routes"| node_adjustments
node_web -->|"routes"| node_operations
node_web -->|"routes"| node_inventoryviews
node_web -->|"routes"| node_finishedgoods
node_web -->|"routes"| node_stockcard
node_web -->|"routes"| node_dashboard
node_web -->|"routes"| node_reports
node_web -->|"routes"| node_stockreports
node_web -->|"routes"| node_settings
node_accounts -->|"requires"| node_auth
node_stockin -->|"records stock"| node_stockservice
node_adjustments -->|"applies actions"| node_stockservice
node_inbound -->|"queries"| node_database
node_stockin -->|"reads ledger"| node_database
node_stockout -->|"reads ledger"| node_database
node_transfers -->|"reads and writes"| node_database
node_operations -->|"queries"| node_database
node_itemcatalog -->|"creates items"| node_database
node_dashboard -->|"queries balances"| node_database
node_reports -->|"queries inventory"| node_database
node_stockservice -->|"transactions"| node_database
node_badproducts -.->|"handles cancellation"| node_stockservice

click node_web "https://github.com/cent-hub/inventory_team/blob/main/index.php"
click node_auth "https://github.com/cent-hub/inventory_team/blob/main/controllers/AuthController.php"
click node_accounts "https://github.com/cent-hub/inventory_team/blob/main/views/users/index.php"
click node_itemcatalog "https://github.com/cent-hub/inventory_team/blob/main/views/items/index.php"
click node_stockservice "https://github.com/cent-hub/inventory_team/blob/main/helpers/StockService.php"
click node_inbound "https://github.com/cent-hub/inventory_team/blob/main/views/inbound_outbound/index.php"
click node_stockin "https://github.com/cent-hub/inventory_team/blob/main/views/stock_in/index.php"
click node_stockout "https://github.com/cent-hub/inventory_team/blob/main/views/stock_out/index.php"
click node_transfers "https://github.com/cent-hub/inventory_team/blob/main/views/stock_transfer/index.php"
click node_adjustments "https://github.com/cent-hub/inventory_team/blob/main/views/stock_adjustment/index.php"
click node_operations "https://github.com/cent-hub/inventory_team/blob/main/views/stock_operations/index.php"
click node_badproducts "https://github.com/cent-hub/inventory_team/blob/main/api/bad_products/create.php"
click node_inventoryviews "https://github.com/cent-hub/inventory_team/blob/main/views/inventory/index.php"
click node_finishedgoods "https://github.com/cent-hub/inventory_team/blob/main/views/inventory/finished_goods.php"
click node_stockcard "https://github.com/cent-hub/inventory_team/blob/main/views/inventory/stock_card.php"
click node_dashboard "https://github.com/cent-hub/inventory_team/blob/main/views/dashboard/index.php"
click node_reports "https://github.com/cent-hub/inventory_team/blob/main/views/reports/index.php"
click node_stockreports "https://github.com/cent-hub/inventory_team/blob/main/views/reports/stock_transactions.php"
click node_settings "https://github.com/cent-hub/inventory_team/blob/main/views/settings/accountability.php"
click node_database "https://github.com/cent-hub/inventory_team/blob/main/config/database.php"

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_web,node_auth,node_accounts toneBlue
class node_itemcatalog,node_inventoryviews,node_finishedgoods,node_stockcard,node_database toneAmber
class node_stockservice,node_inbound,node_stockin,node_stockout,node_transfers,node_adjustments,node_operations,node_badproducts toneMint
class node_dashboard,node_reports,node_stockreports,node_settings toneRose
class node_operator toneIndigo
```

## Components

### Access and shell

- [Application entry](https://github.com/cent-hub/inventory_team/blob/main/index.php): `index.php`
- [Authentication](https://github.com/cent-hub/inventory_team/blob/main/controllers/AuthController.php): `controllers/AuthController.php`
- [Users and accounts](https://github.com/cent-hub/inventory_team/blob/main/views/users/index.php): `views/users/index.php`

### Catalog and stock

- [Item catalog](https://github.com/cent-hub/inventory_team/blob/main/views/items/index.php): `views/items/index.php`
- [Inventory views](https://github.com/cent-hub/inventory_team/blob/main/views/inventory/index.php): `views/inventory/index.php`
- [Finished goods](https://github.com/cent-hub/inventory_team/blob/main/views/inventory/finished_goods.php): `views/inventory/finished_goods.php`
- [Stock card](https://github.com/cent-hub/inventory_team/blob/main/views/inventory/stock_card.php): `views/inventory/stock_card.php`

### Stock movements

- [Stock service](https://github.com/cent-hub/inventory_team/blob/main/helpers/StockService.php): `helpers/StockService.php`
- [Inbound and outbound hub](https://github.com/cent-hub/inventory_team/blob/main/views/inbound_outbound/index.php): `views/inbound_outbound/index.php`
- [Stock receiving](https://github.com/cent-hub/inventory_team/blob/main/views/stock_in/index.php): `views/stock_in/index.php`
- [Stock dispatch](https://github.com/cent-hub/inventory_team/blob/main/views/stock_out/index.php): `views/stock_out/index.php`
- [Warehouse transfers](https://github.com/cent-hub/inventory_team/blob/main/views/stock_transfer/index.php): `views/stock_transfer/index.php`
- [Stock adjustments](https://github.com/cent-hub/inventory_team/blob/main/views/stock_adjustment/index.php): `views/stock_adjustment/index.php`
- [Operations hub](https://github.com/cent-hub/inventory_team/blob/main/views/stock_operations/index.php): `views/stock_operations/index.php`
- [Damaged goods](https://github.com/cent-hub/inventory_team/blob/main/api/bad_products/create.php): `api/bad_products/create.php`

### Inventory oversight

- [Dashboard](https://github.com/cent-hub/inventory_team/blob/main/views/dashboard/index.php): `views/dashboard/index.php`
- [Reports](https://github.com/cent-hub/inventory_team/blob/main/views/reports/index.php): `views/reports/index.php`
- [Transaction reports](https://github.com/cent-hub/inventory_team/blob/main/views/reports/stock_transactions.php): `views/reports/stock_transactions.php`
- [Preferences and accountability](https://github.com/cent-hub/inventory_team/blob/main/views/settings/accountability.php): `views/settings/accountability.php`

### Other components

- **Warehouse operator**
- [Application database](https://github.com/cent-hub/inventory_team/blob/main/config/database.php): `config/database.php`

## Connections

- Warehouse operator → Application entry: uses
- Application entry → Authentication: authenticates
- Application entry → Users and accounts: routes
- Application entry → Item catalog: routes
- Application entry → Inbound and outbound hub: routes
- Application entry → Stock receiving: routes
- Application entry → Stock dispatch: routes
- Application entry → Warehouse transfers: routes
- Application entry → Stock adjustments: routes
- Application entry → Operations hub: routes
- Application entry → Inventory views: routes
- Application entry → Finished goods: routes
- Application entry → Stock card: routes
- Application entry → Dashboard: routes
- Application entry → Reports: routes
- Application entry → Transaction reports: routes
- Application entry → Preferences and accountability: routes
- Users and accounts → Authentication: requires
- Stock receiving → Stock service: records stock
- Stock adjustments → Stock service: applies actions
- Inbound and outbound hub → Application database: queries
- Stock receiving → Application database: reads ledger
- Stock dispatch → Application database: reads ledger
- Warehouse transfers → Application database: reads and writes
- Operations hub → Application database: queries
- Item catalog → Application database: creates items
- Dashboard → Application database: queries balances
- Reports → Application database: queries inventory
- Stock service → Application database: transactions
- Damaged goods → Stock service: handles cancellation
