# gokulakrishnan610/vasp architecture

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

- Interactive diagram: https://gitdiagram.com/gokulakrishnan610/vasp
- Repository: https://github.com/gokulakrishnan610/vasp

## Overview

SAHYOG is a blockchain-forensics and VASP-attribution platform for law-enforcement investigations. Investigators submit a suspect wallet through the dashboard; the backend traces fund flows, identifies candidate VASPs, scores AML risk and evidence, and persists case results. Investigators can inspect the graph and evidence, generate statutory documents, and dispatch a VASP notice through SAHYOG. The README documents crawler failover and threat-intelligence integrations; their detailed wiring is not shown in the sampled source, so those links are represented only where the documented workflow supports them.

Main entry points: [`backend/routes/investigation.py`](https://github.com/gokulakrishnan610/vasp/blob/main/backend/routes/investigation.py) (Investigation Route), [`backend/main.py`](https://github.com/gokulakrishnan610/vasp/blob/main/backend/main.py) (FastAPI Application), [`frontend/src/App.jsx`](https://github.com/gokulakrishnan610/vasp/blob/main/frontend/src/App.jsx) (Application Router), [`frontend/src/pages/Dashboard.jsx`](https://github.com/gokulakrishnan610/vasp/blob/main/frontend/src/pages/Dashboard.jsx) (Investigation Dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Investigation UI"]
  node_app["Application Router<br/>[App.jsx]"]
  node_dashboard["Investigation Dashboard<br/>[Dashboard.jsx]"]
  node_fundgraph["Fund-Flow Explorer<br/>[FundFlowGraph.jsx]"]
  node_caseui["Case Management<br/>[CaseManagement.jsx]"]
  node_entityui["Entity Intelligence"]
  node_alertui["Alerts<br/>[Alerts.jsx]"]
  node_analyticsui["Model Analytics<br/>[ModelAnalytics.jsx]"]
  node_sahyogui["SAHYOG Integration"]
end

subgraph group_api["API and Cases"]
  node_api["FastAPI Application<br/>[main.py]"]
  node_investigation["Investigation Route<br/>[investigation.py]"]
  node_entityroute["Entity Routes<br/>[entities.py]"]
  node_alertroute["Alert Routes<br/>[alerts.py]"]
  node_sahyogroute["SAHYOG Routes<br/>[sahyog.py]"]
end

subgraph group_analysis["Forensic Analysis"]
  node_crawler["Multi-Chain Crawler"]
  node_resolver["Entity Resolver<br/>[entity_resolver.py]"]
  node_gnn["GNN and AML Inference<br/>[gnn_inference.py]"]
  node_pathscore["Path Scoring<br/>[path_scorer.py]"]
  node_fusion["Evidence Fusion<br/>[evidence_fusion.py]"]
  node_evidence["Evidence Generation"]
end

subgraph group_integrations["Intelligence and Dispatch"]
  node_threat["Threat Intelligence"]
  node_sahyogservice["Notice Dispatch Adapter<br/>[sahyog_service.py]"]
end

subgraph group_state["Persistence"]
  node_sqlite[("Case Database<br/>[database.py]")]
  node_neo4j[("Graph Database<br/>[neo4j_driver.py]")]
end

node_investigator(("Investigator"))
node_externalintel{{"Blockchain and Intel Sources"}}
node_i4c{{"SAHYOG I4C Endpoint"}}

node_investigator -->|"uses"| node_app
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_caseui
node_app -->|"routes to"| node_entityui
node_app -->|"routes to"| node_alertui
node_app -->|"routes to"| node_analyticsui
node_app -->|"routes to"| node_sahyogui
node_dashboard -->|"requests investigation"| node_api
node_dashboard -->|"renders graph"| node_fundgraph
node_caseui -->|"requests cases"| node_api
node_entityui -->|"requests entities"| node_api
node_alertui -->|"requests alerts"| node_api
node_analyticsui -->|"requests analytics"| node_api
node_sahyogui -->|"submits notice"| node_api
node_api -->|"dispatches route"| node_investigation
node_api -->|"dispatches route"| node_entityroute
node_api -->|"dispatches route"| node_alertroute
node_api -->|"dispatches route"| node_sahyogroute
node_investigation -->|"fetches fund flows"| node_crawler
node_crawler -->|"queries chains"| node_externalintel
node_investigation -->|"resolves entities"| node_resolver
node_investigation -->|"scores risk"| node_gnn
node_investigation -->|"scores paths"| node_pathscore
node_investigation -->|"fuses evidence"| node_fusion
node_investigation -.->|"screens threats"| node_threat
node_investigation -->|"queries graph"| node_neo4j
node_investigation -->|"stores cases"| node_sqlite
node_investigation -->|"generates documents"| node_evidence
node_sahyogroute -->|"builds and dispatches"| node_sahyogservice
node_sahyogservice -->|"sends notice"| node_i4c
node_threat -.->|"queries intelligence"| node_externalintel

click node_app "https://github.com/gokulakrishnan610/vasp/blob/main/frontend/src/App.jsx"
click node_dashboard "https://github.com/gokulakrishnan610/vasp/blob/main/frontend/src/pages/Dashboard.jsx"
click node_fundgraph "https://github.com/gokulakrishnan610/vasp/blob/main/frontend/src/components/FundFlowGraph.jsx"
click node_caseui "https://github.com/gokulakrishnan610/vasp/blob/main/frontend/src/pages/CaseManagement.jsx"
click node_entityui "https://github.com/gokulakrishnan610/vasp/blob/main/frontend/src/pages/EntityIntelligence.jsx"
click node_alertui "https://github.com/gokulakrishnan610/vasp/blob/main/frontend/src/pages/Alerts.jsx"
click node_analyticsui "https://github.com/gokulakrishnan610/vasp/blob/main/frontend/src/pages/ModelAnalytics.jsx"
click node_sahyogui "https://github.com/gokulakrishnan610/vasp/blob/main/frontend/src/pages/SAHYOGIntegration.jsx"
click node_api "https://github.com/gokulakrishnan610/vasp/blob/main/backend/main.py"
click node_investigation "https://github.com/gokulakrishnan610/vasp/blob/main/backend/routes/investigation.py"
click node_entityroute "https://github.com/gokulakrishnan610/vasp/blob/main/backend/routes/entities.py"
click node_alertroute "https://github.com/gokulakrishnan610/vasp/blob/main/backend/routes/alerts.py"
click node_sahyogroute "https://github.com/gokulakrishnan610/vasp/blob/main/backend/routes/sahyog.py"
click node_crawler "https://github.com/gokulakrishnan610/vasp/blob/main/backend/services/blockchain_fetcher.py"
click node_resolver "https://github.com/gokulakrishnan610/vasp/blob/main/backend/services/entity_resolver.py"
click node_gnn "https://github.com/gokulakrishnan610/vasp/blob/main/backend/services/gnn_inference.py"
click node_pathscore "https://github.com/gokulakrishnan610/vasp/blob/main/backend/services/path_scorer.py"
click node_fusion "https://github.com/gokulakrishnan610/vasp/blob/main/backend/services/evidence_fusion.py"
click node_evidence "https://github.com/gokulakrishnan610/vasp/blob/main/backend/services/evidence_generator.py"
click node_threat "https://github.com/gokulakrishnan610/vasp/blob/main/backend/services/threat_intelligence_scraper.py"
click node_sahyogservice "https://github.com/gokulakrishnan610/vasp/blob/main/backend/services/sahyog_service.py"
click node_sqlite "https://github.com/gokulakrishnan610/vasp/blob/main/backend/database.py"
click node_neo4j "https://github.com/gokulakrishnan610/vasp/blob/main/backend/neo4j_driver.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_app,node_dashboard,node_fundgraph,node_caseui,node_entityui,node_alertui,node_analyticsui,node_sahyogui toneBlue
class node_api,node_investigation,node_entityroute,node_alertroute,node_sahyogroute toneAmber
class node_crawler,node_resolver,node_gnn,node_pathscore,node_fusion,node_evidence toneMint
class node_threat,node_sahyogservice toneRose
class node_sqlite,node_neo4j,node_investigator,node_externalintel,node_i4c toneIndigo
```

## Components

### Investigation UI

- [Application Router](https://github.com/gokulakrishnan610/vasp/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Investigation Dashboard](https://github.com/gokulakrishnan610/vasp/blob/main/frontend/src/pages/Dashboard.jsx): `frontend/src/pages/Dashboard.jsx`
- [Fund-Flow Explorer](https://github.com/gokulakrishnan610/vasp/blob/main/frontend/src/components/FundFlowGraph.jsx): `frontend/src/components/FundFlowGraph.jsx`
- [Case Management](https://github.com/gokulakrishnan610/vasp/blob/main/frontend/src/pages/CaseManagement.jsx): `frontend/src/pages/CaseManagement.jsx`
- [Entity Intelligence](https://github.com/gokulakrishnan610/vasp/blob/main/frontend/src/pages/EntityIntelligence.jsx): `frontend/src/pages/EntityIntelligence.jsx`
- [Alerts](https://github.com/gokulakrishnan610/vasp/blob/main/frontend/src/pages/Alerts.jsx): `frontend/src/pages/Alerts.jsx`
- [Model Analytics](https://github.com/gokulakrishnan610/vasp/blob/main/frontend/src/pages/ModelAnalytics.jsx): `frontend/src/pages/ModelAnalytics.jsx`
- [SAHYOG Integration](https://github.com/gokulakrishnan610/vasp/blob/main/frontend/src/pages/SAHYOGIntegration.jsx): `frontend/src/pages/SAHYOGIntegration.jsx`

### API and Cases

- [FastAPI Application](https://github.com/gokulakrishnan610/vasp/blob/main/backend/main.py): `backend/main.py`
- [Investigation Route](https://github.com/gokulakrishnan610/vasp/blob/main/backend/routes/investigation.py): `backend/routes/investigation.py`
- [Entity Routes](https://github.com/gokulakrishnan610/vasp/blob/main/backend/routes/entities.py): `backend/routes/entities.py`
- [Alert Routes](https://github.com/gokulakrishnan610/vasp/blob/main/backend/routes/alerts.py): `backend/routes/alerts.py`
- [SAHYOG Routes](https://github.com/gokulakrishnan610/vasp/blob/main/backend/routes/sahyog.py): `backend/routes/sahyog.py`

### Forensic Analysis

- [Multi-Chain Crawler](https://github.com/gokulakrishnan610/vasp/blob/main/backend/services/blockchain_fetcher.py): `backend/services/blockchain_fetcher.py`
- [Entity Resolver](https://github.com/gokulakrishnan610/vasp/blob/main/backend/services/entity_resolver.py): `backend/services/entity_resolver.py`
- [GNN and AML Inference](https://github.com/gokulakrishnan610/vasp/blob/main/backend/services/gnn_inference.py): `backend/services/gnn_inference.py`
- [Path Scoring](https://github.com/gokulakrishnan610/vasp/blob/main/backend/services/path_scorer.py): `backend/services/path_scorer.py`
- [Evidence Fusion](https://github.com/gokulakrishnan610/vasp/blob/main/backend/services/evidence_fusion.py): `backend/services/evidence_fusion.py`
- [Evidence Generation](https://github.com/gokulakrishnan610/vasp/blob/main/backend/services/evidence_generator.py): `backend/services/evidence_generator.py`

### Intelligence and Dispatch

- [Threat Intelligence](https://github.com/gokulakrishnan610/vasp/blob/main/backend/services/threat_intelligence_scraper.py): `backend/services/threat_intelligence_scraper.py`
- [Notice Dispatch Adapter](https://github.com/gokulakrishnan610/vasp/blob/main/backend/services/sahyog_service.py): `backend/services/sahyog_service.py`

### Persistence

- [Case Database](https://github.com/gokulakrishnan610/vasp/blob/main/backend/database.py): `backend/database.py`
- [Graph Database](https://github.com/gokulakrishnan610/vasp/blob/main/backend/neo4j_driver.py): `backend/neo4j_driver.py`

### Other components

- **Investigator**
- **Blockchain and Intel Sources**
- **SAHYOG I4C Endpoint**

## Connections

- Investigator → Application Router: uses
- Application Router → Investigation Dashboard: routes to
- Application Router → Case Management: routes to
- Application Router → Entity Intelligence: routes to
- Application Router → Alerts: routes to
- Application Router → Model Analytics: routes to
- Application Router → SAHYOG Integration: routes to
- Investigation Dashboard → FastAPI Application: requests investigation
- Investigation Dashboard → Fund-Flow Explorer: renders graph
- Case Management → FastAPI Application: requests cases
- Entity Intelligence → FastAPI Application: requests entities
- Alerts → FastAPI Application: requests alerts
- Model Analytics → FastAPI Application: requests analytics
- SAHYOG Integration → FastAPI Application: submits notice
- FastAPI Application → Investigation Route: dispatches route
- FastAPI Application → Entity Routes: dispatches route
- FastAPI Application → Alert Routes: dispatches route
- FastAPI Application → SAHYOG Routes: dispatches route
- Investigation Route → Multi-Chain Crawler: fetches fund flows
- Multi-Chain Crawler → Blockchain and Intel Sources: queries chains
- Investigation Route → Entity Resolver: resolves entities
- Investigation Route → GNN and AML Inference: scores risk
- Investigation Route → Path Scoring: scores paths
- Investigation Route → Evidence Fusion: fuses evidence
- Investigation Route → Threat Intelligence: screens threats
- Investigation Route → Graph Database: queries graph
- Investigation Route → Case Database: stores cases
- Investigation Route → Evidence Generation: generates documents
- SAHYOG Routes → Notice Dispatch Adapter: builds and dispatches
- Notice Dispatch Adapter → SAHYOG I4C Endpoint: sends notice
- Threat Intelligence → Blockchain and Intel Sources: queries intelligence
