# gokulprakash23013924/fingent-banking-system architecture

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

- Interactive diagram: https://gitdiagram.com/gokulprakash23013924/fingent-banking-system
- Repository: https://github.com/gokulprakash23013924/fingent-banking-system

## Overview

Fingent is a simulated banking platform: customers and supervisors authenticate, submit chat or banking requests, and receive answers or approval-gated actions. The backend routes chat through a supervisor that understands intent, plans and executes agent tasks, evaluates outcomes, and may recover or request human approval. Banking tools expose account, transaction, fraud, credit, KYC, and dispute capabilities over SQLite-backed services. The React dashboard provides customer, chat, approval, alert, and operations views. Several branches are README- or index-supported but not fully sampled; edges are limited to visible calls or documented relationships.

Main entry points: [`banking-agents/app/supervisor/orchestrator.py`](https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/banking-agents/app/supervisor/orchestrator.py) (Workflow orchestrator), [`frontend/src/api.js`](https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/frontend/src/api.js) (API client), [`frontend/src/App.jsx`](https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/frontend/src/App.jsx) (React dashboard), [`banking-agents/app/tools/definitions.py`](https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/banking-agents/app/tools/definitions.py) (Banking tools)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Banking dashboard"]
  node_dashboard["React dashboard<br/>[App.jsx]"]
  node_chat_view["Chat experience<br/>[ChatView.jsx]"]
  node_customer_view["Customer view<br/>[CustomerView.jsx]"]
  node_approval_view["Approval queue<br/>[ApprovalsView.jsx]"]
  node_ops_view["Operations observatory"]
  node_alerts_view["Alert drawer<br/>[AlertsDrawer.jsx]"]
  node_api_client["API client<br/>[api.js]"]
end

subgraph group_api["API and identity"]
  node_fastapi["HTTP routes<br/>[main.py]"]
  node_handlers["Request handlers<br/>[handlers.py]"]
  node_auth["Session authentication<br/>[auth.py]"]
end

subgraph group_orchestration["Workflow orchestration"]
  node_supervisor["Workflow orchestrator<br/>[orchestrator.py]"]
  node_planner["Workflow planner<br/>[planner.py]"]
  node_workflow_state["Workflow state<br/>[workflow_state.py]"]
  node_recovery["Recovery evaluator<br/>[recovery.py]"]
  node_nlu["Intent understanding<br/>[nlu.py]"]
end

subgraph group_banking["Banking capabilities"]
  node_tool_registry["Tool registry<br/>[registry.py]"]
  node_tool_definitions["Banking tools<br/>[definitions.py]"]
  node_agents["Banking agents"]
  node_services["Banking services<br/>[services.py]"]
  node_rules["Credit policy rules<br/>[rules.py]"]
  node_fraud["Fraud detection<br/>[fraud.py]"]
  node_approvals["Human approvals<br/>[approvals.py]"]
end

subgraph group_platform["Runtime platform"]
  node_gateway["LLM gateway<br/>[gateway.py]"]
  node_pii["PII protection<br/>[pii.py]"]
  node_llm_client["LLM providers<br/>[client.py]"]
  node_request_state["Request state and budget<br/>[state.py]"]
  node_database[("Bank database<br/>[db.py]")]
  node_seed["Demo banking data<br/>[seed.py]"]
end

node_customer(("Customer"))
node_supervisor_user(("Supervisor"))
node_llm_service{{"LLM provider"}}

node_customer -->|"uses"| node_dashboard
node_supervisor_user -->|"uses"| node_dashboard
node_dashboard -->|"calls"| node_api_client
node_dashboard -->|"renders"| node_chat_view
node_dashboard -->|"renders"| node_customer_view
node_dashboard -->|"renders"| node_alerts_view
node_chat_view -->|"requests"| node_api_client
node_customer_view -->|"requests"| node_api_client
node_approval_view -->|"requests"| node_api_client
node_ops_view -->|"requests"| node_api_client
node_alerts_view -.->|"requests"| node_api_client
node_api_client -->|"HTTP requests"| node_fastapi
node_fastapi -->|"delegates"| node_handlers
node_handlers -->|"authenticates"| node_auth
node_handlers -->|"dispatches chat"| node_supervisor
node_supervisor -->|"understands requests"| node_nlu
node_supervisor -->|"plans tasks"| node_planner
node_supervisor -.->|"tracks workflow"| node_workflow_state
node_supervisor -->|"recovers failures"| node_recovery
node_supervisor -->|"runs agent tasks"| node_agents
node_supervisor -->|"handles approvals"| node_approvals
node_nlu -.->|"uses"| node_gateway
node_gateway -->|"masks data"| node_pii
node_gateway -->|"invokes"| node_llm_client
node_llm_client -->|"calls provider"| node_llm_service
node_gateway -->|"records usage"| node_request_state
node_agents -.->|"uses tools"| node_tool_registry
node_tool_registry -->|"dispatches tools"| node_tool_definitions
node_tool_definitions -->|"calls banking services"| node_services
node_tool_definitions -->|"checks policy"| node_rules
node_tool_definitions -->|"checks risk"| node_fraud
node_services -->|"reads and writes"| node_database
node_rules -.->|"reads policy data"| node_database
node_approvals -->|"stores approvals"| node_database
node_seed -->|"seeds data"| node_database
node_seed -->|"creates records"| node_services

