# mounish-28/anti-money-laundaring-detection architecture

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

- Interactive diagram: https://gitdiagram.com/mounish-28/anti-money-laundaring-detection
- Repository: https://github.com/mounish-28/anti-money-laundaring-detection

## Overview

QuantumAML Nexus is an AML detection and investigation platform: transaction, time-series, and crypto events enter through scoring or live dispatch, receive model-based risk tiers, and can trigger alerts or SAR workflows for analyst review and export. The main dashboard supports live triage, batch work, and monitoring; a separate investigation workbench supports case and entity analysis. The README documents additional dataset engines and monitoring capabilities, but sampled excerpts do not establish all their runtime wiring, so uncertain links are omitted.

Main entry points: [`app/main.py`](https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/app/main.py) (FastAPI Service), [`nexus-frontend/src/App.jsx`](https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/nexus-frontend/src/App.jsx) (Nexus Dashboard), [`nexus-frontend/src/hooks/useLiveFeed.js`](https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/nexus-frontend/src/hooks/useLiveFeed.js) (Live Feed Hook), [`quantumaml-investigation/src/context/InvestigationContext.jsx`](https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/quantumaml-investigation/src/context/InvestigationContext.jsx) (Investigation Context)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Event Intake"]
  node_backend["FastAPI Service<br/>[main.py]"]
  node_transaction_api["Transaction API<br/>[transaction.py]"]
  node_crypto_api["Crypto API<br/>[crypto.py]"]
  node_batch_api["Batch API<br/>[batch.py]"]
  node_streamer["Transaction Streamer<br/>[streamer.py]"]
  node_crypto_feed["Crypto Feed"]
end

subgraph group_scoring["Detection and Scoring"]
  node_inference["Inference Engine"]
  node_risk_engine["Risk Engine<br/>[risk_engine.py]"]
  node_registry["Model Registry<br/>[model_registry.py]"]
end

subgraph group_response["Alerts and SAR"]
  node_sar_service["SAR Service<br/>[sar_service.py]"]
  node_sar_exporter["SAR Exporter<br/>[sar_exporter.py]"]
  node_alert_api["Alert Routes<br/>[alerts.py]"]
end

subgraph group_analyst["Analyst Interfaces"]
  node_nexus_app["Nexus Dashboard<br/>[App.jsx]"]
  node_live_hook["Live Feed Hook<br/>[useLiveFeed.js]"]
  node_transaction_ui["Transaction Triage"]
  node_crypto_ui["Crypto Triage<br/>[CryptoTriage.jsx]"]
  node_batch_ui["Batch Portal<br/>[BatchPortal.jsx]"]
  node_sar_ui["SAR Case Manager<br/>[SARCaseManager.jsx]"]
  node_investigation_app["Investigation Workbench<br/>[App.jsx]"]
  node_investigation_context["Investigation Context"]
  node_investigation_cases["Case API Client<br/>[casesApi.js]"]
  node_investigation_sar["SAR API Client<br/>[sarApi.js]"]
end

subgraph group_models["Dataset Engines"]
  node_ibm_pipeline["IBM Transaction Engine"]
  node_timeseries_pipeline["Time-Series Engine"]
  node_samld_pipeline["SAML-D Engine<br/>[pipeline_samld.py]"]
  node_amlsim_pipeline["AMLSim Graph Engine<br/>[pipeline_amlsim.py]"]
  node_elliptic_trainer["Elliptic Trainer<br/>[train_elliptic.py]"]
end

node_analyst_user(("Analyst"))

