# strongaya/strong-aya-info-portal architecture

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

- Interactive diagram: https://gitdiagram.com/strongaya/strong-aya-info-portal
- Repository: https://github.com/strongaya/strong-aya-info-portal

## Overview

##### Project Type and Purpose
- This is a proof-of-concept, static web portal that aggregates and displays patient-related statistics (STRONG AYA Info Portal).
- It is implemented as a GitHub Pages site (“web/” folder), with scheduled GitHub Actions workflows that fetch and prepare data from a Vantage6 server and update Datawrapper charts.

##### File-Structure Analysis
- Top-level directories and files:
– “web/”: all static assets (HTML, CSS, JS, images) served to end users
– “scripts/”: Python integration scripts for Vantage6, flashcard construction, Datawrapper uploads
– “data/”: raw and processed data artifacts (JSON output from Vantage6, generated CSV flashcards)
– “.github/workflows/”: two workflows—one to retrieve and process data (“update_data.yml”), one to build/publish the site (“publish_web.yml”)
- Configuration and artifacts:
– “scripts/requirements.txt”: Python dependencies
– “plotting_info.json”: metadata for Datawrapper charts
– “STRONG-AYA-Cancer-Info-Portal-Design.mp4”: full portal design concept

##### README Insights
- Describes external dependencies: Vantage6 (distributed computation), GraphDB instances on nodes, Datawrapper for charting
- Specifies this is a POC hosted on GitHub Pages with periodic data updates via GitHub Actions
- References an external descriptive-statistics algorithm repository used by the integration scripts

##### Main Components
a. GitHub Repository (Source of truth)
b. GitHub Actions
– Workflow A (“update_data.yml”):
- Runs vantage6_integration.py → sends task to Vantage6 server
- Receives JSON results → stored in data/raw/vantage6_result.json
- Runs construct_flashcard.py → generates CSV flashcards in data/flashcards/
- Runs datawrapper.py → pushes updated charts to Datawrapper
– Workflow B (“publish_web.yml”):
- Packages “web/” folder and processed data
- Deploys to GitHub Pages branch
c. External Services
– Vantage6 server + distributed GraphDB nodes (compute and RDF data)
– Datawrapper API (chart hosting and embed)
d. Static Web Frontend
– HTML/CSS/JS in “web/”
– JS modules (e.g. retrieve_positive_count.js) fetch embedded Datawrapper charts or static CSV as needed
– User interacts with modules for chemotherapy, radiotherapy, emotional/physical/role functioning
e. Data Storage
– JSON in “data/raw/” (intermediate)
– CSV in “data/flashcards/” (final artifacts used by frontend)
– plotting_info.json drives chart configuration

