# santolalla18/aml-fraud-detection-using-mysql architecture

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

- Interactive diagram: https://gitdiagram.com/santolalla18/aml-fraud-detection-using-mysql
- Repository: https://github.com/santolalla18/aml-fraud-detection-using-mysql

## Overview

This is a small, offline AML analysis project, not a production monitoring service. Its workflow is to evaluate five SQL transaction rules against a synthetic, labeled dataset, compare flagged transactions with fraud labels, and present findings in a Power BI dashboard. The README also reports risk-score results as an upper-bound comparison. The SQL and dashboard internals were not provided, so the graph shows only documented relationships and does not infer query-level call order or dashboard data connections.

Main entry points: [`trxn_monitoring_sql_proj.sql`](https://github.com/santolalla18/aml-fraud-detection-using-mysql/blob/main/trxn_monitoring_sql_proj.sql) (Precision and Recall), [`synthetic_fraud_dataset.csv`](https://github.com/santolalla18/aml-fraud-detection-using-mysql/blob/main/synthetic_fraud_dataset.csv) (Labeled Transactions), [`README.md`](https://github.com/santolalla18/aml-fraud-detection-using-mysql/blob/main/README.md) (Risk-Score Benchmark), [`AML findings visualizations.pbix`](https://github.com/santolalla18/aml-fraud-detection-using-mysql/blob/main/AML%20findings%20visualizations.pbix) (Findings Dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Input Data"]
  node_dataset["Labeled Transactions"]
end

subgraph group_detection["SQL Detection"]
  node_odd_hours["Odd Hours"]
  node_high_risk_country["High-Risk Country"]
  node_high_amount["High Amount"]
  node_user_median["User Median Outlier"]
  node_repeated_amounts["Repeated Amounts"]
end

subgraph group_analysis["Evaluation"]
  node_rule_evaluation["Precision and Recall"]
  node_risk_score_benchmark["Risk-Score Benchmark<br/>[README.md]"]
end

subgraph group_presentation["Findings"]
  node_dashboard["Findings Dashboard"]
end

node_analyst(("Analyst"))

node_analyst -->|"runs queries"| node_odd_hours
node_dataset -->|"provides transactions"| node_odd_hours
node_dataset -->|"provides transactions"| node_high_risk_country
node_dataset -->|"provides transactions"| node_high_amount
node_dataset -->|"provides transactions"| node_user_median
node_dataset -->|"provides transactions"| node_repeated_amounts
node_odd_hours -->|"measured by"| node_rule_evaluation
node_high_risk_country -->|"measured by"| node_rule_evaluation
node_high_amount -->|"measured by"| node_rule_evaluation
node_user_median -->|"measured by"| node_rule_evaluation
node_repeated_amounts -->|"measured by"| node_rule_evaluation
node_analyst -->|"reviews"| node_risk_score_benchmark
node_rule_evaluation -->|"visualized as findings"| node_dashboard

click node_dataset "https://github.com/santolalla18/aml-fraud-detection-using-mysql/blob/main/synthetic_fraud_dataset.csv"
click node_odd_hours "https://github.com/santolalla18/aml-fraud-detection-using-mysql/blob/main/trxn_monitoring_sql_proj.sql"
click node_high_risk_country "https://github.com/santolalla18/aml-fraud-detection-using-mysql/blob/main/trxn_monitoring_sql_proj.sql"
click node_high_amount "https://github.com/santolalla18/aml-fraud-detection-using-mysql/blob/main/trxn_monitoring_sql_proj.sql"
click node_user_median "https://github.com/santolalla18/aml-fraud-detection-using-mysql/blob/main/trxn_monitoring_sql_proj.sql"
click node_repeated_amounts "https://github.com/santolalla18/aml-fraud-detection-using-mysql/blob/main/trxn_monitoring_sql_proj.sql"
click node_rule_evaluation "https://github.com/santolalla18/aml-fraud-detection-using-mysql/blob/main/trxn_monitoring_sql_proj.sql"
click node_risk_score_benchmark "https://github.com/santolalla18/aml-fraud-detection-using-mysql/blob/main/README.md"
click node_dashboard "https://github.com/santolalla18/aml-fraud-detection-using-mysql/blob/main/AML%20findings%20visualizations.pbix"

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_dataset toneBlue
class node_odd_hours,node_high_risk_country,node_high_amount,node_user_median,node_repeated_amounts toneAmber
class node_rule_evaluation,node_risk_score_benchmark toneMint
class node_dashboard toneRose
class node_analyst toneIndigo
```

## Components

### Input Data

- [Labeled Transactions](https://github.com/santolalla18/aml-fraud-detection-using-mysql/blob/main/synthetic_fraud_dataset.csv): `synthetic_fraud_dataset.csv`

### SQL Detection

- [Odd Hours](https://github.com/santolalla18/aml-fraud-detection-using-mysql/blob/main/trxn_monitoring_sql_proj.sql): `trxn_monitoring_sql_proj.sql`
- [High-Risk Country](https://github.com/santolalla18/aml-fraud-detection-using-mysql/blob/main/trxn_monitoring_sql_proj.sql): `trxn_monitoring_sql_proj.sql`
- [High Amount](https://github.com/santolalla18/aml-fraud-detection-using-mysql/blob/main/trxn_monitoring_sql_proj.sql): `trxn_monitoring_sql_proj.sql`
- [User Median Outlier](https://github.com/santolalla18/aml-fraud-detection-using-mysql/blob/main/trxn_monitoring_sql_proj.sql): `trxn_monitoring_sql_proj.sql`
- [Repeated Amounts](https://github.com/santolalla18/aml-fraud-detection-using-mysql/blob/main/trxn_monitoring_sql_proj.sql): `trxn_monitoring_sql_proj.sql`

### Evaluation

- [Precision and Recall](https://github.com/santolalla18/aml-fraud-detection-using-mysql/blob/main/trxn_monitoring_sql_proj.sql): `trxn_monitoring_sql_proj.sql`
- [Risk-Score Benchmark](https://github.com/santolalla18/aml-fraud-detection-using-mysql/blob/main/README.md): `README.md`

### Findings

- [Findings Dashboard](https://github.com/santolalla18/aml-fraud-detection-using-mysql/blob/main/AML%20findings%20visualizations.pbix): `AML findings visualizations.pbix`

### Other components

- **Analyst**

## Connections

- Analyst → Odd Hours: runs queries (evidence: `README.md`)
- Labeled Transactions → Odd Hours: provides transactions (evidence: `README.md`)
- Labeled Transactions → High-Risk Country: provides transactions (evidence: `README.md`)
- Labeled Transactions → High Amount: provides transactions (evidence: `README.md`)
- Labeled Transactions → User Median Outlier: provides transactions (evidence: `README.md`)
- Labeled Transactions → Repeated Amounts: provides transactions (evidence: `README.md`)
- Odd Hours → Precision and Recall: measured by (evidence: `README.md`)
- High-Risk Country → Precision and Recall: measured by (evidence: `README.md`)
- High Amount → Precision and Recall: measured by (evidence: `README.md`)
- User Median Outlier → Precision and Recall: measured by (evidence: `README.md`)
- Repeated Amounts → Precision and Recall: measured by (evidence: `README.md`)
- Analyst → Risk-Score Benchmark: reviews (evidence: `README.md`)
- Precision and Recall → Findings Dashboard: visualized as findings (evidence: `README.md`)
