# milton-18-coder/asset-management-system architecture

> Architecture diagram of the GitHub repository milton-18-coder/asset-management-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/milton-18-coder/asset-management-system
- Repository: https://github.com/milton-18-coder/asset-management-system

## Overview

This is a campus asset-management web application. Users sign in and work through asset registration and classification, location assignment, purchases, transfers, inspections, maintenance, and audit/notification views; frontend state and API calls connect those workflows to an Express service and MySQL. The graph preserves the README’s major capability areas, but unsampled route implementations and most page-to-page interactions are represented only at subsystem level; their internal call relationships are not assumed.

Main entry points: [`src/components/AssetPriceHistoryModal.jsx`](https://github.com/milton-18-coder/asset-management-system/blob/main/src/components/AssetPriceHistoryModal.jsx) (Price history views), [`src/App.jsx`](https://github.com/milton-18-coder/asset-management-system/blob/main/src/App.jsx) (Application routes), [`src/store/index.js`](https://github.com/milton-18-coder/asset-management-system/blob/main/src/store/index.js) (Redux store), [`server/index.js`](https://github.com/milton-18-coder/asset-management-system/blob/main/server/index.js) (Express API and routing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web application"]
  node_app["Application routes<br/>[App.jsx]"]
  node_assetpages["Asset workflows"]
  node_locationpages["Location mapping"]
  node_procurement["Purchases and vendors<br/>[Purchases.jsx]"]
  node_operations["Transfers and upkeep"]
  node_oversight["Audit and alerts"]
end

subgraph group_state["Client state and UI"]
  node_api["HTTP client<br/>[index.js]"]
  node_redux["Redux store<br/>[index.js]"]
  node_assetsstate["Asset state<br/>[furnitureSlice.js]"]
  node_purchasestate["Purchase state"]
  node_notifstate["Notification state"]
  node_categories["Asset categories<br/>[assetCategories.js]"]
  node_departments["Department rules<br/>[departments.js]"]
  node_pricehistory["Price history views"]
  node_pricechart["Price chart"]
  node_ui["Shared UI components<br/>[UIComponents.jsx]"]
end

subgraph group_backend["API service"]
  node_server["Express API and routing<br/>[index.js]"]
  node_routes["Domain API routes"]
end

subgraph group_data["Persistent data"]
  node_dbinit["Database setup<br/>[db.js]"]
  node_mysql[("MySQL database")]
  node_seed["Initial data seeding<br/>[seedData.js]"]
end

node_users(("Campus users"))

node_users -->|"uses"| node_app
node_app -->|"routes to"| node_assetpages
node_app -->|"synchronizes through"| node_api
node_app -->|"dispatches into"| node_redux
node_assetpages -->|"classifies with"| node_categories
node_assetpages -->|"validates against"| node_departments
node_procurement -->|"updates"| node_purchasestate
node_procurement -->|"updates asset"| node_assetsstate
node_procurement -->|"fetches records"| node_api
node_pricehistory -->|"renders"| node_pricechart
node_pricehistory -->|"records purchase"| node_purchasestate
node_pricehistory -->|"updates asset"| node_assetsstate
node_pricehistory -->|"uses controls"| node_ui
node_redux -->|"registers"| node_assetsstate
node_redux -->|"registers"| node_purchasestate
node_redux -->|"registers"| node_notifstate
node_api -->|"requests API"| node_server
node_server -->|"mounts routes"| node_routes
node_server -->|"initializes"| node_dbinit
node_server -->|"seeds data"| node_seed
node_dbinit -->|"creates tables"| node_mysql
node_routes -.->|"queries pool"| node_dbinit

click node_app "https://github.com/milton-18-coder/asset-management-system/blob/main/src/App.jsx"
click node_assetpages "https://github.com/milton-18-coder/asset-management-system/tree/main/src/pages"
click node_locationpages "https://github.com/milton-18-coder/asset-management-system/tree/main/src/pages"
click node_procurement "https://github.com/milton-18-coder/asset-management-system/blob/main/src/pages/Purchases.jsx"
click node_operations "https://github.com/milton-18-coder/asset-management-system/tree/main/src/pages"
click node_oversight "https://github.com/milton-18-coder/asset-management-system/tree/main/src/pages"
click node_api "https://github.com/milton-18-coder/asset-management-system/blob/main/src/api/index.js"
click node_redux "https://github.com/milton-18-coder/asset-management-system/blob/main/src/store/index.js"
click node_assetsstate "https://github.com/milton-18-coder/asset-management-system/blob/main/src/store/furnitureSlice.js"
click node_purchasestate "https://github.com/milton-18-coder/asset-management-system/blob/main/src/store/purchaseHistorySlice.js"
click node_notifstate "https://github.com/milton-18-coder/asset-management-system/blob/main/src/store/notificationsSlice.js"
click node_categories "https://github.com/milton-18-coder/asset-management-system/blob/main/src/constants/assetCategories.js"
click node_departments "https://github.com/milton-18-coder/asset-management-system/blob/main/src/constants/departments.js"
click node_pricehistory "https://github.com/milton-18-coder/asset-management-system/blob/main/src/components/AssetPriceHistoryModal.jsx"
click node_pricechart "https://github.com/milton-18-coder/asset-management-system/blob/main/src/components/PriceHistoryChart.jsx"
click node_ui "https://github.com/milton-18-coder/asset-management-system/blob/main/src/components/UIComponents.jsx"
click node_server "https://github.com/milton-18-coder/asset-management-system/blob/main/server/index.js"
click node_routes "https://github.com/milton-18-coder/asset-management-system/tree/main/server/routes"
click node_dbinit "https://github.com/milton-18-coder/asset-management-system/blob/main/server/db.js"
click node_seed "https://github.com/milton-18-coder/asset-management-system/blob/main/server/seedData.js"

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_app,node_assetpages,node_locationpages,node_procurement,node_operations,node_oversight,node_users toneBlue
class node_api,node_redux,node_assetsstate,node_purchasestate,node_notifstate,node_categories,node_departments,node_pricehistory,node_pricechart,node_ui toneAmber
class node_server,node_routes toneMint
class node_dbinit,node_mysql,node_seed toneRose
```

## Components

### Web application

- [Application routes](https://github.com/milton-18-coder/asset-management-system/blob/main/src/App.jsx): `src/App.jsx`
- [Asset workflows](https://github.com/milton-18-coder/asset-management-system/tree/main/src/pages): `src/pages`
- [Location mapping](https://github.com/milton-18-coder/asset-management-system/tree/main/src/pages): `src/pages`
- [Purchases and vendors](https://github.com/milton-18-coder/asset-management-system/blob/main/src/pages/Purchases.jsx): `src/pages/Purchases.jsx`
- [Transfers and upkeep](https://github.com/milton-18-coder/asset-management-system/tree/main/src/pages): `src/pages`
- [Audit and alerts](https://github.com/milton-18-coder/asset-management-system/tree/main/src/pages): `src/pages`

### Client state and UI

- [HTTP client](https://github.com/milton-18-coder/asset-management-system/blob/main/src/api/index.js): `src/api/index.js`
- [Redux store](https://github.com/milton-18-coder/asset-management-system/blob/main/src/store/index.js): `src/store/index.js`
- [Asset state](https://github.com/milton-18-coder/asset-management-system/blob/main/src/store/furnitureSlice.js): `src/store/furnitureSlice.js`
- [Purchase state](https://github.com/milton-18-coder/asset-management-system/blob/main/src/store/purchaseHistorySlice.js): `src/store/purchaseHistorySlice.js`
- [Notification state](https://github.com/milton-18-coder/asset-management-system/blob/main/src/store/notificationsSlice.js): `src/store/notificationsSlice.js`
- [Asset categories](https://github.com/milton-18-coder/asset-management-system/blob/main/src/constants/assetCategories.js): `src/constants/assetCategories.js`
- [Department rules](https://github.com/milton-18-coder/asset-management-system/blob/main/src/constants/departments.js): `src/constants/departments.js`
- [Price history views](https://github.com/milton-18-coder/asset-management-system/blob/main/src/components/AssetPriceHistoryModal.jsx): `src/components/AssetPriceHistoryModal.jsx`
- [Price chart](https://github.com/milton-18-coder/asset-management-system/blob/main/src/components/PriceHistoryChart.jsx): `src/components/PriceHistoryChart.jsx`
- [Shared UI components](https://github.com/milton-18-coder/asset-management-system/blob/main/src/components/UIComponents.jsx): `src/components/UIComponents.jsx`

### API service

- [Express API and routing](https://github.com/milton-18-coder/asset-management-system/blob/main/server/index.js): `server/index.js`
- [Domain API routes](https://github.com/milton-18-coder/asset-management-system/tree/main/server/routes): `server/routes`

### Persistent data

- [Database setup](https://github.com/milton-18-coder/asset-management-system/blob/main/server/db.js): `server/db.js`
- **MySQL database**
- [Initial data seeding](https://github.com/milton-18-coder/asset-management-system/blob/main/server/seedData.js): `server/seedData.js`

### Other components

- **Campus users**

## Connections

- Campus users → Application routes: uses (evidence: `README.md`)
- Application routes → Asset workflows: routes to (evidence: `src/App.jsx`)
- Application routes → HTTP client: synchronizes through (evidence: `src/App.jsx`)
- Application routes → Redux store: dispatches into (evidence: `src/App.jsx`)
- Asset workflows → Asset categories: classifies with (evidence: `src/pages/AddFurniture.jsx`)
- Asset workflows → Department rules: validates against (evidence: `src/pages/AddFurniture.jsx`)
- Purchases and vendors → Purchase state: updates (evidence: `src/pages/Purchases.jsx`)
- Purchases and vendors → Asset state: updates asset (evidence: `src/pages/Purchases.jsx`)
- Purchases and vendors → HTTP client: fetches records (evidence: `src/pages/Purchases.jsx`)
- Price history views → Price chart: renders (evidence: `src/components/AssetPriceHistoryModal.jsx`)
- Price history views → Purchase state: records purchase (evidence: `src/components/AssetPriceHistoryModal.jsx`)
- Price history views → Asset state: updates asset (evidence: `src/components/AssetPriceHistoryModal.jsx`)
- Price history views → Shared UI components: uses controls (evidence: `src/components/AssetPriceHistoryModal.jsx`)
- Redux store → Asset state: registers (evidence: `src/store/index.js`)
- Redux store → Purchase state: registers (evidence: `src/store/index.js`)
- Redux store → Notification state: registers (evidence: `src/store/index.js`)
- HTTP client → Express API and routing: requests API (evidence: `src/api/index.js`)
- Express API and routing → Domain API routes: mounts routes (evidence: `server/index.js`)
- Express API and routing → Database setup: initializes (evidence: `server/index.js`)
- Express API and routing → Initial data seeding: seeds data (evidence: `server/index.js`)
- Database setup → MySQL database: creates tables (evidence: `server/db.js`)
- Domain API routes → Database setup: queries pool (evidence: `server/routes/purchaseHistory.js`)