node_analyst_user -->|"uses"| node_nexus_app
node_analyst_user -->|"investigates"| node_investigation_app
node_nexus_app -->|"initializes"| node_live_hook
node_nexus_app -->|"renders"| node_transaction_ui
node_nexus_app -->|"renders"| node_crypto_ui
node_nexus_app -->|"renders"| node_batch_ui
node_nexus_app -->|"renders"| node_sar_ui
node_transaction_ui -->|"scores via API"| node_backend
node_crypto_ui -->|"scores via API"| node_backend
node_batch_ui -->|"submits batches"| node_backend
node_live_hook -->|"connects WebSocket"| node_backend
node_live_hook -->|"dispatches REST"| node_backend
node_streamer -.->|"streams events"| node_backend
node_crypto_feed -.->|"streams crypto"| node_backend
node_backend -->|"scores events"| node_inference
node_backend -->|"scores transactions"| node_risk_engine
node_transaction_api -->|"scores request"| node_risk_engine
node_crypto_api -->|"scores crypto"| node_inference
node_batch_api -->|"scores batch"| node_inference
node_risk_engine -->|"reads models"| node_registry
node_backend -->|"processes SAR"| node_sar_service
node_backend -->|"queues alerts"| node_alert_api
node_sar_service -->|"exports dossier"| node_sar_exporter
node_investigation_app -->|"provides state"| node_investigation_context
node_investigation_context -->|"loads cases"| node_investigation_cases
node_investigation_context -->|"loads SAR data"| node_investigation_sar
node_investigation_cases -->|"requests cases"| node_backend
node_investigation_sar -->|"requests SAR"| node_backend