##### Architectural Patterns and Principles
- Serverless static-site hosting (GitHub Pages)
- CI/CD pipelines for data ingestion and deployment (GitHub Actions)
- Separation of concerns:
– Data ingestion and processing (scripts + workflows)
– Charting service (Datawrapper)
– Presentation layer (static HTML/CSS/JS)
- Extensibility points: add new modules by dropping HTML/JS/CSS and mapping new CSV or Datawrapper chart IDs

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "GitHub Repository"
        README["README.md"]:::repo
        LICENSE["LICENSE"]:::repo
        MP4["STRONG-AYA-Cancer-Info-Portal-Design.mp4"]:::repo
        PJS["plotting_info.json"]:::repo
    end

    subgraph "GitHub Actions (CI)"
        UD["update_data.yml"]:::ci
        PB["publish_web.yml"]:::ci
    end

    subgraph "Scripts"
        VID["vantage6_integration.py"]:::compute
        CFD["construct_flashcard.py"]:::compute
        DWD["datawrapper.py"]:::compute
        REQ["requirements.txt"]:::compute
    end

    subgraph "Data Store"
        RAW["data/raw/vantage6_result.json"]:::data
        CSV1["ef_flashcard.csv"]:::data
        CSV2["pf_flashcard.csv"]:::data
        CSV3["rf_flashcard.csv"]:::data
        CSV4["ther_chemo_flashcard.csv"]:::data
        CSV5["ther_ht_flashcard.csv"]:::data
        CSV6["ther_rt_flashcard.csv"]:::data
    end

    subgraph "Web Frontend"
        INDEX["index.html"]:::frontend
        MODULES["modules.html"]:::frontend
        CHEMO["chemotherapy.html"]:::frontend
        HORM["hormonetherapy.html"]:::frontend
        RT["radiotherapy.html"]:::frontend
        EMO["emotional_functioning.html"]:::frontend
        PHY["physical_functioning.html"]:::frontend
        ROLE["role_functioning.html"]:::frontend
        CSS1["global.css"]:::frontend
        CSS2["index.css"]:::frontend
        CSS3["module_contents.css"]:::frontend
        CSS4["modules.css"]:::frontend
        CSS5["profiles.css"]:::frontend
        JS1["retrieve_positive_count.js"]:::frontend
        JS2["scroll.js"]:::frontend
        IMG["Datawrapper_assets"]:::frontend
    end

    subgraph "External Services"
        V6["Vantage6 Server & GraphDB Nodes"]:::external
        DW["Datawrapper API"]:::external
    end

    subgraph "Hosting & Browser"
        GHpages["GitHub Pages"]:::external
        Browser["End-user Browser"]:::frontend
    end

    UD -->|"runs"| VID
    VID -->|"HTTPS JSON"| V6
    V6 -->|"JSON"| RAW
    UD -->|"runs"| CFD
    RAW -->|"input JSON"| CFD
    CFD -->|"generates CSV"| CSV1
    CFD -->|"generates CSV"| CSV2
    CFD -->|"generates CSV"| CSV3
    CFD -->|"generates CSV"| CSV4
    CFD -->|"generates CSV"| CSV5
    CFD -->|"generates CSV"| CSV6
    UD -->|"runs"| DWD
    PJS -->|"chart metadata"| DWD
    DWD -->|"updates charts"| DW

    Browser -->|"fetch CSV"| CSV1
    Browser -->|"fetch CSV"| CSV2
    Browser -->|"fetch CSV"| CSV3
    Browser -->|"fetch CSV"| CSV4
    Browser -->|"fetch CSV"| CSV5
    Browser -->|"fetch CSV"| CSV6
    DW -->|"embed charts"| Browser

    PB -->|"deploys web and data"| GHpages
    GHpages -->|"serves static site"| Browser

    REQ -->|"dependencies"| VID
    REQ -->|"dependencies"| CFD
    REQ -->|"dependencies"| DWD

    classDef repo fill:#cce5ff,stroke:#004085
    classDef ci fill:#c6efce,stroke:#336600
    classDef compute fill:#d5f5e3,stroke:#1d8348
    classDef data fill:#fcf8e3,stroke:#8a6d3b
    classDef external fill:#ffe5b4,stroke:#b36b00
    classDef frontend fill:#f2dfff,stroke:#8a2be2

    click UD "https://github.com/strongaya/strong-aya-info-portal/blob/main/.github/workflows/update_data.yml"
    click PB "https://github.com/strongaya/strong-aya-info-portal/blob/main/.github/workflows/publish_web.yml"
    click VID "https://github.com/strongaya/strong-aya-info-portal/blob/main/scripts/vantage6_integration.py"
    click CFD "https://github.com/strongaya/strong-aya-info-portal/blob/main/scripts/construct_flashcard.py"
    click DWD "https://github.com/strongaya/strong-aya-info-portal/blob/main/scripts/datawrapper.py"
    click REQ "https://github.com/strongaya/strong-aya-info-portal/blob/main/scripts/requirements.txt"
    click RAW "https://github.com/strongaya/strong-aya-info-portal/blob/main/data/raw/vantage6_result.json"
    click CSV1 "https://github.com/strongaya/strong-aya-info-portal/blob/main/data/flashcards/ef_flashcard.csv"
    click CSV2 "https://github.com/strongaya/strong-aya-info-portal/blob/main/data/flashcards/pf_flashcard.csv"
    click CSV3 "https://github.com/strongaya/strong-aya-info-portal/blob/main/data/flashcards/rf_flashcard.csv"
    click CSV4 "https://github.com/strongaya/strong-aya-info-portal/blob/main/data/flashcards/ther_chemo_flashcard.csv"
    click CSV5 "https://github.com/strongaya/strong-aya-info-portal/blob/main/data/flashcards/ther_ht_flashcard.csv"
    click CSV6 "https://github.com/strongaya/strong-aya-info-portal/blob/main/data/flashcards/ther_rt_flashcard.csv"
    click PJS "https://github.com/strongaya/strong-aya-info-portal/blob/main/plotting_info.json"
    click INDEX "https://github.com/strongaya/strong-aya-info-portal/blob/main/web/index.html"
    click MODULES "https://github.com/strongaya/strong-aya-info-portal/blob/main/web/modules.html"
    click CHEMO "https://github.com/strongaya/strong-aya-info-portal/blob/main/web/module_a/chemotherapy.html"
    click HORM "https://github.com/strongaya/strong-aya-info-portal/blob/main/web/module_a/hormonetherapy.html"
    click RT "https://github.com/strongaya/strong-aya-info-portal/blob/main/web/module_a/radiotherapy.html"
    click EMO "https://github.com/strongaya/strong-aya-info-portal/blob/main/web/module_b/emotional_functioning.html"
    click PHY "https://github.com/strongaya/strong-aya-info-portal/blob/main/web/module_b/physical_functioning.html"
    click ROLE "https://github.com/strongaya/strong-aya-info-portal/blob/main/web/module_b/role_functioning.html"
    click CSS1 "https://github.com/strongaya/strong-aya-info-portal/blob/main/web/css/global.css"
    click CSS2 "https://github.com/strongaya/strong-aya-info-portal/blob/main/web/css/index.css"
    click CSS3 "https://github.com/strongaya/strong-aya-info-portal/blob/main/web/css/module_contents.css"
    click CSS4 "https://github.com/strongaya/strong-aya-info-portal/blob/main/web/css/modules.css"
    click CSS5 "https://github.com/strongaya/strong-aya-info-portal/blob/main/web/css/profiles.css"
    click JS1 "https://github.com/strongaya/strong-aya-info-portal/blob/main/web/js/retrieve_positive_count.js"
    click JS2 "https://github.com/strongaya/strong-aya-info-portal/blob/main/web/js/scroll.js"
    click IMG "https://github.com/strongaya/strong-aya-info-portal/tree/main/web/images/Datawrapper_assests/"
    click MP4 "https://github.com/strongaya/strong-aya-info-portal/blob/main/STRONG-AYA-Cancer-Info-Portal-Design.mp4"
    click README "https://github.com/strongaya/strong-aya-info-portal/blob/main/README.md"
    click LICENSE "https://github.com/strongaya/strong-aya-info-portal/tree/main/LICENSE"
```
