# muhammad-abdullah-shahzad/arms architecture

> Architecture diagram of the GitHub repository muhammad-abdullah-shahzad/arms, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/muhammad-abdullah-shahzad/arms
- Repository: https://github.com/muhammad-abdullah-shahzad/arms

## Overview

ARMS is a role-based asset and debt recovery management system, with additional finance, HR, attendance, verification, chat, and bill-distribution capabilities visible in the repository tree. Users sign in and enter role-specific pages; recovery work is handled through client/case screens and backend APIs, with records persisted in MongoDB. The README documents debt-client and Excel case-upload workflows; sampled source also shows asset recovery and WASA survey paths. Some broader product branches are represented by their existing directories because their implementation was not sampled.

Main entry points: [`client/src/App.jsx`](https://github.com/muhammad-abdullah-shahzad/arms/blob/master/client/src/App.jsx) (Role-based app), [`server/controllers/assetRecoveryController.js`](https://github.com/muhammad-abdullah-shahzad/arms/blob/master/server/controllers/assetRecoveryController.js) (Asset recovery API), [`server/server.js`](https://github.com/muhammad-abdullah-shahzad/arms/blob/master/server/server.js) (Express API server), [`server/controllers/debtRecoveryController.js`](https://github.com/muhammad-abdullah-shahzad/arms/blob/master/server/controllers/debtRecoveryController.js) (Debt recovery API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["User access"]
  node_app["Role-based app<br/>[App.jsx]"]
  node_auth["Authentication<br/>[login.tsx]"]
end

subgraph group_recovery["Recovery operations"]
  node_debtui["Debt recovery UI<br/>[DebtRecovery.jsx]"]
  node_assetui["Asset case UI"]
  node_ro["Officer workflows<br/>[ROCaseList.jsx]"]
  node_dashboard["Recovery dashboards<br/>[PipelineCard.jsx]"]
end

subgraph group_business["Business modules"]
  node_wasaui["WASA surveys"]
  node_finance["Finance and payroll"]
  node_people["HR and attendance"]
  node_chat["Team messaging"]
end

subgraph group_backend["API and services"]
  node_clients["Client records"]
  node_assetapi["Asset recovery API"]
  node_debtapi["Debt recovery API"]
  node_wasaapi["WASA services<br/>[wasaRoutes.js]"]
  node_server["Express API server<br/>[server.js]"]
end

subgraph group_data["Persistent data"]
  node_assetmodel[("Asset case records<br/>[AssetRecovery.js]")]
  node_debtmodel[("Debt case records<br/>[DebtRecovery.js]")]
  node_clientmodel[("Client records store<br/>[Client.js]")]
  node_employee[("Employee records<br/>[Employee.js]")]
end

node_user(("Staff user"))
node_mongodb[("MongoDB")]

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_auth
node_app -.->|"routes to"| node_debtui
node_app -->|"routes to"| node_assetui
node_assetui -.->|"requests routes"| node_assetapi
node_wasaui -->|"fetches survey data"| node_wasaapi
node_server -->|"mounts routes"| node_assetapi
node_server -->|"mounts routes"| node_debtapi
node_server -.->|"mounts routes"| node_wasaapi
node_assetapi -->|"reads and writes"| node_assetmodel
node_assetapi -->|"reads and writes"| node_clientmodel
node_debtapi -->|"reads and writes"| node_debtmodel
node_debtapi -->|"uses employee data"| node_employee
node_clientmodel -.->|"persists records"| node_mongodb
node_assetmodel -.->|"persists records"| node_mongodb
node_debtmodel -.->|"persists records"| node_mongodb

click node_app "https://github.com/muhammad-abdullah-shahzad/arms/blob/master/client/src/App.jsx"
click node_auth "https://github.com/muhammad-abdullah-shahzad/arms/blob/master/client/src/components/Auth/login.tsx"
click node_debtui "https://github.com/muhammad-abdullah-shahzad/arms/blob/master/client/src/components/Cases/DebtRecovery/DebtRecovery.jsx"
click node_assetui "https://github.com/muhammad-abdullah-shahzad/arms/blob/master/client/src/components/Cases/AssetRecovery/ClientCaseRoutes.jsx"
click node_ro "https://github.com/muhammad-abdullah-shahzad/arms/blob/master/client/src/components/RO/ROCaseList.jsx"
click node_dashboard "https://github.com/muhammad-abdullah-shahzad/arms/blob/master/client/src/components/ITManager/dashboard/PipelineCard.jsx"
click node_clients "https://github.com/muhammad-abdullah-shahzad/arms/blob/master/server/controllers/clientController.js"
click node_assetapi "https://github.com/muhammad-abdullah-shahzad/arms/blob/master/server/controllers/assetRecoveryController.js"
click node_debtapi "https://github.com/muhammad-abdullah-shahzad/arms/blob/master/server/controllers/debtRecoveryController.js"
click node_wasaui "https://github.com/muhammad-abdullah-shahzad/arms/blob/master/client/src/components/AssistantRecoveryManager/AssistantRecoveryManagerDashboard.jsx"
click node_wasaapi "https://github.com/muhammad-abdullah-shahzad/arms/blob/master/server/routes/wasaRoutes.js"
click node_finance "https://github.com/muhammad-abdullah-shahzad/arms/tree/master/client/src/components/FinanceManager"
click node_people "https://github.com/muhammad-abdullah-shahzad/arms/tree/master/client/src/components/HR"
click node_chat "https://github.com/muhammad-abdullah-shahzad/arms/tree/master/client/src/components/Chat"
click node_server "https://github.com/muhammad-abdullah-shahzad/arms/blob/master/server/server.js"
click node_assetmodel "https://github.com/muhammad-abdullah-shahzad/arms/blob/master/server/models/AssetRecovery.js"
click node_debtmodel "https://github.com/muhammad-abdullah-shahzad/arms/blob/master/server/models/DebtRecovery.js"
click node_clientmodel "https://github.com/muhammad-abdullah-shahzad/arms/blob/master/server/models/Client.js"
click node_employee "https://github.com/muhammad-abdullah-shahzad/arms/blob/master/server/models/Employee.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_auth,node_user toneBlue
class node_debtui,node_assetui,node_ro,node_dashboard,node_mongodb toneAmber
class node_wasaui,node_finance,node_people,node_chat toneMint
class node_clients,node_assetapi,node_debtapi,node_wasaapi,node_server toneRose
class node_assetmodel,node_debtmodel,node_clientmodel,node_employee toneIndigo
```

## Components

### User access

- [Role-based app](https://github.com/muhammad-abdullah-shahzad/arms/blob/master/client/src/App.jsx): `client/src/App.jsx`
- [Authentication](https://github.com/muhammad-abdullah-shahzad/arms/blob/master/client/src/components/Auth/login.tsx): `client/src/components/Auth/login.tsx`

### Recovery operations

- [Debt recovery UI](https://github.com/muhammad-abdullah-shahzad/arms/blob/master/client/src/components/Cases/DebtRecovery/DebtRecovery.jsx): `client/src/components/Cases/DebtRecovery/DebtRecovery.jsx`
- [Asset case UI](https://github.com/muhammad-abdullah-shahzad/arms/blob/master/client/src/components/Cases/AssetRecovery/ClientCaseRoutes.jsx): `client/src/components/Cases/AssetRecovery/ClientCaseRoutes.jsx`
- [Officer workflows](https://github.com/muhammad-abdullah-shahzad/arms/blob/master/client/src/components/RO/ROCaseList.jsx): `client/src/components/RO/ROCaseList.jsx`
- [Recovery dashboards](https://github.com/muhammad-abdullah-shahzad/arms/blob/master/client/src/components/ITManager/dashboard/PipelineCard.jsx): `client/src/components/ITManager/dashboard/PipelineCard.jsx`

### Business modules

- [WASA surveys](https://github.com/muhammad-abdullah-shahzad/arms/blob/master/client/src/components/AssistantRecoveryManager/AssistantRecoveryManagerDashboard.jsx): `client/src/components/AssistantRecoveryManager/AssistantRecoveryManagerDashboard.jsx`
- [Finance and payroll](https://github.com/muhammad-abdullah-shahzad/arms/tree/master/client/src/components/FinanceManager): `client/src/components/FinanceManager`
- [HR and attendance](https://github.com/muhammad-abdullah-shahzad/arms/tree/master/client/src/components/HR): `client/src/components/HR`
- [Team messaging](https://github.com/muhammad-abdullah-shahzad/arms/tree/master/client/src/components/Chat): `client/src/components/Chat`

### API and services

- [Client records](https://github.com/muhammad-abdullah-shahzad/arms/blob/master/server/controllers/clientController.js): `server/controllers/clientController.js`
- [Asset recovery API](https://github.com/muhammad-abdullah-shahzad/arms/blob/master/server/controllers/assetRecoveryController.js): `server/controllers/assetRecoveryController.js`
- [Debt recovery API](https://github.com/muhammad-abdullah-shahzad/arms/blob/master/server/controllers/debtRecoveryController.js): `server/controllers/debtRecoveryController.js`
- [WASA services](https://github.com/muhammad-abdullah-shahzad/arms/blob/master/server/routes/wasaRoutes.js): `server/routes/wasaRoutes.js`
- [Express API server](https://github.com/muhammad-abdullah-shahzad/arms/blob/master/server/server.js): `server/server.js`

### Persistent data

- [Asset case records](https://github.com/muhammad-abdullah-shahzad/arms/blob/master/server/models/AssetRecovery.js): `server/models/AssetRecovery.js`
- [Debt case records](https://github.com/muhammad-abdullah-shahzad/arms/blob/master/server/models/DebtRecovery.js): `server/models/DebtRecovery.js`
- [Client records store](https://github.com/muhammad-abdullah-shahzad/arms/blob/master/server/models/Client.js): `server/models/Client.js`
- [Employee records](https://github.com/muhammad-abdullah-shahzad/arms/blob/master/server/models/Employee.js): `server/models/Employee.js`

### Other components

- **Staff user**
- **MongoDB**

## Connections

- Staff user → Role-based app: uses (evidence: `client/src/App.jsx`)
- Role-based app → Authentication: routes to (evidence: `client/src/App.jsx`)
- Role-based app → Debt recovery UI: routes to
- Role-based app → Asset case UI: routes to (evidence: `client/src/App.jsx`)
- Asset case UI → Asset recovery API: requests routes
- WASA surveys → WASA services: fetches survey data (evidence: `client/src/components/AssistantRecoveryManager/AssistantRecoveryManagerDashboard.jsx`)
- Express API server → Asset recovery API: mounts routes (evidence: `server/server.js`)
- Express API server → Debt recovery API: mounts routes (evidence: `server/server.js`)
- Express API server → WASA services: mounts routes (evidence: `server/server.js`)
- Asset recovery API → Asset case records: reads and writes (evidence: `server/controllers/assetRecoveryController.js`)
- Asset recovery API → Client records store: reads and writes (evidence: `server/controllers/assetRecoveryController.js`)
- Debt recovery API → Debt case records: reads and writes (evidence: `server/controllers/debtRecoveryController.js`)
- Debt recovery API → Employee records: uses employee data (evidence: `server/controllers/debtRecoveryController.js`)
- Client records store → MongoDB: persists records
- Asset case records → MongoDB: persists records
- Debt case records → MongoDB: persists records
