# apptesters-org/apptesters_repo architecture

> Architecture diagram of the GitHub repository apptesters-org/apptesters_repo, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/apptesters-org/apptesters_repo
- Repository: https://github.com/apptesters-org/apptesters_repo

## Overview

##### File structure
- Top-level:
- `.github/workflows/schedule.yml` – CI/CD scheduler (runs daily)
- `generate_json.py`, `get_bundle_id.py` – ETL scripts that pull or process app data
- Data artifacts: `apps.json`, `bundleId.csv`, plus raw CSV backups and JSON under `genres/`
- Pattern: a lightweight ETL → static-site pipeline, hosted via GitHub Pages or similar.

##### Extract README insights
- Describes daily-updated IPA library, lifetime signing certificates, no back-end server, no database—pure static.
- Workflow automates JSON regeneration and site deployment.

a. Main components
1. External Data Sources (e.g., App Store APIs, proprietary scraping endpoints)
2. CI/CD Scheduler (GitHub Actions `schedule.yml`)
3. ETL Layer
- get_bundle_id.py
- generate_json.py
4. Data Artifacts
- `bundleId.csv`
- `apps.json`
- `genres/*.json`
5. Static Website
- `CNAME` for domain mapping
6. Hosting & CDN (GitHub Pages or equivalent)
7. End Users (Web Browsers, Mobile Browsers)

b. Relationships & interactions
- CI Scheduler → triggers ETL scripts
- ETL scripts ↔ External Data Sources (pull fresh IPA metadata)
- ETL scripts → generate Data Artifacts (JSON/CSV)
- Commit & push Artifacts + website files → Hosting platform (GitHub Pages)
- Users → HTTP GET to CDN → receive `index.html` & fetch `apps.json` → render UI

c. Architectural patterns & design principles
- “Pipeline as code”: CI/CD defines a scheduled ETL pipeline
- Static-only front end: no server processes at runtime
- Data-first separation: JSON/CSV as source of truth, decoupled from presentation
- Incremental updates: schedule runs produce daily snapshots

d. Key technologies & frameworks
- GitHub Actions (CI/CD)
- Python 3.x for ETL scripts
- JSON/CSV for data interchange
- GitHub Pages (or static-site host) + CNAME for custom domain
- Optional: any JS/CSS libs referenced in index.html (e.g., Vue/React or vanilla)

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Data Pipeline"
        ExternalAPI["External Data Sources"]:::external
        Scheduler["GitHub Actions Scheduler"]:::compute
        BundleExtract["get_bundle_id.py"]:::compute
        JSONGen["generate_json.py"]:::compute
        Cleanup["delete_release.sh"]:::compute
    end

    subgraph "Data Artifacts"
        AppsJSON["apps.json"]:::data
        BundleCSV["bundleId.csv"]:::data
        BundleCSVOld["bundleId.csv.old"]:::data
        Genre1["genres/app_primary_genres.json"]:::data
        Genre2["genres/app_secondary_genres.json"]:::data
        Genre3["genres/apps_top_chart_genres.json"]:::data
    end

    subgraph "Static Website"
        Index["index.html"]:::compute
        Icons["icons/"]:::compute
        CNAME["CNAME"]:::compute
        README["README.md"]:::compute
    end

    Hosting["Hosting & CDN"]:::hosting
    Users["End Users (Web Browsers)"]:::user

    ExternalAPI -->|pulls data| BundleExtract
    ExternalAPI -->|pulls data| JSONGen
    Scheduler -->|triggers| BundleExtract
    Scheduler -->|triggers| JSONGen
    Scheduler -->|triggers| Cleanup

    BundleExtract -->|outputs| BundleCSV
    JSONGen -->|outputs| AppsJSON
    JSONGen -->|outputs| Genre1
    JSONGen -->|outputs| Genre2
    JSONGen -->|outputs| Genre3
    Cleanup -->|archives| BundleCSVOld

    AppsJSON -->|push static files| Hosting
    BundleCSV -->|push static files| Hosting
    BundleCSVOld -->|push static files| Hosting
    Genre1 -->|push static files| Hosting
    Genre2 -->|push static files| Hosting
    Genre3 -->|push static files| Hosting
    Index -->|push static files| Hosting
    Icons -->|push static files| Hosting
    CNAME -->|push static files| Hosting
    README -->|push static files| Hosting

    Hosting -->|serves| Users

    click Scheduler "https://github.com/apptesters-org/apptesters_repo/blob/main/.github/workflows/schedule.yml"
    click BundleExtract "https://github.com/apptesters-org/apptesters_repo/blob/main/get_bundle_id.py"
    click JSONGen "https://github.com/apptesters-org/apptesters_repo/blob/main/generate_json.py"
    click Cleanup "https://github.com/apptesters-org/apptesters_repo/blob/main/delete_release.sh"
    click AppsJSON "https://github.com/apptesters-org/apptesters_repo/blob/main/apps.json"
    click BundleCSV "https://github.com/apptesters-org/apptesters_repo/blob/main/bundleId.csv"
    click BundleCSVOld "https://github.com/apptesters-org/apptesters_repo/blob/main/bundleId.csv.old"
    click Genre1 "https://github.com/apptesters-org/apptesters_repo/blob/main/genres/app_primary_genres.json"
    click Genre2 "https://github.com/apptesters-org/apptesters_repo/blob/main/genres/app_secondary_genres.json"
    click Genre3 "https://github.com/apptesters-org/apptesters_repo/blob/main/genres/apps_top_chart_genres.json"
    click Index "https://github.com/apptesters-org/apptesters_repo/blob/main/index.html"
    click Icons "https://github.com/apptesters-org/apptesters_repo/tree/main/icons/"
    click CNAME "https://github.com/apptesters-org/apptesters_repo/tree/main/CNAME"
    click README "https://github.com/apptesters-org/apptesters_repo/blob/main/README.md"

    classDef compute fill:#cce5ff,stroke:#66b2ff,stroke-width:1px;
    classDef data fill:#d4edda,stroke:#82c995,stroke-width:1px;
    classDef external fill:#ffe5b4,stroke:#ffb84d,stroke-width:1px;
    classDef hosting fill:#e2e3e5,stroke:#bfc0c1,stroke-width:1px;
    classDef user fill:#f8d7da,stroke:#f1a1a8,stroke-width:1px;
```
