# googlecloudplatform/fraudfinder architecture

> Architecture diagram of the GitHub repository googlecloudplatform/fraudfinder, 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/googlecloudplatform/fraudfinder
- Repository: https://github.com/googlecloudplatform/fraudfinder

## Overview

FraudFinder is a Google Cloud workshop demonstrating an end-to-end, real-time payment-fraud detection workflow: prepare historical and streaming data, explore and engineer features, train and evaluate models, deploy them, and serve predictions using online features. The graph preserves the README’s documented capabilities, including model registry and monitoring. Source excerpts confirm the data-copy, deployment, and inference calls; notebook-to-notebook relationships are documented at a high level in the README, so those edges reflect the described workflow rather than inspected notebook code.

Main entry points: [`scripts/cloud_run_model_inference/main.py`](https://github.com/googlecloudplatform/fraudfinder/blob/main/scripts/cloud_run_model_inference/main.py) (Inference handler), [`bqml/04_model_training_and_prediction.ipynb`](https://github.com/googlecloudplatform/fraudfinder/blob/main/bqml/04_model_training_and_prediction.ipynb) (BQML training), [`vertex_ai/05_model_training_xgboost_formalization.ipynb`](https://github.com/googlecloudplatform/fraudfinder/blob/main/vertex_ai/05_model_training_xgboost_formalization.ipynb) (XGBoost training), [`vertex_ai`](https://github.com/googlecloudplatform/fraudfinder/tree/main/vertex_ai) (Model registry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Data preparation"]
  node_copy_data["Copy source data"]
  node_historical[("Historical transactions")]
  node_bigquery[("BigQuery warehouse")]
  node_stream["Live transactions"]
  node_eda["Explore data"]
end

subgraph group_features["Feature engineering"]
  node_batch_features["Batch features"]
  node_stream_features["Streaming features"]
  node_feature_store[("Feature store")]
end

subgraph group_models["Model lifecycle"]
  node_bqml_training["BQML training"]
  node_bqml_pipeline["BQML pipeline"]
  node_vertex_experiment["Vertex experimentation"]
  node_xgboost_training["XGBoost training"]
  node_vertex_pipeline["Vertex formalization"]
  node_model_registry[("Model registry")]
  node_monitoring["Model monitoring"]
end

subgraph group_serving["Online serving"]
  node_deploy["Endpoint deployment<br/>[deploy_model.py]"]
  node_endpoint{{"Vertex endpoint"}}
  node_inference["Inference handler<br/>[main.py]"]
  node_cloud_run{{"Cloud Run"}}
end

node_operator(("Workshop operator"))

node_operator -->|"prepares data"| node_copy_data
node_historical -->|"copies from"| node_copy_data
node_copy_data -->|"writes tables"| node_bigquery
node_operator -->|"explores data"| node_eda
node_bigquery -.->|"reads history"| node_eda
node_eda -->|"engineers batch"| node_batch_features
node_stream -->|"feeds events"| node_stream_features
node_batch_features -->|"ingests features"| node_feature_store
node_stream_features -->|"ingests features"| node_feature_store
node_feature_store -->|"supplies features"| node_bqml_training
node_feature_store -->|"supplies features"| node_xgboost_training
node_operator -->|"trains model"| node_bqml_training
node_bqml_training -->|"formalizes training"| node_bqml_pipeline
node_operator -->|"experiments"| node_vertex_experiment
node_vertex_experiment -->|"develops model"| node_xgboost_training
node_xgboost_training -->|"formalizes training"| node_vertex_pipeline
node_bqml_training -->|"registers model"| node_model_registry
node_xgboost_training -->|"registers model"| node_model_registry
node_model_registry -->|"provides model"| node_deploy
node_operator -->|"deploys model"| node_deploy
node_deploy -->|"creates and deploys"| node_endpoint
node_stream -->|"delivers event"| node_inference
node_cloud_run -.->|"hosts handler"| node_inference
node_inference -->|"looks up features"| node_feature_store
node_inference -->|"requests prediction"| node_endpoint
node_endpoint -->|"returns prediction"| node_inference
node_model_registry -->|"monitors model"| node_monitoring

click node_copy_data "https://github.com/googlecloudplatform/fraudfinder/blob/main/scripts/copy_bigquery_data.py"
click node_eda "https://github.com/googlecloudplatform/fraudfinder/blob/main/01_exploratory_data_analysis.ipynb"
click node_batch_features "https://github.com/googlecloudplatform/fraudfinder/blob/main/02_feature_engineering_batch.ipynb"
click node_stream_features "https://github.com/googlecloudplatform/fraudfinder/blob/main/03_feature_engineering_streaming.ipynb"
click node_bqml_training "https://github.com/googlecloudplatform/fraudfinder/blob/main/bqml/04_model_training_and_prediction.ipynb"
click node_bqml_pipeline "https://github.com/googlecloudplatform/fraudfinder/blob/main/bqml/05_model_training_pipeline_formalization.ipynb"
click node_vertex_experiment "https://github.com/googlecloudplatform/fraudfinder/blob/main/vertex_ai/04_experimentation.ipynb"
click node_xgboost_training "https://github.com/googlecloudplatform/fraudfinder/blob/main/vertex_ai/05_model_training_xgboost_formalization.ipynb"
click node_vertex_pipeline "https://github.com/googlecloudplatform/fraudfinder/blob/main/vertex_ai/06_formalization.ipynb"
click node_model_registry "https://github.com/googlecloudplatform/fraudfinder/tree/main/vertex_ai"
click node_monitoring "https://github.com/googlecloudplatform/fraudfinder/tree/main/bqml"
click node_deploy "https://github.com/googlecloudplatform/fraudfinder/blob/main/vertex_ai/deploy_model/deploy_model.py"
click node_inference "https://github.com/googlecloudplatform/fraudfinder/blob/main/scripts/cloud_run_model_inference/main.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_copy_data,node_historical,node_bigquery,node_stream,node_eda toneBlue
class node_batch_features,node_stream_features,node_feature_store toneAmber
class node_bqml_training,node_bqml_pipeline,node_vertex_experiment,node_xgboost_training,node_vertex_pipeline,node_model_registry,node_monitoring toneMint
class node_deploy,node_endpoint,node_inference,node_cloud_run toneRose
class node_operator toneIndigo
```

## Components

### Data preparation

- [Copy source data](https://github.com/googlecloudplatform/fraudfinder/blob/main/scripts/copy_bigquery_data.py): `scripts/copy_bigquery_data.py`
- **Historical transactions**
- **BigQuery warehouse**
- **Live transactions**
- [Explore data](https://github.com/googlecloudplatform/fraudfinder/blob/main/01_exploratory_data_analysis.ipynb): `01_exploratory_data_analysis.ipynb`

### Feature engineering

- [Batch features](https://github.com/googlecloudplatform/fraudfinder/blob/main/02_feature_engineering_batch.ipynb): `02_feature_engineering_batch.ipynb`
- [Streaming features](https://github.com/googlecloudplatform/fraudfinder/blob/main/03_feature_engineering_streaming.ipynb): `03_feature_engineering_streaming.ipynb`
- **Feature store**

### Model lifecycle

- [BQML training](https://github.com/googlecloudplatform/fraudfinder/blob/main/bqml/04_model_training_and_prediction.ipynb): `bqml/04_model_training_and_prediction.ipynb`
- [BQML pipeline](https://github.com/googlecloudplatform/fraudfinder/blob/main/bqml/05_model_training_pipeline_formalization.ipynb): `bqml/05_model_training_pipeline_formalization.ipynb`
- [Vertex experimentation](https://github.com/googlecloudplatform/fraudfinder/blob/main/vertex_ai/04_experimentation.ipynb): `vertex_ai/04_experimentation.ipynb`
- [XGBoost training](https://github.com/googlecloudplatform/fraudfinder/blob/main/vertex_ai/05_model_training_xgboost_formalization.ipynb): `vertex_ai/05_model_training_xgboost_formalization.ipynb`
- [Vertex formalization](https://github.com/googlecloudplatform/fraudfinder/blob/main/vertex_ai/06_formalization.ipynb): `vertex_ai/06_formalization.ipynb`
- [Model registry](https://github.com/googlecloudplatform/fraudfinder/tree/main/vertex_ai): `vertex_ai`
- [Model monitoring](https://github.com/googlecloudplatform/fraudfinder/tree/main/bqml): `bqml`

### Online serving

- [Endpoint deployment](https://github.com/googlecloudplatform/fraudfinder/blob/main/vertex_ai/deploy_model/deploy_model.py): `vertex_ai/deploy_model/deploy_model.py`
- **Vertex endpoint**
- [Inference handler](https://github.com/googlecloudplatform/fraudfinder/blob/main/scripts/cloud_run_model_inference/main.py): `scripts/cloud_run_model_inference/main.py`
- **Cloud Run**

### Other components

- **Workshop operator**

## Connections

- Workshop operator → Copy source data: prepares data (evidence: `README.md`)
- Historical transactions → Copy source data: copies from (evidence: `scripts/copy_bigquery_data.py`)
- Copy source data → BigQuery warehouse: writes tables (evidence: `scripts/copy_bigquery_data.py`)
- Workshop operator → Explore data: explores data (evidence: `README.md`)
- BigQuery warehouse → Explore data: reads history
- Explore data → Batch features: engineers batch (evidence: `README.md`)
- Live transactions → Streaming features: feeds events (evidence: `README.md`)
- Batch features → Feature store: ingests features (evidence: `README.md`)
- Streaming features → Feature store: ingests features (evidence: `README.md`)
- Feature store → BQML training: supplies features (evidence: `README.md`)
- Feature store → XGBoost training: supplies features (evidence: `README.md`)
- Workshop operator → BQML training: trains model (evidence: `README.md`)
- BQML training → BQML pipeline: formalizes training (evidence: `README.md`)
- Workshop operator → Vertex experimentation: experiments (evidence: `README.md`)
- Vertex experimentation → XGBoost training: develops model (evidence: `README.md`)
- XGBoost training → Vertex formalization: formalizes training (evidence: `README.md`)
- BQML training → Model registry: registers model (evidence: `README.md`)
- XGBoost training → Model registry: registers model (evidence: `README.md`)
- Model registry → Endpoint deployment: provides model (evidence: `README.md`)
- Workshop operator → Endpoint deployment: deploys model (evidence: `vertex_ai/deploy_model/deploy_model.py`)
- Endpoint deployment → Vertex endpoint: creates and deploys (evidence: `vertex_ai/deploy_model/deploy_model.py`)
- Live transactions → Inference handler: delivers event (evidence: `README.md`)
- Cloud Run → Inference handler: hosts handler
- Inference handler → Feature store: looks up features (evidence: `scripts/cloud_run_model_inference/main.py`)
- Inference handler → Vertex endpoint: requests prediction (evidence: `scripts/cloud_run_model_inference/main.py`)
- Vertex endpoint → Inference handler: returns prediction (evidence: `scripts/cloud_run_model_inference/main.py`)
- Model registry → Model monitoring: monitors model (evidence: `README.md`)
