# thumybanh/solar-events-dashboard architecture

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

- Interactive diagram: https://gitdiagram.com/thumybanh/solar-events-dashboard
- Repository: https://github.com/thumybanh/solar-events-dashboard

## Overview

Solar Events Dashboard collects LMSAL flare records, enriches them with NOAA/GOES matches and solar-image coordinates, then exposes a filterable API and React dashboard for exploration and downloads. The daily scraper resumes from the newest stored event; a separate historical scraper can build the initial catalog. Research scripts compare the catalogs and derive matching-window evidence. Edges follow the excerpts or README; NOAA-download implementation and some analysis modules were not sampled, so their connections rely on documented behavior.

Main entry points: [`data/events.json`](https://github.com/thumybanh/solar-events-dashboard/blob/main/data/events.json) (Event catalog), [`data/noaa_data`](https://github.com/thumybanh/solar-events-dashboard/tree/main/data/noaa_data) (NOAA daily files), [`pipeline/scraper.py`](https://github.com/thumybanh/solar-events-dashboard/blob/main/pipeline/scraper.py) (Archive scraper), [`frontend/src/App.jsx`](https://github.com/thumybanh/solar-events-dashboard/blob/main/frontend/src/App.jsx) (Dashboard UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_collection["Catalog collection"]
  node_scraper["Archive scraper<br/>[scraper.py]"]
  node_daily["Daily resume<br/>[daily_scraper.py]"]
  node_events[("Event catalog<br/>[events.json]")]
end

subgraph group_enrichment["Cross-catalog enrichment"]
  node_downloader["NOAA downloader<br/>[noaa_downloader.py]"]
  node_noaadata["NOAA daily files"]
  node_matcher["NOAA matcher<br/>[noaa_matcher.py]"]
  node_coordinates["Pixel coordinates<br/>[coordinates.py]"]
end

subgraph group_service["API and dashboard"]
  node_api["Events API<br/>[api.py]"]
  node_frontend["Dashboard UI<br/>[App.jsx]"]
end

subgraph group_research["Catalog research"]
  node_compare["Field comparison<br/>[compare_events.py]"]
  node_crosscheck["Class cross-check<br/>[cross_check.py]"]
  node_timing["Timing analysis<br/>[timing_analysis.py]"]
  node_window["Window optimization"]
  node_significance["Window significance"]
  node_tolerance["Match tolerance sweep"]
end

node_visitor(("Dashboard user"))
node_lmsal["LMSAL archive"]
node_noaaftp["NOAA FTP"]
node_helioviewer["Helioviewer"]

node_daily -->|"calls scraper"| node_scraper
node_scraper -->|"scrapes archive"| node_lmsal
node_scraper -->|"updates catalog"| node_events
node_api -->|"starts refresh"| node_daily
node_api -->|"reads catalog"| node_events
node_downloader -->|"downloads reports"| node_noaaftp
node_downloader -->|"saves reports"| node_noaadata
node_matcher -->|"parses reports"| node_noaadata
node_matcher -->|"assigns flags"| node_events
node_coordinates -->|"uses position parser"| node_matcher
node_coordinates -->|"writes coordinates"| node_events
node_visitor -->|"explores events"| node_frontend
node_frontend -->|"requests filters"| node_api
node_frontend -.->|"requests imagery"| node_helioviewer
node_compare -->|"reads catalog"| node_events
node_compare -->|"compares reports"| node_noaadata
node_crosscheck -->|"reads catalog"| node_events
node_crosscheck -->|"checks reports"| node_noaadata
node_timing -->|"analyzes catalog"| node_events
node_timing -->|"pairs reports"| node_noaadata
node_window -->|"analyzes catalog"| node_events
node_window -->|"models matches"| node_noaadata
node_significance -->|"tests window"| node_window
node_tolerance -->|"sweeps matches"| node_events
node_tolerance -->|"sweeps reports"| node_noaadata

click node_scraper "https://github.com/thumybanh/solar-events-dashboard/blob/main/pipeline/scraper.py"
click node_daily "https://github.com/thumybanh/solar-events-dashboard/blob/main/pipeline/daily_scraper.py"
click node_events "https://github.com/thumybanh/solar-events-dashboard/blob/main/data/events.json"
click node_downloader "https://github.com/thumybanh/solar-events-dashboard/blob/main/pipeline/noaa_downloader.py"
click node_noaadata "https://github.com/thumybanh/solar-events-dashboard/tree/main/data/noaa_data"
click node_matcher "https://github.com/thumybanh/solar-events-dashboard/blob/main/pipeline/noaa_matcher.py"
click node_coordinates "https://github.com/thumybanh/solar-events-dashboard/blob/main/pipeline/coordinates.py"
click node_api "https://github.com/thumybanh/solar-events-dashboard/blob/main/api.py"
click node_frontend "https://github.com/thumybanh/solar-events-dashboard/blob/main/frontend/src/App.jsx"
click node_compare "https://github.com/thumybanh/solar-events-dashboard/blob/main/analysis/compare_events.py"
click node_crosscheck "https://github.com/thumybanh/solar-events-dashboard/blob/main/analysis/cross_check.py"
click node_timing "https://github.com/thumybanh/solar-events-dashboard/blob/main/analysis/timing_analysis.py"
click node_window "https://github.com/thumybanh/solar-events-dashboard/blob/main/analysis/window_optimization.py"
click node_significance "https://github.com/thumybanh/solar-events-dashboard/blob/main/analysis/window_significance.py"
click node_tolerance "https://github.com/thumybanh/solar-events-dashboard/blob/main/analysis/flare_match_tolerance_sweep.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_scraper,node_daily,node_events,node_visitor,node_helioviewer toneBlue
class node_downloader,node_noaadata,node_matcher,node_coordinates toneAmber
class node_api,node_frontend toneMint
class node_compare,node_crosscheck,node_timing,node_window,node_significance,node_tolerance toneRose
class node_lmsal,node_noaaftp toneIndigo
```

## Components

### Catalog collection

- [Archive scraper](https://github.com/thumybanh/solar-events-dashboard/blob/main/pipeline/scraper.py): `pipeline/scraper.py`
- [Daily resume](https://github.com/thumybanh/solar-events-dashboard/blob/main/pipeline/daily_scraper.py): `pipeline/daily_scraper.py`
- [Event catalog](https://github.com/thumybanh/solar-events-dashboard/blob/main/data/events.json): `data/events.json`

### Cross-catalog enrichment

- [NOAA downloader](https://github.com/thumybanh/solar-events-dashboard/blob/main/pipeline/noaa_downloader.py): `pipeline/noaa_downloader.py`
- [NOAA daily files](https://github.com/thumybanh/solar-events-dashboard/tree/main/data/noaa_data): `data/noaa_data`
- [NOAA matcher](https://github.com/thumybanh/solar-events-dashboard/blob/main/pipeline/noaa_matcher.py): `pipeline/noaa_matcher.py`
- [Pixel coordinates](https://github.com/thumybanh/solar-events-dashboard/blob/main/pipeline/coordinates.py): `pipeline/coordinates.py`

### API and dashboard

- [Events API](https://github.com/thumybanh/solar-events-dashboard/blob/main/api.py): `api.py`
- [Dashboard UI](https://github.com/thumybanh/solar-events-dashboard/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`

### Catalog research

- [Field comparison](https://github.com/thumybanh/solar-events-dashboard/blob/main/analysis/compare_events.py): `analysis/compare_events.py`
- [Class cross-check](https://github.com/thumybanh/solar-events-dashboard/blob/main/analysis/cross_check.py): `analysis/cross_check.py`
- [Timing analysis](https://github.com/thumybanh/solar-events-dashboard/blob/main/analysis/timing_analysis.py): `analysis/timing_analysis.py`
- [Window optimization](https://github.com/thumybanh/solar-events-dashboard/blob/main/analysis/window_optimization.py): `analysis/window_optimization.py`
- [Window significance](https://github.com/thumybanh/solar-events-dashboard/blob/main/analysis/window_significance.py): `analysis/window_significance.py`
- [Match tolerance sweep](https://github.com/thumybanh/solar-events-dashboard/blob/main/analysis/flare_match_tolerance_sweep.py): `analysis/flare_match_tolerance_sweep.py`

### Other components

- **Dashboard user**
- **LMSAL archive**
- **NOAA FTP**
- **Helioviewer**

## Connections

- Daily resume → Archive scraper: calls scraper (evidence: `pipeline/daily_scraper.py`)
- Archive scraper → LMSAL archive: scrapes archive (evidence: `pipeline/scraper.py`)
- Archive scraper → Event catalog: updates catalog (evidence: `README.md`)
- Events API → Daily resume: starts refresh (evidence: `api.py`)
- Events API → Event catalog: reads catalog (evidence: `README.md`)
- NOAA downloader → NOAA FTP: downloads reports (evidence: `README.md`)
- NOAA downloader → NOAA daily files: saves reports (evidence: `README.md`)
- NOAA matcher → NOAA daily files: parses reports (evidence: `README.md`)
- NOAA matcher → Event catalog: assigns flags (evidence: `README.md`)
- Pixel coordinates → NOAA matcher: uses position parser (evidence: `pipeline/coordinates.py`)
- Pixel coordinates → Event catalog: writes coordinates (evidence: `README.md`)
- Dashboard user → Dashboard UI: explores events (evidence: `README.md`)
- Dashboard UI → Events API: requests filters (evidence: `frontend/src/App.jsx`)
- Dashboard UI → Helioviewer: requests imagery
- Field comparison → Event catalog: reads catalog (evidence: `README.md`)
- Field comparison → NOAA daily files: compares reports (evidence: `README.md`)
- Class cross-check → Event catalog: reads catalog (evidence: `README.md`)
- Class cross-check → NOAA daily files: checks reports (evidence: `README.md`)
- Timing analysis → Event catalog: analyzes catalog (evidence: `README.md`)
- Timing analysis → NOAA daily files: pairs reports (evidence: `README.md`)
- Window optimization → Event catalog: analyzes catalog (evidence: `README.md`)
- Window optimization → NOAA daily files: models matches (evidence: `README.md`)
- Window significance → Window optimization: tests window (evidence: `analysis/window_significance.py`)
- Match tolerance sweep → Event catalog: sweeps matches (evidence: `README.md`)
- Match tolerance sweep → NOAA daily files: sweeps reports (evidence: `README.md`)
