# helloyug/github-actions-updators architecture

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

- Interactive diagram: https://gitdiagram.com/helloyug/github-actions-updators
- Repository: https://github.com/helloyug/github-actions-updators

## Overview

1. **Repository purpose**
   This repo is an automation suite for collecting profile/platform statistics and emitting normalized JSON snapshots for downstream use in portfolios, dashboards, or websites.

2. **Top-level architecture**
   The system is split into **independent platform updaters** rather than a single monolith. Each platform lives in its own folder and can run, fail, and be maintained without impacting the others.

3. **Execution model**
   Every updater follows the same pipeline: read target accounts from `creators.json`, fetch stats from the external platform, transform the result into a consistent shape, then write `output.json`. This makes each platform a self-contained data-ingestion boundary.

4. **Orchestration layer**
   `run_all.py` in the repository root is the master coordinator. It executes each platform updater sequentially and produces a root-level `run_all.log` that summarizes cross-platform success/failure.

5. **Platform subsystems**
   The repo contains five provider-specific subsystems: `github-updater`, `leetcode-updater`, `youtube-updater`, `instagram-updater`, and `linkedin-updater`. Each folder has its own scraper implementation, helper utilities, dependency list, and runtime log, which keeps provider-specific fragility isolated.

6. **External data sources and extraction approaches**
   The extraction mechanism differs by provider:
   - **GitHub:** official REST API
   - **LeetCode:** public GraphQL API
   - **YouTube:** Playwright browser automation
   - **Instagram:** Playwright plus HTML parsing
   - **LinkedIn:** `linkedin-api` mobile-style API  
   These are the main integration boundaries in the architecture.

7. **Configuration boundary**
   The primary input is `creators.json` inside each updater folder. A `templates/creators.example.json` file provides the expected schema, so the configuration is intentionally per-platform and decoupled from code.

8. **Runtime and dependency isolation**
   Each updater has its own `requirements.txt`, so dependencies are scoped per platform instead of shared globally. This is important because the browser-automation updaters require Playwright/Chromium, while API-based updaters do not.

9. **Logging and operational behavior**
   Each platform writes an `updater.log` in its own folder, while the orchestrator writes `run_all.log`. The logs capture retries, network activity, and failures, and are configured to retain only recent execution sessions for bounded log growth.

10. **Automation and deployment**
   The repository is designed for GitHub Actions. The workflow template in `templates/update-stats.example.yml` runs on a weekly schedule, installs dependencies, executes `run_all.py`, and can commit refreshed JSON outputs back to the repo. Secrets such as `GITHUB_TOKEN` and LinkedIn credentials are used only where required by the platform integration.

11. **Primary data flow**
   The architectural flow is: **GitHub Actions or local execution → `run_all.py` or per-platform `update.py` → platform scraper/API/browser automation → normalized stats in `output.json` → optional commit and downstream consumption**.

12. **Key architectural boundary**
   The most important boundary is between the repo’s **internal normalization layer** and the **external platform-specific APIs/UI surfaces**. The repo’s job is not to store long-lived state; it acts as a scheduled extraction and transformation pipeline that produces fresh snapshots.

