# databeli/finguard_streaming_project architecture

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

- Interactive diagram: https://gitdiagram.com/databeli/finguard_streaming_project
- Repository: https://github.com/databeli/finguard_streaming_project

## Overview

FinGuard is a fraud-monitoring demo: it generates customer, merchant, and transaction data, publishes transactions to Kafka, transforms streaming and customer data in Databricks, and exposes monitoring and alerting outputs. The producer-to-generator and fraud-scoring calls are supported by excerpts. Databricks stages, dashboard wiring, and external service connections are represented as product components, but their internal links are dashed and uncited because their source was not excerpted and the README is empty.

Main entry points: [`kafka_producer/producer_normal.py`](https://github.com/databeli/finguard_streaming_project/blob/main/kafka_producer/producer_normal.py) (Kafka producers), [`databricks notebooks and pipelines/finguard_project/finguard_streaming/silver/transactions_silver.py`](https://github.com/databeli/finguard_streaming_project/blob/main/databricks%20notebooks%20and%20pipelines/finguard_project/finguard_streaming/silver/transactions_silver.py) (Silver transforms), [`kafka_producer/transaction_generator.py`](https://github.com/databeli/finguard_streaming_project/blob/main/kafka_producer/transaction_generator.py) (Transaction generator), [`databricks notebooks and pipelines/finguard_project/finguard_streaming/bronze/transactions_bronze.py`](https://github.com/databeli/finguard_streaming_project/blob/main/databricks%20notebooks%20and%20pipelines/finguard_project/finguard_streaming/bronze/transactions_bronze.py) (Bronze ingestion)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_simulation["Data simulation"]
  node_settings["Producer settings<br/>[config.py]"]
  node_customers["Customer generator"]
  node_merchants["Merchant generator"]
  node_models["Data models<br/>[models.py]"]
  node_fraud["Fraud engine<br/>[fraud_engine.py]"]
  node_transactions["Transaction generator"]
  node_producers["Kafka producers<br/>[producer_normal.py]"]
end

subgraph group_streaming["Stream processing"]
  node_bronze["Bronze ingestion"]
  node_silver["Silver transforms"]
  node_watchlist["Watchlist pipeline"]
  node_fraudalerts["Fraud card alerts"]
  node_valuealerts["High-value alerts"]
  node_minute["Minute aggregates"]
  node_sliding["Sliding aggregates"]
  node_watchlistfile["Watchlist file generator"]
end

subgraph group_outputs["Monitoring and alerts"]
  node_notifierfraud["Fraud email notifier"]
  node_notifiervalue["Value email notifier"]
  node_dashboard["Fraud dashboard"]
end

subgraph group_customerdata["Customer data"]
  node_customerbronze["Customer silver ingestion"]
  node_customerhistory[("Historic customer data")]
  node_customerincremental[("Incremental customer data")]
end

node_operator(("Demo operator"))
node_kafka["Kafka topic"]
node_email["Email service"]

node_operator -->|"runs"| node_producers
node_producers -->|"loads"| node_settings
node_producers -->|"generates"| node_customers
node_producers -->|"generates"| node_merchants
node_producers -->|"generates"| node_transactions
node_transactions -->|"scores"| node_fraud
node_transactions -->|"creates"| node_models
node_customers -.->|"creates"| node_models
node_merchants -.->|"creates"| node_models
node_producers -->|"publishes"| node_kafka
node_kafka -.->|"ingests"| node_bronze
node_bronze -.->|"transforms"| node_silver
node_bronze -.->|"ingests"| node_watchlist
node_silver -.->|"detects"| node_fraudalerts
node_silver -.->|"detects"| node_valuealerts
node_silver -.->|"aggregates"| node_minute
node_silver -.->|"aggregates"| node_sliding
node_watchlistfile -.->|"supplies"| node_watchlist
node_fraudalerts -.->|"notifies"| node_notifierfraud
node_valuealerts -.->|"notifies"| node_notifiervalue
node_notifierfraud -.->|"sends email"| node_email
node_notifiervalue -.->|"sends email"| node_email
node_fraudalerts -.->|"monitors"| node_dashboard
node_minute -.->|"monitors"| node_dashboard
node_sliding -.->|"monitors"| node_dashboard
node_customerhistory -.->|"loads"| node_customerbronze
node_customerincremental -.->|"loads"| node_customerbronze

click node_settings "https://github.com/databeli/finguard_streaming_project/blob/main/kafka_producer/config.py"
click node_customers "https://github.com/databeli/finguard_streaming_project/blob/main/kafka_producer/customer_generator.py"
click node_merchants "https://github.com/databeli/finguard_streaming_project/blob/main/kafka_producer/merchant_generator.py"
click node_models "https://github.com/databeli/finguard_streaming_project/blob/main/kafka_producer/models.py"
click node_fraud "https://github.com/databeli/finguard_streaming_project/blob/main/kafka_producer/fraud_engine.py"
click node_transactions "https://github.com/databeli/finguard_streaming_project/blob/main/kafka_producer/transaction_generator.py"
click node_producers "https://github.com/databeli/finguard_streaming_project/blob/main/kafka_producer/producer_normal.py"
click node_bronze "https://github.com/databeli/finguard_streaming_project/blob/main/databricks%20notebooks%20and%20pipelines/finguard_project/finguard_streaming/bronze/transactions_bronze.py"
click node_silver "https://github.com/databeli/finguard_streaming_project/blob/main/databricks%20notebooks%20and%20pipelines/finguard_project/finguard_streaming/silver/transactions_silver.py"
click node_watchlist "https://github.com/databeli/finguard_streaming_project/blob/main/databricks%20notebooks%20and%20pipelines/finguard_project/finguard_streaming/silver/fraud_watchlist_silver.py"
click node_fraudalerts "https://github.com/databeli/finguard_streaming_project/blob/main/databricks%20notebooks%20and%20pipelines/finguard_project/finguard_streaming/gold/fraud_card_alert.py"
click node_valuealerts "https://github.com/databeli/finguard_streaming_project/blob/main/databricks%20notebooks%20and%20pipelines/finguard_project/finguard_streaming/gold/high_value_transactions_alert.py"
click node_minute "https://github.com/databeli/finguard_streaming_project/blob/main/databricks%20notebooks%20and%20pipelines/finguard_project/finguard_streaming/gold/transaciton_count_by_minute.py"
click node_sliding "https://github.com/databeli/finguard_streaming_project/blob/main/databricks%20notebooks%20and%20pipelines/finguard_project/finguard_streaming/gold/transaciton_count_by_minute_sliding_window.py"
click node_notifierfraud "https://github.com/databeli/finguard_streaming_project/blob/main/databricks%20notebooks%20and%20pipelines/finguard_project/finguard_streaming/alert/fraud_card_alert_email_notifier.py"
click node_notifiervalue "https://github.com/databeli/finguard_streaming_project/blob/main/databricks%20notebooks%20and%20pipelines/finguard_project/finguard_streaming/alert/high_value_transaction_email_notifier.py"
click node_dashboard "https://github.com/databeli/finguard_streaming_project/blob/main/dashboard/FinGuard%20Fraud%20Detection%20Monitoring.lvdash.json"
click node_customerbronze "https://github.com/databeli/finguard_streaming_project/blob/main/databricks%20notebooks%20and%20pipelines/finguard_project/finguard_customers_silver_ingestion/silver/customers_silver.py"
click node_customerhistory "https://github.com/databeli/finguard_streaming_project/blob/main/postgres%20sql/customers_historic.sql"
click node_customerincremental "https://github.com/databeli/finguard_streaming_project/blob/main/postgres%20sql/customers_incremental.sql"
click node_watchlistfile "https://github.com/databeli/finguard_streaming_project/blob/main/databricks%20notebooks%20and%20pipelines/finguard_project/fraud_watchlist_file_generator/fraud_watchlist_data_generator.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_settings,node_customers,node_merchants,node_models,node_fraud,node_transactions,node_producers toneBlue
class node_bronze,node_silver,node_watchlist,node_fraudalerts,node_valuealerts,node_minute,node_sliding,node_watchlistfile toneAmber
class node_notifierfraud,node_notifiervalue,node_dashboard toneMint
class node_customerbronze,node_customerhistory,node_customerincremental toneRose
class node_operator,node_kafka,node_email toneIndigo
```

## Components

### Data simulation

- [Producer settings](https://github.com/databeli/finguard_streaming_project/blob/main/kafka_producer/config.py): `kafka_producer/config.py`
- [Customer generator](https://github.com/databeli/finguard_streaming_project/blob/main/kafka_producer/customer_generator.py): `kafka_producer/customer_generator.py`
- [Merchant generator](https://github.com/databeli/finguard_streaming_project/blob/main/kafka_producer/merchant_generator.py): `kafka_producer/merchant_generator.py`
- [Data models](https://github.com/databeli/finguard_streaming_project/blob/main/kafka_producer/models.py): `kafka_producer/models.py`
- [Fraud engine](https://github.com/databeli/finguard_streaming_project/blob/main/kafka_producer/fraud_engine.py): `kafka_producer/fraud_engine.py`
- [Transaction generator](https://github.com/databeli/finguard_streaming_project/blob/main/kafka_producer/transaction_generator.py): `kafka_producer/transaction_generator.py`
- [Kafka producers](https://github.com/databeli/finguard_streaming_project/blob/main/kafka_producer/producer_normal.py): `kafka_producer/producer_normal.py`

### Stream processing

- [Bronze ingestion](https://github.com/databeli/finguard_streaming_project/blob/main/databricks%20notebooks%20and%20pipelines/finguard_project/finguard_streaming/bronze/transactions_bronze.py): `databricks notebooks and pipelines/finguard_project/finguard_streaming/bronze/transactions_bronze.py`
- [Silver transforms](https://github.com/databeli/finguard_streaming_project/blob/main/databricks%20notebooks%20and%20pipelines/finguard_project/finguard_streaming/silver/transactions_silver.py): `databricks notebooks and pipelines/finguard_project/finguard_streaming/silver/transactions_silver.py`
- [Watchlist pipeline](https://github.com/databeli/finguard_streaming_project/blob/main/databricks%20notebooks%20and%20pipelines/finguard_project/finguard_streaming/silver/fraud_watchlist_silver.py): `databricks notebooks and pipelines/finguard_project/finguard_streaming/silver/fraud_watchlist_silver.py`
- [Fraud card alerts](https://github.com/databeli/finguard_streaming_project/blob/main/databricks%20notebooks%20and%20pipelines/finguard_project/finguard_streaming/gold/fraud_card_alert.py): `databricks notebooks and pipelines/finguard_project/finguard_streaming/gold/fraud_card_alert.py`
- [High-value alerts](https://github.com/databeli/finguard_streaming_project/blob/main/databricks%20notebooks%20and%20pipelines/finguard_project/finguard_streaming/gold/high_value_transactions_alert.py): `databricks notebooks and pipelines/finguard_project/finguard_streaming/gold/high_value_transactions_alert.py`
- [Minute aggregates](https://github.com/databeli/finguard_streaming_project/blob/main/databricks%20notebooks%20and%20pipelines/finguard_project/finguard_streaming/gold/transaciton_count_by_minute.py): `databricks notebooks and pipelines/finguard_project/finguard_streaming/gold/transaciton_count_by_minute.py`
- [Sliding aggregates](https://github.com/databeli/finguard_streaming_project/blob/main/databricks%20notebooks%20and%20pipelines/finguard_project/finguard_streaming/gold/transaciton_count_by_minute_sliding_window.py): `databricks notebooks and pipelines/finguard_project/finguard_streaming/gold/transaciton_count_by_minute_sliding_window.py`
- [Watchlist file generator](https://github.com/databeli/finguard_streaming_project/blob/main/databricks%20notebooks%20and%20pipelines/finguard_project/fraud_watchlist_file_generator/fraud_watchlist_data_generator.py): `databricks notebooks and pipelines/finguard_project/fraud_watchlist_file_generator/fraud_watchlist_data_generator.py`

### Monitoring and alerts

- [Fraud email notifier](https://github.com/databeli/finguard_streaming_project/blob/main/databricks%20notebooks%20and%20pipelines/finguard_project/finguard_streaming/alert/fraud_card_alert_email_notifier.py): `databricks notebooks and pipelines/finguard_project/finguard_streaming/alert/fraud_card_alert_email_notifier.py`
- [Value email notifier](https://github.com/databeli/finguard_streaming_project/blob/main/databricks%20notebooks%20and%20pipelines/finguard_project/finguard_streaming/alert/high_value_transaction_email_notifier.py): `databricks notebooks and pipelines/finguard_project/finguard_streaming/alert/high_value_transaction_email_notifier.py`
- [Fraud dashboard](https://github.com/databeli/finguard_streaming_project/blob/main/dashboard/FinGuard%20Fraud%20Detection%20Monitoring.lvdash.json): `dashboard/FinGuard Fraud Detection Monitoring.lvdash.json`

### Customer data

- [Customer silver ingestion](https://github.com/databeli/finguard_streaming_project/blob/main/databricks%20notebooks%20and%20pipelines/finguard_project/finguard_customers_silver_ingestion/silver/customers_silver.py): `databricks notebooks and pipelines/finguard_project/finguard_customers_silver_ingestion/silver/customers_silver.py`
- [Historic customer data](https://github.com/databeli/finguard_streaming_project/blob/main/postgres%20sql/customers_historic.sql): `postgres sql/customers_historic.sql`
- [Incremental customer data](https://github.com/databeli/finguard_streaming_project/blob/main/postgres%20sql/customers_incremental.sql): `postgres sql/customers_incremental.sql`

### Other components

- **Demo operator**
- **Kafka topic**
- **Email service**

## Connections

- Demo operator → Kafka producers: runs (evidence: `kafka_producer/producer_normal.py`)
- Kafka producers → Producer settings: loads (evidence: `kafka_producer/producer_normal.py`)
- Kafka producers → Customer generator: generates (evidence: `kafka_producer/producer_normal.py`)
- Kafka producers → Merchant generator: generates (evidence: `kafka_producer/producer_normal.py`)
- Kafka producers → Transaction generator: generates (evidence: `kafka_producer/producer_normal.py`)
- Transaction generator → Fraud engine: scores (evidence: `kafka_producer/transaction_generator.py`)
- Transaction generator → Data models: creates (evidence: `kafka_producer/transaction_generator.py`)
- Customer generator → Data models: creates (evidence: `kafka_producer/customer_generator.py`)
- Merchant generator → Data models: creates (evidence: `kafka_producer/merchant_generator.py`)
- Kafka producers → Kafka topic: publishes (evidence: `kafka_producer/producer_normal.py`)
- Kafka topic → Bronze ingestion: ingests
- Bronze ingestion → Silver transforms: transforms
- Bronze ingestion → Watchlist pipeline: ingests
- Silver transforms → Fraud card alerts: detects
- Silver transforms → High-value alerts: detects
- Silver transforms → Minute aggregates: aggregates
- Silver transforms → Sliding aggregates: aggregates
- Watchlist file generator → Watchlist pipeline: supplies
- Fraud card alerts → Fraud email notifier: notifies
- High-value alerts → Value email notifier: notifies
- Fraud email notifier → Email service: sends email
- Value email notifier → Email service: sends email
- Fraud card alerts → Fraud dashboard: monitors
- Minute aggregates → Fraud dashboard: monitors
- Sliding aggregates → Fraud dashboard: monitors
- Historic customer data → Customer silver ingestion: loads
- Incremental customer data → Customer silver ingestion: loads