click node_nexus_app "https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/nexus-frontend/src/App.jsx"
click node_live_hook "https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/nexus-frontend/src/hooks/useLiveFeed.js"
click node_transaction_ui "https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/nexus-frontend/src/components/TransactionTriage.jsx"
click node_crypto_ui "https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/nexus-frontend/src/components/CryptoTriage.jsx"
click node_batch_ui "https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/nexus-frontend/src/components/BatchPortal.jsx"
click node_sar_ui "https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/nexus-frontend/src/components/SARCaseManager.jsx"
click node_investigation_app "https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/quantumaml-investigation/src/App.jsx"
click node_investigation_context "https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/quantumaml-investigation/src/context/InvestigationContext.jsx"
click node_backend "https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/app/main.py"
click node_transaction_api "https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/app/routers/transaction.py"
click node_crypto_api "https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/app/routers/crypto.py"
click node_batch_api "https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/app/routers/batch.py"
click node_streamer "https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/streamer.py"
click node_crypto_feed "https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/live_crypto_feed.py"
click node_inference "https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/app/services/inference_engine.py"
click node_risk_engine "https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/app/services/risk_engine.py"
click node_registry "https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/app/services/model_registry.py"
click node_sar_service "https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/app/services/sar_service.py"
click node_sar_exporter "https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/app/services/sar_exporter.py"
click node_alert_api "https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/app/routers/alerts.py"
click node_ibm_pipeline "https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/src/pipeline_ibm_transactions.py"
click node_timeseries_pipeline "https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/src/pipeline_timeseries.py"
click node_samld_pipeline "https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/src/pipeline_samld.py"
click node_amlsim_pipeline "https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/src/pipeline_amlsim.py"
click node_elliptic_trainer "https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/models/train_elliptic.py"
click node_investigation_cases "https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/quantumaml-investigation/src/api/casesApi.js"
click node_investigation_sar "https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/quantumaml-investigation/src/api/sarApi.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_backend,node_transaction_api,node_crypto_api,node_batch_api,node_streamer,node_crypto_feed toneBlue
class node_inference,node_risk_engine,node_registry toneAmber
class node_sar_service,node_sar_exporter,node_alert_api toneMint
class node_nexus_app,node_live_hook,node_transaction_ui,node_crypto_ui,node_batch_ui,node_sar_ui,node_investigation_app,node_investigation_context,node_investigation_cases,node_investigation_sar toneRose
class node_ibm_pipeline,node_timeseries_pipeline,node_samld_pipeline,node_amlsim_pipeline,node_elliptic_trainer,node_analyst_user toneIndigo
```

## Components

### Event Intake

- [FastAPI Service](https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/app/main.py): `app/main.py`
- [Transaction API](https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/app/routers/transaction.py): `app/routers/transaction.py`
- [Crypto API](https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/app/routers/crypto.py): `app/routers/crypto.py`
- [Batch API](https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/app/routers/batch.py): `app/routers/batch.py`
- [Transaction Streamer](https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/streamer.py): `streamer.py`
- [Crypto Feed](https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/live_crypto_feed.py): `live_crypto_feed.py`

### Detection and Scoring

- [Inference Engine](https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/app/services/inference_engine.py): `app/services/inference_engine.py`
- [Risk Engine](https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/app/services/risk_engine.py): `app/services/risk_engine.py`
- [Model Registry](https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/app/services/model_registry.py): `app/services/model_registry.py`

### Alerts and SAR

- [SAR Service](https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/app/services/sar_service.py): `app/services/sar_service.py`
- [SAR Exporter](https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/app/services/sar_exporter.py): `app/services/sar_exporter.py`
- [Alert Routes](https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/app/routers/alerts.py): `app/routers/alerts.py`

### Analyst Interfaces

- [Nexus Dashboard](https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/nexus-frontend/src/App.jsx): `nexus-frontend/src/App.jsx`
- [Live Feed Hook](https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/nexus-frontend/src/hooks/useLiveFeed.js): `nexus-frontend/src/hooks/useLiveFeed.js`
- [Transaction Triage](https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/nexus-frontend/src/components/TransactionTriage.jsx): `nexus-frontend/src/components/TransactionTriage.jsx`
- [Crypto Triage](https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/nexus-frontend/src/components/CryptoTriage.jsx): `nexus-frontend/src/components/CryptoTriage.jsx`
- [Batch Portal](https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/nexus-frontend/src/components/BatchPortal.jsx): `nexus-frontend/src/components/BatchPortal.jsx`
- [SAR Case Manager](https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/nexus-frontend/src/components/SARCaseManager.jsx): `nexus-frontend/src/components/SARCaseManager.jsx`
- [Investigation Workbench](https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/quantumaml-investigation/src/App.jsx): `quantumaml-investigation/src/App.jsx`
- [Investigation Context](https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/quantumaml-investigation/src/context/InvestigationContext.jsx): `quantumaml-investigation/src/context/InvestigationContext.jsx`
- [Case API Client](https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/quantumaml-investigation/src/api/casesApi.js): `quantumaml-investigation/src/api/casesApi.js`
- [SAR API Client](https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/quantumaml-investigation/src/api/sarApi.js): `quantumaml-investigation/src/api/sarApi.js`

### Dataset Engines

- [IBM Transaction Engine](https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/src/pipeline_ibm_transactions.py): `src/pipeline_ibm_transactions.py`
- [Time-Series Engine](https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/src/pipeline_timeseries.py): `src/pipeline_timeseries.py`
- [SAML-D Engine](https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/src/pipeline_samld.py): `src/pipeline_samld.py`
- [AMLSim Graph Engine](https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/src/pipeline_amlsim.py): `src/pipeline_amlsim.py`
- [Elliptic Trainer](https://github.com/mounish-28/anti-money-laundaring-detection/blob/main/models/train_elliptic.py): `models/train_elliptic.py`

### Other components

- **Analyst**

## Connections

- Analyst → Nexus Dashboard: uses
- Analyst → Investigation Workbench: investigates
- Nexus Dashboard → Live Feed Hook: initializes
- Nexus Dashboard → Transaction Triage: renders
- Nexus Dashboard → Crypto Triage: renders
- Nexus Dashboard → Batch Portal: renders
- Nexus Dashboard → SAR Case Manager: renders
- Transaction Triage → FastAPI Service: scores via API
- Crypto Triage → FastAPI Service: scores via API
- Batch Portal → FastAPI Service: submits batches
- Live Feed Hook → FastAPI Service: connects WebSocket
- Live Feed Hook → FastAPI Service: dispatches REST
- Transaction Streamer → FastAPI Service: streams events
- Crypto Feed → FastAPI Service: streams crypto
- FastAPI Service → Inference Engine: scores events
- FastAPI Service → Risk Engine: scores transactions
- Transaction API → Risk Engine: scores request
- Crypto API → Inference Engine: scores crypto
- Batch API → Inference Engine: scores batch
- Risk Engine → Model Registry: reads models
- FastAPI Service → SAR Service: processes SAR
- FastAPI Service → Alert Routes: queues alerts
- SAR Service → SAR Exporter: exports dossier
- Investigation Workbench → Investigation Context: provides state
- Investigation Context → Case API Client: loads cases
- Investigation Context → SAR API Client: loads SAR data
- Case API Client → FastAPI Service: requests cases
- SAR API Client → FastAPI Service: requests SAR