Main entry points: [`run_all.py`](https://github.com/helloyug/github-actions-updators/blob/main/run_all.py) (Run all), [`github-updater/update.py`](https://github.com/helloyug/github-actions-updators/blob/main/github-updater/update.py) (Update), [`templates/creators.example.json`](https://github.com/helloyug/github-actions-updators/blob/main/templates/creators.example.json) (Creators schema), [`leetcode-updater/update.py`](https://github.com/helloyug/github-actions-updators/blob/main/leetcode-updater/update.py) (Update)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_root["Root orchestration"]
  node_run_all["Run all<br/>orchestrator<br/>[run_all.py]"]
  node_run_all_log["Run log<br/>[run_all.log]"]
end

subgraph group_github["GitHub updater"]
  node_gh_update["Update<br/>runner<br/>[update.py]"]
  node_gh_scraper["Scraper<br/>api client<br/>[github_scraper.py]"]
  node_gh_utils["Helpers<br/>transform utils<br/>[utils.py]"]
  node_gh_creators["Creators<br/>config<br/>[creators.json]"]
  node_gh_output["Output<br/>snapshot"]
end

subgraph group_leetcode["LeetCode updater"]
  node_leet_update["Update<br/>runner<br/>[update.py]"]
  node_leet_api["GraphQL<br/>api client<br/>[leetcode.py]"]
  node_leet_utils["Helpers<br/>transform utils<br/>[utils.py]"]
  node_leet_creators["Creators<br/>config<br/>[creators.json]"]
end

subgraph group_youtube["YouTube updater"]
  node_yt_update["Update<br/>runner<br/>[update.py]"]
  node_yt_browser["Browser<br/>playwright scraper<br/>[youtube.py]"]
  node_yt_utils["Helpers<br/>transform utils<br/>[utils.py]"]
  node_yt_creators["Creators<br/>config<br/>[creators.json]"]
end

subgraph group_instagram["Instagram updater"]
  node_ig_update["Update<br/>runner<br/>[update.py]"]
  node_ig_browser["Scraper<br/>playwright+html<br/>[instagram.py]"]
  node_ig_utils["Helpers<br/>transform utils<br/>[utils.py]"]
  node_ig_creators["Creators<br/>config<br/>[creators.json]"]
end

subgraph group_linkedin["LinkedIn updater"]
  node_li_update["Update<br/>runner<br/>[update.py]"]
  node_li_api["API client<br/>linkedin-api"]
  node_li_utils["Helpers<br/>transform utils<br/>[utils.py]"]
  node_li_creators["Creators<br/>config<br/>[creators.json]"]
end

subgraph group_templates["Templates"]
  node_creators_template["Creators schema<br/>template"]
  node_workflow_template["Workflow template<br/>ci template"]
end

node_run_all -->|"executes"| node_gh_update
node_run_all -->|"executes"| node_leet_update
node_run_all -->|"executes"| node_yt_update
node_run_all -->|"executes"| node_ig_update
node_run_all -->|"executes"| node_li_update
node_run_all -->|"writes"| node_run_all_log
node_gh_update -->|"reads"| node_gh_creators
node_gh_update -->|"fetches via"| node_gh_scraper
node_gh_update -->|"normalizes with"| node_gh_utils
node_gh_update -->|"writes"| node_gh_output
node_leet_update -->|"reads"| node_leet_creators
node_leet_update -->|"fetches via"| node_leet_api
node_leet_update -->|"normalizes with"| node_leet_utils
node_leet_update -->|"writes"| node_gh_output
node_yt_update -->|"reads"| node_yt_creators
node_yt_update -->|"fetches via"| node_yt_browser
node_yt_update -->|"normalizes with"| node_yt_utils
node_ig_update -->|"reads"| node_ig_creators
node_ig_update -->|"fetches via"| node_ig_browser
node_ig_update -->|"normalizes with"| node_ig_utils
node_li_update -->|"reads"| node_li_creators
node_li_update -->|"fetches via"| node_li_api
node_li_update -->|"normalizes with"| node_li_utils
node_workflow_template -.->|"invokes"| node_run_all
node_workflow_template -.->|"can run"| node_gh_update
node_creators_template -.->|"defines schema for"| node_gh_creators
node_creators_template -.->|"defines schema for"| node_leet_creators
node_creators_template -.->|"defines schema for"| node_yt_creators
node_creators_template -.->|"defines schema for"| node_ig_creators
node_creators_template -.->|"defines schema for"| node_li_creators

click node_run_all "https://github.com/helloyug/github-actions-updators/blob/main/run_all.py"
click node_run_all_log "https://github.com/helloyug/github-actions-updators/blob/main/run_all.log"
click node_gh_update "https://github.com/helloyug/github-actions-updators/blob/main/github-updater/update.py"
click node_gh_scraper "https://github.com/helloyug/github-actions-updators/blob/main/github-updater/github_scraper.py"
click node_gh_utils "https://github.com/helloyug/github-actions-updators/blob/main/github-updater/utils.py"
click node_gh_creators "https://github.com/helloyug/github-actions-updators/blob/main/github-updater/creators.json"
click node_leet_update "https://github.com/helloyug/github-actions-updators/blob/main/leetcode-updater/update.py"
click node_leet_api "https://github.com/helloyug/github-actions-updators/blob/main/leetcode-updater/leetcode.py"
click node_leet_utils "https://github.com/helloyug/github-actions-updators/blob/main/leetcode-updater/utils.py"
click node_leet_creators "https://github.com/helloyug/github-actions-updators/blob/main/leetcode-updater/creators.json"
click node_yt_update "https://github.com/helloyug/github-actions-updators/blob/main/youtube-updater/update.py"
click node_yt_browser "https://github.com/helloyug/github-actions-updators/blob/main/youtube-updater/youtube.py"
click node_yt_utils "https://github.com/helloyug/github-actions-updators/blob/main/youtube-updater/utils.py"
click node_yt_creators "https://github.com/helloyug/github-actions-updators/blob/main/youtube-updater/creators.json"
click node_ig_update "https://github.com/helloyug/github-actions-updators/blob/main/instagram-updater/update.py"
click node_ig_browser "https://github.com/helloyug/github-actions-updators/blob/main/instagram-updater/instagram.py"
click node_ig_utils "https://github.com/helloyug/github-actions-updators/blob/main/instagram-updater/utils.py"
click node_ig_creators "https://github.com/helloyug/github-actions-updators/blob/main/instagram-updater/creators.json"
click node_li_update "https://github.com/helloyug/github-actions-updators/blob/main/linkedin-updater/update.py"
click node_li_api "https://github.com/helloyug/github-actions-updators/blob/main/linkedin-updater/linkedin_scraper.py"
click node_li_utils "https://github.com/helloyug/github-actions-updators/blob/main/linkedin-updater/utils.py"
click node_li_creators "https://github.com/helloyug/github-actions-updators/blob/main/linkedin-updater/creators.json"
click node_creators_template "https://github.com/helloyug/github-actions-updators/blob/main/templates/creators.example.json"
click node_workflow_template "https://github.com/helloyug/github-actions-updators/blob/main/templates/update-stats.example.yml"

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_run_all,node_run_all_log,node_creators_template,node_workflow_template toneBlue
class node_gh_update,node_gh_scraper,node_gh_utils,node_gh_creators,node_gh_output toneAmber
class node_leet_update,node_leet_api,node_leet_utils,node_leet_creators toneMint
class node_yt_update,node_yt_browser,node_yt_utils,node_yt_creators toneRose
class node_ig_update,node_ig_browser,node_ig_utils,node_ig_creators toneIndigo
class node_li_update,node_li_api,node_li_utils,node_li_creators toneTeal
```

## Components

### Root orchestration

Repository-wide coordinator and shared deployment entrypoints.

- [Run all](https://github.com/helloyug/github-actions-updators/blob/main/run_all.py): orchestrator · Sequentially runs every updater and writes the cross-platform log. · `run_all.py`
- [Run log](https://github.com/helloyug/github-actions-updators/blob/main/run_all.log): log · Repository-level execution summary for coordinated runs. · `run_all.log`

### GitHub updater

GitHub provider-specific ingestion boundary.

- [Update](https://github.com/helloyug/github-actions-updators/blob/main/github-updater/update.py): runner · Entry script for the GitHub platform pipeline. · `github-updater/update.py`
- [Scraper](https://github.com/helloyug/github-actions-updators/blob/main/github-updater/github_scraper.py): api client · Fetches profile stats from the GitHub REST API. · `github-updater/github_scraper.py`
- [Helpers](https://github.com/helloyug/github-actions-updators/blob/main/github-updater/utils.py): transform utils · Shared parsing and normalization helpers for GitHub data. · `github-updater/utils.py`
- [Creators](https://github.com/helloyug/github-actions-updators/blob/main/github-updater/creators.json): config · Per-platform target account list and input schema. · `github-updater/creators.json`
- **Output**: snapshot · Normalized GitHub stats emitted for downstream consumption.

### LeetCode updater

LeetCode provider-specific ingestion boundary.

- [Update](https://github.com/helloyug/github-actions-updators/blob/main/leetcode-updater/update.py): runner · Entry script for the LeetCode platform pipeline. · `leetcode-updater/update.py`
- [GraphQL](https://github.com/helloyug/github-actions-updators/blob/main/leetcode-updater/leetcode.py): api client · Queries the public LeetCode GraphQL API. · `leetcode-updater/leetcode.py`
- [Helpers](https://github.com/helloyug/github-actions-updators/blob/main/leetcode-updater/utils.py): transform utils · Shared parsing and normalization helpers for LeetCode data. · `leetcode-updater/utils.py`
- [Creators](https://github.com/helloyug/github-actions-updators/blob/main/leetcode-updater/creators.json): config · Per-platform target account list and input schema. · `leetcode-updater/creators.json`

### YouTube updater

YouTube provider-specific ingestion boundary.

- [Update](https://github.com/helloyug/github-actions-updators/blob/main/youtube-updater/update.py): runner · Entry script for the YouTube platform pipeline. · `youtube-updater/update.py`
- [Browser](https://github.com/helloyug/github-actions-updators/blob/main/youtube-updater/youtube.py): playwright scraper · Collects channel stats through Playwright automation. · `youtube-updater/youtube.py`
- [Helpers](https://github.com/helloyug/github-actions-updators/blob/main/youtube-updater/utils.py): transform utils · Shared parsing and normalization helpers for YouTube data. · `youtube-updater/utils.py`
- [Creators](https://github.com/helloyug/github-actions-updators/blob/main/youtube-updater/creators.json): config · Per-platform target account list and input schema. · `youtube-updater/creators.json`

### Instagram updater

Instagram provider-specific ingestion boundary.

- [Update](https://github.com/helloyug/github-actions-updators/blob/main/instagram-updater/update.py): runner · Entry script for the Instagram platform pipeline. · `instagram-updater/update.py`
- [Scraper](https://github.com/helloyug/github-actions-updators/blob/main/instagram-updater/instagram.py): playwright+html · Collects profile stats with browser automation and HTML parsing. · `instagram-updater/instagram.py`
- [Helpers](https://github.com/helloyug/github-actions-updators/blob/main/instagram-updater/utils.py): transform utils · Shared parsing and normalization helpers for Instagram data. · `instagram-updater/utils.py`
- [Creators](https://github.com/helloyug/github-actions-updators/blob/main/instagram-updater/creators.json): config · Per-platform target account list and input schema. · `instagram-updater/creators.json`

### LinkedIn updater

LinkedIn provider-specific ingestion boundary.

- [Update](https://github.com/helloyug/github-actions-updators/blob/main/linkedin-updater/update.py): runner · Entry script for the LinkedIn platform pipeline. · `linkedin-updater/update.py`
- [API client](https://github.com/helloyug/github-actions-updators/blob/main/linkedin-updater/linkedin_scraper.py): linkedin-api · Fetches profile stats through the LinkedIn API wrapper. · `linkedin-updater/linkedin_scraper.py`
- [Helpers](https://github.com/helloyug/github-actions-updators/blob/main/linkedin-updater/utils.py): transform utils · Shared parsing and normalization helpers for LinkedIn data. · `linkedin-updater/utils.py`
- [Creators](https://github.com/helloyug/github-actions-updators/blob/main/linkedin-updater/creators.json): config · Per-platform target account list and input schema. · `linkedin-updater/creators.json`

### Templates

Shared schema and workflow examples.

- [Creators schema](https://github.com/helloyug/github-actions-updators/blob/main/templates/creators.example.json): template · Example schema for per-platform creators.json files. · `templates/creators.example.json`
- [Workflow template](https://github.com/helloyug/github-actions-updators/blob/main/templates/update-stats.example.yml): ci template · Example GitHub Actions workflow for scheduled updates. · `templates/update-stats.example.yml`

## Connections

- Run all → Update: executes · Coordinator launches each provider updater sequentially.
- Run all → Update: executes · Coordinator launches each provider updater sequentially.
- Run all → Update: executes · Coordinator launches each provider updater sequentially.
- Run all → Update: executes · Coordinator launches each provider updater sequentially.
- Run all → Update: executes · Coordinator launches each provider updater sequentially.
- Run all → Run log: writes · Cross-platform execution summary log.
- Update → Creators: reads · Loads target accounts to update.
- Update → Scraper: fetches via · Pulls stats from GitHub REST API.
- Update → Helpers: normalizes with · Transforms raw API data into the shared snapshot shape.
- Update → Output: writes · Emits normalized snapshot output.
- Update → Creators: reads · Loads target accounts to update.
- Update → GraphQL: fetches via · Queries the public GraphQL endpoint.
- Update → Helpers: normalizes with · Transforms raw API data into the shared snapshot shape.
- Update → Output: writes · Emits normalized snapshot output.
- Update → Creators: reads · Loads target accounts to update.
- Update → Browser: fetches via · Uses browser automation to collect stats.
- Update → Helpers: normalizes with · Transforms scraped data into the shared snapshot shape.
- Update → Creators: reads · Loads target accounts to update.
- Update → Scraper: fetches via · Uses browser automation and HTML parsing.
- Update → Helpers: normalizes with · Transforms scraped data into the shared snapshot shape.
- Update → Creators: reads · Loads target accounts to update.
- Update → API client: fetches via · Uses the LinkedIn API wrapper.
- Update → Helpers: normalizes with · Transforms raw API data into the shared snapshot shape.
- Workflow template → Run all: invokes · GitHub Actions workflow runs the repository coordinator.
- Workflow template → Update: can run · Workflow can also trigger platform updaters through the coordinator pattern.
- Creators schema → Creators: defines schema for · Template documents the expected creators file shape.
- Creators schema → Creators: defines schema for · Template documents the expected creators file shape.
- Creators schema → Creators: defines schema for · Template documents the expected creators file shape.
- Creators schema → Creators: defines schema for · Template documents the expected creators file shape.
- Creators schema → Creators: defines schema for · Template documents the expected creators file shape.
