# laurien03/enterprise-aml-pipeline architecture

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

- Interactive diagram: https://gitdiagram.com/laurien03/enterprise-aml-pipeline
- Repository: https://github.com/laurien03/enterprise-aml-pipeline

## Overview

AML-Enterprise is a transaction-monitoring system that prepares transaction data, enriches it with anomaly and network features, trains graph and tabular models, and fuses risk scores into flagged cases. The primary backend workflow starts in main.py and is orchestrated by pipeline_engine.py; a separate Streamlit app presents stage visualizations. The graph reflects the sampled pipeline and UI wiring. The README describes the product goals but not additional runtime connections, so unsampled capabilities and relationships are not inferred.

Main entry points: [`pipeline_engine.py`](https://github.com/laurien03/enterprise-aml-pipeline/blob/main/pipeline_engine.py) (AML pipeline), [`app.py`](https://github.com/laurien03/enterprise-aml-pipeline/blob/main/app.py) (Streamlit visualizer), [`main.py`](https://github.com/laurien03/enterprise-aml-pipeline/blob/main/main.py) (Backend entry point), [`data_manager.py`](https://github.com/laurien03/enterprise-aml-pipeline/blob/main/data_manager.py) (Data preparation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_orchestration["Pipeline orchestration"]
  node_main["Backend entry point<br/>[main.py]"]
  node_pipeline["AML pipeline<br/>[pipeline_engine.py]"]
end

subgraph group_data["Transaction preparation"]
  node_data_manager["Data preparation<br/>[data_manager.py]"]
end

subgraph group_detection["Detection and graph models"]
  node_anomaly["Anomaly scoring"]
  node_graph["Transaction graph<br/>[graph_analyzer.py]"]
  node_graphsage["GraphSAGE model"]
  node_xgboost["XGBoost model"]
end

subgraph group_compliance["Risk review and UI"]
  node_risk["Risk fusion"]
  node_board["Investigation board"]
  node_streamlit["Streamlit visualizer<br/>[app.py]"]
  node_ingestion_view["Ingestion stage view"]
  node_graph_view["GraphSAGE stage view"]
  node_xgb_view["XGBoost stage view"]
  node_risk_view["Risk radar view"]
end

node_operator(("Operator"))
node_transactions["Transaction CSV"]

node_operator -->|"starts"| node_main
node_main -->|"runs"| node_pipeline
node_operator -.->|"opens"| node_streamlit
node_transactions -->|"reads"| node_data_manager
node_pipeline -->|"prepares data"| node_data_manager
node_pipeline -->|"scores splits"| node_anomaly
node_pipeline -->|"builds graph"| node_graph
node_pipeline -->|"extracts features"| node_graph
node_pipeline -->|"trains and embeds"| node_graphsage
node_pipeline -->|"trains and evaluates"| node_xgboost
node_pipeline -->|"fuses scores"| node_risk
node_pipeline -->|"constructs"| node_board
node_pipeline -->|"returns results"| node_main
node_streamlit -->|"renders"| node_ingestion_view
node_streamlit -->|"renders"| node_graph_view
node_streamlit -->|"renders"| node_xgb_view
node_streamlit -->|"renders"| node_risk_view

click node_main "https://github.com/laurien03/enterprise-aml-pipeline/blob/main/main.py"
click node_pipeline "https://github.com/laurien03/enterprise-aml-pipeline/blob/main/pipeline_engine.py"
click node_data_manager "https://github.com/laurien03/enterprise-aml-pipeline/blob/main/data_manager.py"
click node_anomaly "https://github.com/laurien03/enterprise-aml-pipeline/blob/main/anomaly_detector.py"
click node_graph "https://github.com/laurien03/enterprise-aml-pipeline/blob/main/graph_analyzer.py"
click node_graphsage "https://github.com/laurien03/enterprise-aml-pipeline/blob/main/fraud_classifier.py"
click node_xgboost "https://github.com/laurien03/enterprise-aml-pipeline/blob/main/fraud_classifier.py"
click node_risk "https://github.com/laurien03/enterprise-aml-pipeline/blob/main/compliance_reporter.py"
click node_board "https://github.com/laurien03/enterprise-aml-pipeline/blob/main/compliance_reporter.py"
click node_streamlit "https://github.com/laurien03/enterprise-aml-pipeline/blob/main/app.py"
click node_ingestion_view "https://github.com/laurien03/enterprise-aml-pipeline/blob/main/data_ingestion_flow.html"
click node_graph_view "https://github.com/laurien03/enterprise-aml-pipeline/blob/main/graphsage_neural_engine.html"
click node_xgb_view "https://github.com/laurien03/enterprise-aml-pipeline/blob/main/xgboost_tabular_engine.html"
click node_risk_view "https://github.com/laurien03/enterprise-aml-pipeline/blob/main/compliance_risk_radar.html"

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_main,node_pipeline toneBlue
class node_data_manager toneAmber
class node_anomaly,node_graph,node_graphsage,node_xgboost toneMint
class node_risk,node_board,node_streamlit,node_ingestion_view,node_graph_view,node_xgb_view,node_risk_view toneRose
class node_operator,node_transactions toneIndigo
```

## Components

### Pipeline orchestration

- [Backend entry point](https://github.com/laurien03/enterprise-aml-pipeline/blob/main/main.py): `main.py`
- [AML pipeline](https://github.com/laurien03/enterprise-aml-pipeline/blob/main/pipeline_engine.py): `pipeline_engine.py`

### Transaction preparation

- [Data preparation](https://github.com/laurien03/enterprise-aml-pipeline/blob/main/data_manager.py): `data_manager.py`

### Detection and graph models

- [Anomaly scoring](https://github.com/laurien03/enterprise-aml-pipeline/blob/main/anomaly_detector.py): `anomaly_detector.py`
- [Transaction graph](https://github.com/laurien03/enterprise-aml-pipeline/blob/main/graph_analyzer.py): `graph_analyzer.py`
- [GraphSAGE model](https://github.com/laurien03/enterprise-aml-pipeline/blob/main/fraud_classifier.py): `fraud_classifier.py`
- [XGBoost model](https://github.com/laurien03/enterprise-aml-pipeline/blob/main/fraud_classifier.py): `fraud_classifier.py`

### Risk review and UI

- [Risk fusion](https://github.com/laurien03/enterprise-aml-pipeline/blob/main/compliance_reporter.py): `compliance_reporter.py`
- [Investigation board](https://github.com/laurien03/enterprise-aml-pipeline/blob/main/compliance_reporter.py): `compliance_reporter.py`
- [Streamlit visualizer](https://github.com/laurien03/enterprise-aml-pipeline/blob/main/app.py): `app.py`
- [Ingestion stage view](https://github.com/laurien03/enterprise-aml-pipeline/blob/main/data_ingestion_flow.html): `data_ingestion_flow.html`
- [GraphSAGE stage view](https://github.com/laurien03/enterprise-aml-pipeline/blob/main/graphsage_neural_engine.html): `graphsage_neural_engine.html`
- [XGBoost stage view](https://github.com/laurien03/enterprise-aml-pipeline/blob/main/xgboost_tabular_engine.html): `xgboost_tabular_engine.html`
- [Risk radar view](https://github.com/laurien03/enterprise-aml-pipeline/blob/main/compliance_risk_radar.html): `compliance_risk_radar.html`

### Other components

- **Operator**
- **Transaction CSV**

## Connections

- Operator → Backend entry point: starts (evidence: `main.py`)
- Backend entry point → AML pipeline: runs (evidence: `main.py`)
- Operator → Streamlit visualizer: opens
- Transaction CSV → Data preparation: reads (evidence: `data_manager.py`)
- AML pipeline → Data preparation: prepares data (evidence: `pipeline_engine.py`)
- AML pipeline → Anomaly scoring: scores splits (evidence: `pipeline_engine.py`)
- AML pipeline → Transaction graph: builds graph (evidence: `pipeline_engine.py`)
- AML pipeline → Transaction graph: extracts features (evidence: `pipeline_engine.py`)
- AML pipeline → GraphSAGE model: trains and embeds (evidence: `pipeline_engine.py`)
- AML pipeline → XGBoost model: trains and evaluates (evidence: `pipeline_engine.py`)
- AML pipeline → Risk fusion: fuses scores (evidence: `pipeline_engine.py`)
- AML pipeline → Investigation board: constructs (evidence: `pipeline_engine.py`)
- AML pipeline → Backend entry point: returns results (evidence: `main.py`)
- Streamlit visualizer → Ingestion stage view: renders (evidence: `app.py`)
- Streamlit visualizer → GraphSAGE stage view: renders (evidence: `app.py`)
- Streamlit visualizer → XGBoost stage view: renders (evidence: `app.py`)
- Streamlit visualizer → Risk radar view: renders (evidence: `app.py`)
