# erabhishek04/multi-agent-loan-repayment-capability architecture

> Architecture diagram of the GitHub repository erabhishek04/multi-agent-loan-repayment-capability, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/erabhishek04/multi-agent-loan-repayment-capability
- Repository: https://github.com/erabhishek04/multi-agent-loan-repayment-capability

## Overview

This repository is a lightweight loan-review dashboard: a reviewer browses applications, inspects affordability signals, runs simulations, records review decisions and notes, and uses supporting evidence, monitoring, fairness, and knowledge-search features. The sampled implementation is a Node/Express server and browser client with in-memory application data and a configured generative-model integration. The README describes a separate Python/MCP/PostgreSQL/Chroma architecture, but those files are absent from the supplied tree; those integrations are therefore not represented as implemented here. Some feature wiring is documented but its full source was not sampled.

Main entry points: [`frontend/app.js`](https://github.com/erabhishek04/multi-agent-loan-repayment-capability/blob/main/frontend/app.js) (Dashboard client), [`server.js`](https://github.com/erabhishek04/multi-agent-loan-repayment-capability/blob/main/server.js) (Application data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workspace["Review workspace"]
  node_dashboard["Dashboard client<br/>[app.js]"]
  node_export["Queue CSV export<br/>[app.js]"]
end

subgraph group_api["Application API"]
  node_application_api["Application routes<br/>[server.js]"]
  node_auth["Session authentication<br/>[server.js]"]
  node_assessment["Affordability assessment<br/>[server.js]"]
  node_review_state["Review state updates<br/>[server.js]"]
  node_simulation["What-if simulation<br/>[server.js]"]
  node_documents["Document intake<br/>[server.js]"]
  node_audit["Audit and notes<br/>[server.js]"]
end

subgraph group_insight["Review insights"]
  node_specialists["Specialist perspectives<br/>[server.js]"]
  node_ai_explanation["AI explanation<br/>[server.js]"]
  node_summary["Queue summary<br/>[server.js]"]
  node_repayment["Repayment monitoring<br/>[server.js]"]
  node_fairness["Fairness analytics<br/>[server.js]"]
  node_knowledge["Knowledge search<br/>[server.js]"]
end

subgraph group_state["State and integrations"]
  node_app_data[("Application data<br/>[server.js]")]
  node_audit_data[("Audit and document data<br/>[server.js]")]
  node_knowledge_data[("Knowledge records<br/>[server.js]")]
end

node_reviewer(("Reviewer"))
node_model{{"Generative model service"}}

node_reviewer -->|"uses"| node_dashboard
node_dashboard -->|"authenticates"| node_auth
node_dashboard -->|"requests"| node_application_api
node_application_api -->|"reads"| node_app_data
node_application_api -->|"calculates"| node_assessment
node_dashboard -->|"simulates"| node_simulation
node_simulation -->|"reads"| node_app_data
node_dashboard -->|"updates"| node_review_state
node_review_state -->|"writes"| node_app_data
node_dashboard -->|"requests"| node_specialists
node_specialists -->|"uses"| node_assessment
node_dashboard -->|"requests"| node_ai_explanation
node_ai_explanation -->|"uses"| node_assessment
node_ai_explanation -->|"generates"| node_model
node_dashboard -->|"uploads"| node_documents
node_documents -->|"records"| node_audit_data
node_dashboard -->|"records"| node_audit
node_audit -->|"reads and writes"| node_audit_data
node_dashboard -->|"loads"| node_summary
node_summary -->|"calculates"| node_assessment
node_summary -->|"reads"| node_app_data
node_dashboard -->|"loads"| node_repayment
node_repayment -->|"reads"| node_app_data
node_dashboard -->|"loads"| node_fairness
node_fairness -->|"reads"| node_app_data
node_dashboard -->|"searches"| node_knowledge
node_knowledge -->|"searches"| node_knowledge_data
node_dashboard -->|"exports"| node_export

click node_dashboard "https://github.com/erabhishek04/multi-agent-loan-repayment-capability/blob/main/frontend/app.js"
click node_application_api "https://github.com/erabhishek04/multi-agent-loan-repayment-capability/blob/main/server.js"
click node_auth "https://github.com/erabhishek04/multi-agent-loan-repayment-capability/blob/main/server.js"
click node_assessment "https://github.com/erabhishek04/multi-agent-loan-repayment-capability/blob/main/server.js"
click node_review_state "https://github.com/erabhishek04/multi-agent-loan-repayment-capability/blob/main/server.js"
click node_simulation "https://github.com/erabhishek04/multi-agent-loan-repayment-capability/blob/main/server.js"
click node_documents "https://github.com/erabhishek04/multi-agent-loan-repayment-capability/blob/main/server.js"
click node_audit "https://github.com/erabhishek04/multi-agent-loan-repayment-capability/blob/main/server.js"
click node_specialists "https://github.com/erabhishek04/multi-agent-loan-repayment-capability/blob/main/server.js"
click node_ai_explanation "https://github.com/erabhishek04/multi-agent-loan-repayment-capability/blob/main/server.js"
click node_summary "https://github.com/erabhishek04/multi-agent-loan-repayment-capability/blob/main/server.js"
click node_repayment "https://github.com/erabhishek04/multi-agent-loan-repayment-capability/blob/main/server.js"
click node_fairness "https://github.com/erabhishek04/multi-agent-loan-repayment-capability/blob/main/server.js"
click node_knowledge "https://github.com/erabhishek04/multi-agent-loan-repayment-capability/blob/main/server.js"
click node_export "https://github.com/erabhishek04/multi-agent-loan-repayment-capability/blob/main/frontend/app.js"
click node_app_data "https://github.com/erabhishek04/multi-agent-loan-repayment-capability/blob/main/server.js"
click node_audit_data "https://github.com/erabhishek04/multi-agent-loan-repayment-capability/blob/main/server.js"
click node_knowledge_data "https://github.com/erabhishek04/multi-agent-loan-repayment-capability/blob/main/server.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_dashboard,node_export,node_reviewer toneBlue
class node_application_api,node_auth,node_assessment,node_review_state,node_simulation,node_documents,node_audit toneAmber
class node_specialists,node_ai_explanation,node_summary,node_repayment,node_fairness,node_knowledge toneMint
class node_app_data,node_audit_data,node_knowledge_data toneRose
class node_model toneIndigo
```

## Components

### Review workspace

- [Dashboard client](https://github.com/erabhishek04/multi-agent-loan-repayment-capability/blob/main/frontend/app.js): `frontend/app.js`
- [Queue CSV export](https://github.com/erabhishek04/multi-agent-loan-repayment-capability/blob/main/frontend/app.js): `frontend/app.js`

### Application API

- [Application routes](https://github.com/erabhishek04/multi-agent-loan-repayment-capability/blob/main/server.js): `server.js`
- [Session authentication](https://github.com/erabhishek04/multi-agent-loan-repayment-capability/blob/main/server.js): `server.js`
- [Affordability assessment](https://github.com/erabhishek04/multi-agent-loan-repayment-capability/blob/main/server.js): `server.js`
- [Review state updates](https://github.com/erabhishek04/multi-agent-loan-repayment-capability/blob/main/server.js): `server.js`
- [What-if simulation](https://github.com/erabhishek04/multi-agent-loan-repayment-capability/blob/main/server.js): `server.js`
- [Document intake](https://github.com/erabhishek04/multi-agent-loan-repayment-capability/blob/main/server.js): `server.js`
- [Audit and notes](https://github.com/erabhishek04/multi-agent-loan-repayment-capability/blob/main/server.js): `server.js`

### Review insights

- [Specialist perspectives](https://github.com/erabhishek04/multi-agent-loan-repayment-capability/blob/main/server.js): `server.js`
- [AI explanation](https://github.com/erabhishek04/multi-agent-loan-repayment-capability/blob/main/server.js): `server.js`
- [Queue summary](https://github.com/erabhishek04/multi-agent-loan-repayment-capability/blob/main/server.js): `server.js`
- [Repayment monitoring](https://github.com/erabhishek04/multi-agent-loan-repayment-capability/blob/main/server.js): `server.js`
- [Fairness analytics](https://github.com/erabhishek04/multi-agent-loan-repayment-capability/blob/main/server.js): `server.js`
- [Knowledge search](https://github.com/erabhishek04/multi-agent-loan-repayment-capability/blob/main/server.js): `server.js`

### State and integrations

- [Application data](https://github.com/erabhishek04/multi-agent-loan-repayment-capability/blob/main/server.js): `server.js`
- [Audit and document data](https://github.com/erabhishek04/multi-agent-loan-repayment-capability/blob/main/server.js): `server.js`
- [Knowledge records](https://github.com/erabhishek04/multi-agent-loan-repayment-capability/blob/main/server.js): `server.js`

### Other components

- **Reviewer**
- **Generative model service**

## Connections

- Reviewer → Dashboard client: uses
- Dashboard client → Session authentication: authenticates
- Dashboard client → Application routes: requests
- Application routes → Application data: reads
- Application routes → Affordability assessment: calculates
- Dashboard client → What-if simulation: simulates
- What-if simulation → Application data: reads
- Dashboard client → Review state updates: updates
- Review state updates → Application data: writes
- Dashboard client → Specialist perspectives: requests
- Specialist perspectives → Affordability assessment: uses
- Dashboard client → AI explanation: requests
- AI explanation → Affordability assessment: uses
- AI explanation → Generative model service: generates
- Dashboard client → Document intake: uploads
- Document intake → Audit and document data: records
- Dashboard client → Audit and notes: records
- Audit and notes → Audit and document data: reads and writes
- Dashboard client → Queue summary: loads
- Queue summary → Affordability assessment: calculates
- Queue summary → Application data: reads
- Dashboard client → Repayment monitoring: loads
- Repayment monitoring → Application data: reads
- Dashboard client → Fairness analytics: loads
- Fairness analytics → Application data: reads
- Dashboard client → Knowledge search: searches
- Knowledge search → Knowledge records: searches
- Dashboard client → Queue CSV export: exports
