# ubed23/oss-ecosystem-intelligence architecture

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

- Interactive diagram: https://gitdiagram.com/ubed23/oss-ecosystem-intelligence
- Repository: https://github.com/ubed23/oss-ecosystem-intelligence

## Overview

This repository delivers open-source maintenance-risk intelligence: a scheduled-by-operator data pipeline turns GitHub and OpenSSF signals into health metrics, score marts, and dashboard-ready outputs. Its main path is source collection → Parquet landing → dbt staging/intermediate transformations → analytics marts → Google Sheets/Tableau. Separate analyses provide historical backtesting and GH Archive source-fidelity evidence. The README documents model lineage and dashboard capabilities; sampled code supports ingestion behavior, while most SQL, Sheets-serving, and dashboard wiring is not excerpted, so those edges are documented rather than inferred from imports.

Main entry points: [`data/raw`](https://github.com/ubed23/oss-ecosystem-intelligence/tree/main/data/raw) (Parquet raw data), [`models/staging`](https://github.com/ubed23/oss-ecosystem-intelligence/tree/main/models/staging) (Source cleanup), [`scripts/to_sheets.py`](https://github.com/ubed23/oss-ecosystem-intelligence/blob/main/scripts/to_sheets.py) (Mart export), [`models/marts/fct_repo_health_monthly.sql`](https://github.com/ubed23/oss-ecosystem-intelligence/blob/main/models/marts/fct_repo_health_monthly.sql) (Monthly health metrics)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingestion["Data ingestion"]
  node_graphql_pull["Issues and contributions"]
  node_release_pull["Release collection<br/>[pull_releases.py]"]
  node_scorecard_pull["Security signals<br/>[pull_scorecard.py]"]
  node_archive_pull["Archive history<br/>[pull_gharchive.py]"]
  node_raw[("Parquet raw data")]
end

subgraph group_warehouse["Analytics warehouse"]
  node_staging["Source cleanup"]
  node_intermediate["Domain metrics"]
  node_monthly_health["Monthly health metrics"]
  node_score_history["Health score history"]
  node_current_health["Current health snapshot"]
  node_cohorts["Contributor cohorts"]
  node_release_reliability["Release reliability"]
  node_source_fidelity["Source fidelity"]
  node_repo_dimension["Repository dimension<br/>[dim_repo.sql]"]
end

subgraph group_validation["Risk validation"]
  node_backtest["Historical backtest<br/>[backtest.py]"]
  node_fidelity_check["Archive/API comparison"]
end

subgraph group_delivery["Reporting"]
  node_sheets[("Google Sheets")]
  node_sheet_export["Mart export<br/>[to_sheets.py]"]
  node_tableau["Tableau dashboard"]
end

node_user(("Engineering team"))
node_graphql{{"GitHub GraphQL"}}
node_rest{{"GitHub REST"}}
node_scorecard_api{{"OpenSSF Scorecard"}}
node_bigquery{{"BigQuery sources"}}

node_graphql -->|"queries"| node_graphql_pull
node_graphql_pull -->|"writes records"| node_raw
node_rest -->|"fetches releases"| node_release_pull
node_release_pull -->|"writes releases"| node_raw
node_scorecard_api -->|"provides scores"| node_scorecard_pull
node_bigquery -->|"provides scores"| node_scorecard_pull
node_scorecard_pull -->|"writes scorecard"| node_raw
node_bigquery -->|"provides events"| node_archive_pull
node_archive_pull -->|"writes history"| node_raw
node_raw -->|"loads sources"| node_staging
node_staging -->|"cleans and derives"| node_intermediate
node_intermediate -->|"builds metrics"| node_monthly_health
node_staging -->|"joins source records"| node_monthly_health
node_repo_dimension -->|"adds repository context"| node_monthly_health
node_monthly_health -->|"scores monthly"| node_score_history
node_monthly_health -->|"builds snapshot"| node_current_health
node_cohorts -->|"adds retention"| node_current_health
node_release_reliability -.->|"reports reliability"| node_current_health
node_staging -->|"forms cohorts"| node_cohorts
node_staging -->|"measures releases"| node_release_reliability
node_staging -->|"compares sources"| node_source_fidelity
node_raw -->|"uses history"| node_backtest
node_bigquery -->|"queries archive"| node_backtest
node_raw -->|"reads archive"| node_fidelity_check
node_rest -->|"checks API counts"| node_fidelity_check
node_current_health -->|"exports marts"| node_sheet_export
node_score_history -->|"exports marts"| node_sheet_export
node_cohorts -->|"exports marts"| node_sheet_export
node_release_reliability -->|"exports marts"| node_sheet_export
node_source_fidelity -->|"exports marts"| node_sheet_export
node_sheet_export -->|"refreshes data"| node_sheets
node_sheets -->|"syncs dashboard"| node_tableau
node_user -->|"reviews risk"| node_tableau

click node_graphql_pull "https://github.com/ubed23/oss-ecosystem-intelligence/blob/main/scripts/pull_github_graphql.py"
click node_release_pull "https://github.com/ubed23/oss-ecosystem-intelligence/blob/main/scripts/pull_releases.py"
click node_scorecard_pull "https://github.com/ubed23/oss-ecosystem-intelligence/blob/main/scripts/pull_scorecard.py"
click node_archive_pull "https://github.com/ubed23/oss-ecosystem-intelligence/blob/main/scripts/pull_gharchive.py"
click node_raw "https://github.com/ubed23/oss-ecosystem-intelligence/tree/main/data/raw"
click node_staging "https://github.com/ubed23/oss-ecosystem-intelligence/tree/main/models/staging"
click node_intermediate "https://github.com/ubed23/oss-ecosystem-intelligence/tree/main/models/intermediate"
click node_monthly_health "https://github.com/ubed23/oss-ecosystem-intelligence/blob/main/models/marts/fct_repo_health_monthly.sql"
click node_score_history "https://github.com/ubed23/oss-ecosystem-intelligence/blob/main/models/marts/fct_health_score_monthly.sql"
click node_current_health "https://github.com/ubed23/oss-ecosystem-intelligence/blob/main/models/marts/fct_repo_health_current.sql"
click node_cohorts "https://github.com/ubed23/oss-ecosystem-intelligence/blob/main/models/marts/fct_contributor_cohorts.sql"
click node_release_reliability "https://github.com/ubed23/oss-ecosystem-intelligence/blob/main/models/marts/fct_release_reliability.sql"
click node_source_fidelity "https://github.com/ubed23/oss-ecosystem-intelligence/blob/main/models/marts/fct_source_fidelity.sql"
click node_repo_dimension "https://github.com/ubed23/oss-ecosystem-intelligence/blob/main/models/marts/dim_repo.sql"
click node_sheet_export "https://github.com/ubed23/oss-ecosystem-intelligence/blob/main/scripts/to_sheets.py"
click node_tableau "https://github.com/ubed23/oss-ecosystem-intelligence/blob/main/dashboards/Product%20Reliability%20%26%20Developer%20Ecosystem%20Intelligence.twbx"
click node_backtest "https://github.com/ubed23/oss-ecosystem-intelligence/blob/main/scripts/backtest.py"
click node_fidelity_check "https://github.com/ubed23/oss-ecosystem-intelligence/blob/main/scripts/validate_gharchive.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_graphql_pull,node_release_pull,node_scorecard_pull,node_archive_pull,node_raw toneBlue
class node_staging,node_intermediate,node_monthly_health,node_score_history,node_current_health,node_cohorts,node_release_reliability,node_source_fidelity,node_repo_dimension toneAmber
class node_backtest,node_fidelity_check toneMint
class node_sheets,node_sheet_export,node_tableau toneRose
class node_user,node_graphql,node_rest,node_scorecard_api,node_bigquery toneIndigo
```

## Components

### Data ingestion

- [Issues and contributions](https://github.com/ubed23/oss-ecosystem-intelligence/blob/main/scripts/pull_github_graphql.py): `scripts/pull_github_graphql.py`
- [Release collection](https://github.com/ubed23/oss-ecosystem-intelligence/blob/main/scripts/pull_releases.py): `scripts/pull_releases.py`
- [Security signals](https://github.com/ubed23/oss-ecosystem-intelligence/blob/main/scripts/pull_scorecard.py): `scripts/pull_scorecard.py`
- [Archive history](https://github.com/ubed23/oss-ecosystem-intelligence/blob/main/scripts/pull_gharchive.py): `scripts/pull_gharchive.py`
- [Parquet raw data](https://github.com/ubed23/oss-ecosystem-intelligence/tree/main/data/raw): `data/raw`

### Analytics warehouse

- [Source cleanup](https://github.com/ubed23/oss-ecosystem-intelligence/tree/main/models/staging): `models/staging`
- [Domain metrics](https://github.com/ubed23/oss-ecosystem-intelligence/tree/main/models/intermediate): `models/intermediate`
- [Monthly health metrics](https://github.com/ubed23/oss-ecosystem-intelligence/blob/main/models/marts/fct_repo_health_monthly.sql): `models/marts/fct_repo_health_monthly.sql`
- [Health score history](https://github.com/ubed23/oss-ecosystem-intelligence/blob/main/models/marts/fct_health_score_monthly.sql): `models/marts/fct_health_score_monthly.sql`
- [Current health snapshot](https://github.com/ubed23/oss-ecosystem-intelligence/blob/main/models/marts/fct_repo_health_current.sql): `models/marts/fct_repo_health_current.sql`
- [Contributor cohorts](https://github.com/ubed23/oss-ecosystem-intelligence/blob/main/models/marts/fct_contributor_cohorts.sql): `models/marts/fct_contributor_cohorts.sql`
- [Release reliability](https://github.com/ubed23/oss-ecosystem-intelligence/blob/main/models/marts/fct_release_reliability.sql): `models/marts/fct_release_reliability.sql`
- [Source fidelity](https://github.com/ubed23/oss-ecosystem-intelligence/blob/main/models/marts/fct_source_fidelity.sql): `models/marts/fct_source_fidelity.sql`
- [Repository dimension](https://github.com/ubed23/oss-ecosystem-intelligence/blob/main/models/marts/dim_repo.sql): `models/marts/dim_repo.sql`

### Risk validation

- [Historical backtest](https://github.com/ubed23/oss-ecosystem-intelligence/blob/main/scripts/backtest.py): `scripts/backtest.py`
- [Archive/API comparison](https://github.com/ubed23/oss-ecosystem-intelligence/blob/main/scripts/validate_gharchive.py): `scripts/validate_gharchive.py`

### Reporting

- **Google Sheets**
- [Mart export](https://github.com/ubed23/oss-ecosystem-intelligence/blob/main/scripts/to_sheets.py): `scripts/to_sheets.py`
- [Tableau dashboard](https://github.com/ubed23/oss-ecosystem-intelligence/blob/main/dashboards/Product%20Reliability%20%26%20Developer%20Ecosystem%20Intelligence.twbx): `dashboards/Product Reliability & Developer Ecosystem Intelligence.twbx`

### Other components

- **Engineering team**
- **GitHub GraphQL**
- **GitHub REST**
- **OpenSSF Scorecard**
- **BigQuery sources**

## Connections

- GitHub GraphQL → Issues and contributions: queries (evidence: `README.md`)
- Issues and contributions → Parquet raw data: writes records (evidence: `scripts/pull_github_graphql.py`)
- GitHub REST → Release collection: fetches releases (evidence: `README.md`)
- Release collection → Parquet raw data: writes releases (evidence: `scripts/pull_releases.py`)
- OpenSSF Scorecard → Security signals: provides scores (evidence: `scripts/pull_scorecard.py`)
- BigQuery sources → Security signals: provides scores (evidence: `scripts/pull_scorecard.py`)
- Security signals → Parquet raw data: writes scorecard (evidence: `scripts/pull_scorecard.py`)
- BigQuery sources → Archive history: provides events (evidence: `scripts/pull_gharchive.py`)
- Archive history → Parquet raw data: writes history (evidence: `scripts/pull_gharchive.py`)
- Parquet raw data → Source cleanup: loads sources (evidence: `README.md`)
- Source cleanup → Domain metrics: cleans and derives (evidence: `README.md`)
- Domain metrics → Monthly health metrics: builds metrics (evidence: `README.md`)
- Source cleanup → Monthly health metrics: joins source records (evidence: `README.md`)
- Repository dimension → Monthly health metrics: adds repository context (evidence: `README.md`)
- Monthly health metrics → Health score history: scores monthly (evidence: `README.md`)
- Monthly health metrics → Current health snapshot: builds snapshot (evidence: `README.md`)
- Contributor cohorts → Current health snapshot: adds retention (evidence: `README.md`)
- Release reliability → Current health snapshot: reports reliability
- Source cleanup → Contributor cohorts: forms cohorts (evidence: `README.md`)
- Source cleanup → Release reliability: measures releases (evidence: `README.md`)
- Source cleanup → Source fidelity: compares sources (evidence: `README.md`)
- Parquet raw data → Historical backtest: uses history (evidence: `README.md`)
- BigQuery sources → Historical backtest: queries archive (evidence: `scripts/backtest.py`)
- Parquet raw data → Archive/API comparison: reads archive (evidence: `scripts/validate_gharchive.py`)
- GitHub REST → Archive/API comparison: checks API counts (evidence: `scripts/validate_gharchive.py`)
- Current health snapshot → Mart export: exports marts (evidence: `README.md`)
- Health score history → Mart export: exports marts (evidence: `README.md`)
- Contributor cohorts → Mart export: exports marts (evidence: `README.md`)
- Release reliability → Mart export: exports marts (evidence: `README.md`)
- Source fidelity → Mart export: exports marts (evidence: `README.md`)
- Mart export → Google Sheets: refreshes data (evidence: `README.md`)
- Google Sheets → Tableau dashboard: syncs dashboard (evidence: `README.md`)
- Engineering team → Tableau dashboard: reviews risk (evidence: `README.md`)
