# satyaifd/project-gcp-end2end architecture

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

- Interactive diagram: https://gitdiagram.com/satyaifd/project-gcp-end2end
- Repository: https://github.com/satyaifd/project-gcp-end2end

## Overview

This repository is a claims/transaction QA-triage MLOps project. Its sampled runtime implements deterministic synthetic data generation and a local, quality-gated training CLI; the README also documents a broader planned/deployed GCP pipeline. The graph distinguishes those documented cloud capabilities from the sampled Python implementation. Source excerpts support the local calls; cloud relationships are cited to the README, not presented as inspected implementation.

Main entry points: [`src/claims_triage/train.py`](https://github.com/satyaifd/project-gcp-end2end/blob/main/src/claims_triage/train.py) (Training CLI), [`terraform`](https://github.com/satyaifd/project-gcp-end2end/tree/main/terraform) (Terraform provisioning), [`src/claims_triage/generate.py`](https://github.com/satyaifd/project-gcp-end2end/blob/main/src/claims_triage/generate.py) (Synthetic generator), [`docs/architecture.md`](https://github.com/satyaifd/project-gcp-end2end/blob/main/docs/architecture.md) (Cloud Run serving)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Data contracts"]
  node_generator["Synthetic generator<br/>[generate.py]"]
  node_records["Claim records<br/>[schemas.py]"]
  node_csv["CSV datasets"]
end

subgraph group_model["Local ML workflow"]
  node_feature_io["CSV loading<br/>[features.py]"]
  node_matrix["Feature matrix<br/>[features.py]"]
  node_preprocessor["Feature preprocessing<br/>[features.py]"]
  node_trainer["Training CLI<br/>[train.py]"]
  node_evaluation["Model evaluation<br/>[train.py]"]
  node_thresholds["Threshold calibration<br/>[train.py]"]
  node_artifacts["Model artifacts<br/>[train.py]"]
end

subgraph group_cloud["Cloud operations"]
  node_gcs[("Cloud Storage")]
  node_bigquery[("BigQuery")]
  node_bqml["BigQuery ML"]
  node_serving["Cloud Run serving<br/>[architecture.md]"]
  node_registry[("Artifact Registry")]
  node_telemetry[("Cloud Logging")]
  node_drift_job["Drift detection job<br/>[architecture.md]"]
  node_drift_data[("Drift results")]
  node_terraform["Terraform provisioning"]
end

node_operator(("Operator"))

node_operator -->|"runs"| node_generator
node_generator -->|"validates"| node_records
node_generator -->|"writes"| node_csv
node_operator -->|"runs"| node_trainer
node_trainer -->|"loads CSV"| node_feature_io
node_feature_io -->|"validates"| node_records
node_trainer -->|"converts records"| node_matrix
node_trainer -->|"builds pipeline"| node_preprocessor
node_trainer -->|"evaluates models"| node_evaluation
node_trainer -->|"calibrates thresholds"| node_thresholds
node_trainer -->|"saves artifacts"| node_artifacts
node_csv -.->|"stores datasets"| node_gcs
node_gcs -.->|"loads data"| node_bigquery
node_bigquery -.->|"trains baseline"| node_bqml
node_artifacts -.->|"publishes model"| node_registry
node_registry -.->|"serves model"| node_serving
node_serving -.->|"emits telemetry"| node_telemetry
node_drift_job -.->|"reads features"| node_bigquery
node_drift_job -.->|"writes drift results"| node_drift_data
node_terraform -.->|"provisions"| node_gcs
node_terraform -.->|"provisions"| node_bigquery
node_terraform -.->|"provisions"| node_serving

click node_generator "https://github.com/satyaifd/project-gcp-end2end/blob/main/src/claims_triage/generate.py"
click node_records "https://github.com/satyaifd/project-gcp-end2end/blob/main/src/claims_triage/schemas.py"
click node_feature_io "https://github.com/satyaifd/project-gcp-end2end/blob/main/src/claims_triage/features.py"
click node_matrix "https://github.com/satyaifd/project-gcp-end2end/blob/main/src/claims_triage/features.py"
click node_preprocessor "https://github.com/satyaifd/project-gcp-end2end/blob/main/src/claims_triage/features.py"
click node_trainer "https://github.com/satyaifd/project-gcp-end2end/blob/main/src/claims_triage/train.py"
click node_evaluation "https://github.com/satyaifd/project-gcp-end2end/blob/main/src/claims_triage/train.py"
click node_thresholds "https://github.com/satyaifd/project-gcp-end2end/blob/main/src/claims_triage/train.py"
click node_artifacts "https://github.com/satyaifd/project-gcp-end2end/blob/main/src/claims_triage/train.py"
click node_serving "https://github.com/satyaifd/project-gcp-end2end/blob/main/docs/architecture.md"
click node_drift_job "https://github.com/satyaifd/project-gcp-end2end/blob/main/docs/architecture.md"
click node_terraform "https://github.com/satyaifd/project-gcp-end2end/tree/main/terraform"

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_generator,node_records,node_csv toneBlue
class node_feature_io,node_matrix,node_preprocessor,node_trainer,node_evaluation,node_thresholds,node_artifacts toneAmber
class node_gcs,node_bigquery,node_bqml,node_serving,node_registry,node_telemetry,node_drift_job,node_drift_data,node_terraform toneMint
class node_operator toneIndigo
```

## Components

### Data contracts

- [Synthetic generator](https://github.com/satyaifd/project-gcp-end2end/blob/main/src/claims_triage/generate.py): `src/claims_triage/generate.py`
- [Claim records](https://github.com/satyaifd/project-gcp-end2end/blob/main/src/claims_triage/schemas.py): `src/claims_triage/schemas.py`
- **CSV datasets**

### Local ML workflow

- [CSV loading](https://github.com/satyaifd/project-gcp-end2end/blob/main/src/claims_triage/features.py): `src/claims_triage/features.py`
- [Feature matrix](https://github.com/satyaifd/project-gcp-end2end/blob/main/src/claims_triage/features.py): `src/claims_triage/features.py`
- [Feature preprocessing](https://github.com/satyaifd/project-gcp-end2end/blob/main/src/claims_triage/features.py): `src/claims_triage/features.py`
- [Training CLI](https://github.com/satyaifd/project-gcp-end2end/blob/main/src/claims_triage/train.py): `src/claims_triage/train.py`
- [Model evaluation](https://github.com/satyaifd/project-gcp-end2end/blob/main/src/claims_triage/train.py): `src/claims_triage/train.py`
- [Threshold calibration](https://github.com/satyaifd/project-gcp-end2end/blob/main/src/claims_triage/train.py): `src/claims_triage/train.py`
- [Model artifacts](https://github.com/satyaifd/project-gcp-end2end/blob/main/src/claims_triage/train.py): `src/claims_triage/train.py`

### Cloud operations

- **Cloud Storage**
- **BigQuery**
- **BigQuery ML**
- [Cloud Run serving](https://github.com/satyaifd/project-gcp-end2end/blob/main/docs/architecture.md): `docs/architecture.md`
- **Artifact Registry**
- **Cloud Logging**
- [Drift detection job](https://github.com/satyaifd/project-gcp-end2end/blob/main/docs/architecture.md): `docs/architecture.md`
- **Drift results**
- [Terraform provisioning](https://github.com/satyaifd/project-gcp-end2end/tree/main/terraform): `terraform`

### Other components

- **Operator**

## Connections

- Operator → Synthetic generator: runs (evidence: `README.md`)
- Synthetic generator → Claim records: validates (evidence: `src/claims_triage/generate.py`)
- Synthetic generator → CSV datasets: writes (evidence: `README.md`)
- Operator → Training CLI: runs (evidence: `README.md`)
- Training CLI → CSV loading: loads CSV (evidence: `src/claims_triage/train.py`)
- CSV loading → Claim records: validates (evidence: `src/claims_triage/features.py`)
- Training CLI → Feature matrix: converts records (evidence: `src/claims_triage/train.py`)
- Training CLI → Feature preprocessing: builds pipeline (evidence: `src/claims_triage/train.py`)
- Training CLI → Model evaluation: evaluates models (evidence: `src/claims_triage/train.py`)
- Training CLI → Threshold calibration: calibrates thresholds (evidence: `src/claims_triage/train.py`)
- Training CLI → Model artifacts: saves artifacts (evidence: `src/claims_triage/train.py`)
- CSV datasets → Cloud Storage: stores datasets (evidence: `README.md`)
- Cloud Storage → BigQuery: loads data (evidence: `README.md`)
- BigQuery → BigQuery ML: trains baseline (evidence: `README.md`)
- Model artifacts → Artifact Registry: publishes model (evidence: `README.md`)
- Artifact Registry → Cloud Run serving: serves model (evidence: `README.md`)
- Cloud Run serving → Cloud Logging: emits telemetry (evidence: `README.md`)
- Drift detection job → BigQuery: reads features (evidence: `README.md`)
- Drift detection job → Drift results: writes drift results (evidence: `README.md`)
- Terraform provisioning → Cloud Storage: provisions (evidence: `README.md`)
- Terraform provisioning → BigQuery: provisions (evidence: `README.md`)
- Terraform provisioning → Cloud Run serving: provisions (evidence: `README.md`)