click node_dashboard "https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/frontend/src/App.jsx"
click node_chat_view "https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/frontend/src/components/ChatView.jsx"
click node_customer_view "https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/frontend/src/components/CustomerView.jsx"
click node_approval_view "https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/frontend/src/components/ApprovalsView.jsx"
click node_ops_view "https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/frontend/src/components/ObservatoryView.jsx"
click node_alerts_view "https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/frontend/src/components/AlertsDrawer.jsx"
click node_api_client "https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/frontend/src/api.js"
click node_fastapi "https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/banking-agents/app/main.py"
click node_handlers "https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/banking-agents/app/handlers.py"
click node_auth "https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/banking-agents/app/auth.py"
click node_supervisor "https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/banking-agents/app/supervisor/orchestrator.py"
click node_planner "https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/banking-agents/app/supervisor/planner.py"
click node_workflow_state "https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/banking-agents/app/supervisor/workflow_state.py"
click node_recovery "https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/banking-agents/app/supervisor/recovery.py"
click node_nlu "https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/banking-agents/app/llm/nlu.py"
click node_gateway "https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/banking-agents/app/gateway/gateway.py"
click node_pii "https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/banking-agents/app/gateway/pii.py"
click node_llm_client "https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/banking-agents/app/llm/client.py"
click node_request_state "https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/banking-agents/app/state.py"
click node_tool_registry "https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/banking-agents/app/tools/registry.py"
click node_tool_definitions "https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/banking-agents/app/tools/definitions.py"
click node_agents "https://github.com/gokulprakash23013924/fingent-banking-system/tree/main/banking-agents/app/agents"
click node_services "https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/banking-agents/app/services.py"
click node_rules "https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/banking-agents/app/rules.py"
click node_fraud "https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/banking-agents/app/ml/fraud.py"
click node_approvals "https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/banking-agents/app/tools/approvals.py"
click node_database "https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/banking-agents/app/db.py"
click node_seed "https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/banking-agents/data/seed.py"

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_chat_view,node_customer_view,node_approval_view,node_ops_view,node_alerts_view,node_api_client toneBlue
class node_fastapi,node_handlers,node_auth toneAmber
class node_supervisor,node_planner,node_workflow_state,node_recovery,node_nlu toneMint
class node_tool_registry,node_tool_definitions,node_agents,node_services,node_rules,node_fraud,node_approvals toneRose
class node_gateway,node_pii,node_llm_client,node_request_state,node_database,node_seed,node_customer,node_supervisor_user,node_llm_service toneIndigo
```

## Components

### Banking dashboard

- [React dashboard](https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Chat experience](https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/frontend/src/components/ChatView.jsx): `frontend/src/components/ChatView.jsx`
- [Customer view](https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/frontend/src/components/CustomerView.jsx): `frontend/src/components/CustomerView.jsx`
- [Approval queue](https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/frontend/src/components/ApprovalsView.jsx): `frontend/src/components/ApprovalsView.jsx`
- [Operations observatory](https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/frontend/src/components/ObservatoryView.jsx): `frontend/src/components/ObservatoryView.jsx`
- [Alert drawer](https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/frontend/src/components/AlertsDrawer.jsx): `frontend/src/components/AlertsDrawer.jsx`
- [API client](https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/frontend/src/api.js): `frontend/src/api.js`

### API and identity

- [HTTP routes](https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/banking-agents/app/main.py): `banking-agents/app/main.py`
- [Request handlers](https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/banking-agents/app/handlers.py): `banking-agents/app/handlers.py`
- [Session authentication](https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/banking-agents/app/auth.py): `banking-agents/app/auth.py`

### Workflow orchestration

- [Workflow orchestrator](https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/banking-agents/app/supervisor/orchestrator.py): `banking-agents/app/supervisor/orchestrator.py`
- [Workflow planner](https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/banking-agents/app/supervisor/planner.py): `banking-agents/app/supervisor/planner.py`
- [Workflow state](https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/banking-agents/app/supervisor/workflow_state.py): `banking-agents/app/supervisor/workflow_state.py`
- [Recovery evaluator](https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/banking-agents/app/supervisor/recovery.py): `banking-agents/app/supervisor/recovery.py`
- [Intent understanding](https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/banking-agents/app/llm/nlu.py): `banking-agents/app/llm/nlu.py`

### Banking capabilities

- [Tool registry](https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/banking-agents/app/tools/registry.py): `banking-agents/app/tools/registry.py`
- [Banking tools](https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/banking-agents/app/tools/definitions.py): `banking-agents/app/tools/definitions.py`
- [Banking agents](https://github.com/gokulprakash23013924/fingent-banking-system/tree/main/banking-agents/app/agents): `banking-agents/app/agents`
- [Banking services](https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/banking-agents/app/services.py): `banking-agents/app/services.py`
- [Credit policy rules](https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/banking-agents/app/rules.py): `banking-agents/app/rules.py`
- [Fraud detection](https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/banking-agents/app/ml/fraud.py): `banking-agents/app/ml/fraud.py`
- [Human approvals](https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/banking-agents/app/tools/approvals.py): `banking-agents/app/tools/approvals.py`

### Runtime platform

- [LLM gateway](https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/banking-agents/app/gateway/gateway.py): `banking-agents/app/gateway/gateway.py`
- [PII protection](https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/banking-agents/app/gateway/pii.py): `banking-agents/app/gateway/pii.py`
- [LLM providers](https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/banking-agents/app/llm/client.py): `banking-agents/app/llm/client.py`
- [Request state and budget](https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/banking-agents/app/state.py): `banking-agents/app/state.py`
- [Bank database](https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/banking-agents/app/db.py): `banking-agents/app/db.py`
- [Demo banking data](https://github.com/gokulprakash23013924/fingent-banking-system/blob/main/banking-agents/data/seed.py): `banking-agents/data/seed.py`

### Other components

- **Customer**
- **Supervisor**
- **LLM provider**

## Connections

- Customer → React dashboard: uses
- Supervisor → React dashboard: uses
- React dashboard → API client: calls (evidence: `frontend/src/App.jsx`)
- React dashboard → Chat experience: renders (evidence: `frontend/src/App.jsx`)
- React dashboard → Customer view: renders (evidence: `frontend/src/App.jsx`)
- React dashboard → Alert drawer: renders (evidence: `frontend/src/App.jsx`)
- Chat experience → API client: requests (evidence: `frontend/src/components/ChatView.jsx`)
- Customer view → API client: requests (evidence: `frontend/src/components/CustomerView.jsx`)
- Approval queue → API client: requests (evidence: `frontend/src/components/ApprovalsView.jsx`)
- Operations observatory → API client: requests (evidence: `frontend/src/components/ObservatoryView.jsx`)
- Alert drawer → API client: requests
- API client → HTTP routes: HTTP requests (evidence: `frontend/src/api.js`)
- HTTP routes → Request handlers: delegates (evidence: `banking-agents/app/main.py`)
- Request handlers → Session authentication: authenticates (evidence: `banking-agents/app/handlers.py`)
- Request handlers → Workflow orchestrator: dispatches chat (evidence: `banking-agents/app/handlers.py`)
- Workflow orchestrator → Intent understanding: understands requests (evidence: `banking-agents/app/supervisor/orchestrator.py`)
- Workflow orchestrator → Workflow planner: plans tasks (evidence: `banking-agents/app/supervisor/orchestrator.py`)
- Workflow orchestrator → Workflow state: tracks workflow (evidence: `banking-agents/app/supervisor/orchestrator.py`)
- Workflow orchestrator → Recovery evaluator: recovers failures (evidence: `banking-agents/app/supervisor/orchestrator.py`)
- Workflow orchestrator → Banking agents: runs agent tasks (evidence: `banking-agents/app/supervisor/orchestrator.py`)
- Workflow orchestrator → Human approvals: handles approvals (evidence: `banking-agents/app/supervisor/orchestrator.py`)
- Intent understanding → LLM gateway: uses
- LLM gateway → PII protection: masks data (evidence: `banking-agents/app/gateway/gateway.py`)
- LLM gateway → LLM providers: invokes (evidence: `banking-agents/app/gateway/gateway.py`)
- LLM providers → LLM provider: calls provider (evidence: `banking-agents/app/llm/client.py`)
- LLM gateway → Request state and budget: records usage (evidence: `banking-agents/app/gateway/gateway.py`)
- Banking agents → Tool registry: uses tools
- Tool registry → Banking tools: dispatches tools (evidence: `banking-agents/app/tools/registry.py`)
- Banking tools → Banking services: calls banking services (evidence: `banking-agents/app/tools/definitions.py`)
- Banking tools → Credit policy rules: checks policy (evidence: `banking-agents/app/tools/definitions.py`)
- Banking tools → Fraud detection: checks risk (evidence: `banking-agents/app/tools/definitions.py`)
- Banking services → Bank database: reads and writes (evidence: `banking-agents/app/services.py`)
- Credit policy rules → Bank database: reads policy data
- Human approvals → Bank database: stores approvals (evidence: `banking-agents/app/tools/approvals.py`)
- Demo banking data → Bank database: seeds data (evidence: `banking-agents/data/seed.py`)
- Demo banking data → Banking services: creates records (evidence: `banking-agents/data/seed.py`)
