# qa-onrex/qa-automation architecture

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

- Interactive diagram: https://gitdiagram.com/qa-onrex/qa-automation
- Repository: https://github.com/qa-onrex/qa-automation

## Overview

This repository collects automated-test reports and presents their results in a web dashboard. The intended workflow runs from emailed ZIP attachments through encrypted storage, HTML extraction and parsing, then result aggregation for dashboard and timeline views. Monthly archives and retention cleanup support the data lifecycle. The Python ingestion and aggregation paths are partly evidenced by excerpts; frontend wiring and several script handoffs are not shown, so those links are marked unverified or omitted.

Main entry points: [`data/results.json`](https://github.com/qa-onrex/qa-automation/blob/main/data/results.json) (Test result records), [`docs/dashboard_data.json`](https://github.com/qa-onrex/qa-automation/blob/main/docs/dashboard_data.json) (Dashboard dataset), [`scripts/extract_html.py`](https://github.com/qa-onrex/qa-automation/blob/main/scripts/extract_html.py) (Extract report HTML), [`scripts/parse_html.py`](https://github.com/qa-onrex/qa-automation/blob/main/scripts/parse_html.py) (Parse report results)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Report ingestion"]
  node_fetch["Fetch attachments<br/>[fetch_emails.py]"]
  node_crypto["Encrypt and decrypt<br/>[encryptor.py]"]
  node_attachments[("Encrypted ZIPs")]
end

subgraph group_processing["Report processing"]
  node_extract["Extract report HTML<br/>[extract_html.py]"]
  node_html[("Stored HTML reports")]
  node_upload["Publish reports<br/>[upload_html.py]"]
  node_parse["Parse report results<br/>[parse_html.py]"]
end

subgraph group_data["Results lifecycle"]
  node_results[("Test result records<br/>[results.json]")]
  node_dashboardgen["Build dashboard data"]
  node_dashboarddata[("Dashboard dataset")]
  node_timelinegen["Build timeline data"]
  node_timelinedata[("Timeline dataset<br/>[timeline_data.json]")]
  node_archive["Monthly archiving<br/>[archive_manager.py]"]
  node_archives[("Archived datasets")]
  node_cleanup["Retention cleanup<br/>[cleanup_data.py]"]
end

subgraph group_presentation["Dashboard"]
  node_web["Dashboard interface<br/>[index.html]"]
  node_dashboardjs["Dashboard views<br/>[dashboard.js]"]
  node_timelinejs["Timeline views<br/>[timeline.js]"]
  node_archivejs["Archive browsing<br/>[archive.js]"]
end

node_mail(("Report mailbox"))
node_netlify["Netlify hosting"]
node_user(("Dashboard user"))

node_mail -->|"provides reports"| node_fetch
node_fetch -->|"encrypts attachments"| node_crypto
node_fetch -->|"stores ZIPs"| node_attachments
node_extract -->|"decrypts and encrypts"| node_crypto
node_extract -->|"reads ZIPs"| node_attachments
node_extract -->|"writes reports"| node_html
node_upload -.->|"reads reports"| node_html
node_upload -->|"deploys files"| node_netlify
node_parse -->|"decrypts reports"| node_crypto
node_parse -.->|"reads reports"| node_html
node_parse -->|"writes records"| node_results
node_dashboardgen -->|"reads records"| node_results
node_dashboardgen -.->|"writes dataset"| node_dashboarddata
node_timelinegen -->|"reads records"| node_results
node_timelinegen -.->|"reads dataset"| node_dashboarddata
node_timelinegen -.->|"writes dataset"| node_timelinedata
node_archive -->|"archives monthly data"| node_dashboarddata
node_archive -->|"writes archives"| node_archives
node_cleanup -->|"prunes records"| node_results
node_web -.->|"loads views"| node_dashboardjs
node_dashboardjs -.->|"reads dataset"| node_dashboarddata
node_timelinejs -.->|"reads dataset"| node_timelinedata
node_archivejs -.->|"browses archives"| node_archives
node_user -.->|"views dashboard"| node_web

click node_fetch "https://github.com/qa-onrex/qa-automation/blob/main/scripts/fetch_emails.py"
click node_crypto "https://github.com/qa-onrex/qa-automation/blob/main/scripts/encryptor.py"
click node_extract "https://github.com/qa-onrex/qa-automation/blob/main/scripts/extract_html.py"
click node_html "https://github.com/qa-onrex/qa-automation/tree/main/data/html"
click node_upload "https://github.com/qa-onrex/qa-automation/blob/main/scripts/upload_html.py"
click node_parse "https://github.com/qa-onrex/qa-automation/blob/main/scripts/parse_html.py"
click node_results "https://github.com/qa-onrex/qa-automation/blob/main/data/results.json"
click node_dashboardgen "https://github.com/qa-onrex/qa-automation/blob/main/scripts/generate_dashboard.py"
click node_dashboarddata "https://github.com/qa-onrex/qa-automation/blob/main/docs/dashboard_data.json"
click node_timelinegen "https://github.com/qa-onrex/qa-automation/blob/main/scripts/generate_timeline.py"
click node_timelinedata "https://github.com/qa-onrex/qa-automation/blob/main/docs/timeline_data.json"
click node_archive "https://github.com/qa-onrex/qa-automation/blob/main/scripts/archive_manager.py"
click node_archives "https://github.com/qa-onrex/qa-automation/tree/main/docs/archive"
click node_cleanup "https://github.com/qa-onrex/qa-automation/blob/main/scripts/cleanup_data.py"
click node_web "https://github.com/qa-onrex/qa-automation/blob/main/docs/index.html"
click node_dashboardjs "https://github.com/qa-onrex/qa-automation/blob/main/docs/scripts/dashboard.js"
click node_timelinejs "https://github.com/qa-onrex/qa-automation/blob/main/docs/scripts/timeline.js"
click node_archivejs "https://github.com/qa-onrex/qa-automation/blob/main/docs/scripts/archive.js"

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_fetch,node_crypto,node_attachments,node_user toneBlue
class node_extract,node_html,node_upload,node_parse toneAmber
class node_results,node_dashboardgen,node_dashboarddata,node_timelinegen,node_timelinedata,node_archive,node_archives,node_cleanup toneMint
class node_web,node_dashboardjs,node_timelinejs,node_archivejs toneRose
class node_mail,node_netlify toneIndigo
```

## Components

### Report ingestion

- [Fetch attachments](https://github.com/qa-onrex/qa-automation/blob/main/scripts/fetch_emails.py): `scripts/fetch_emails.py`
- [Encrypt and decrypt](https://github.com/qa-onrex/qa-automation/blob/main/scripts/encryptor.py): `scripts/encryptor.py`
- **Encrypted ZIPs**

### Report processing

- [Extract report HTML](https://github.com/qa-onrex/qa-automation/blob/main/scripts/extract_html.py): `scripts/extract_html.py`
- [Stored HTML reports](https://github.com/qa-onrex/qa-automation/tree/main/data/html): `data/html`
- [Publish reports](https://github.com/qa-onrex/qa-automation/blob/main/scripts/upload_html.py): `scripts/upload_html.py`
- [Parse report results](https://github.com/qa-onrex/qa-automation/blob/main/scripts/parse_html.py): `scripts/parse_html.py`

### Results lifecycle

- [Test result records](https://github.com/qa-onrex/qa-automation/blob/main/data/results.json): `data/results.json`
- [Build dashboard data](https://github.com/qa-onrex/qa-automation/blob/main/scripts/generate_dashboard.py): `scripts/generate_dashboard.py`
- [Dashboard dataset](https://github.com/qa-onrex/qa-automation/blob/main/docs/dashboard_data.json): `docs/dashboard_data.json`
- [Build timeline data](https://github.com/qa-onrex/qa-automation/blob/main/scripts/generate_timeline.py): `scripts/generate_timeline.py`
- [Timeline dataset](https://github.com/qa-onrex/qa-automation/blob/main/docs/timeline_data.json): `docs/timeline_data.json`
- [Monthly archiving](https://github.com/qa-onrex/qa-automation/blob/main/scripts/archive_manager.py): `scripts/archive_manager.py`
- [Archived datasets](https://github.com/qa-onrex/qa-automation/tree/main/docs/archive): `docs/archive`
- [Retention cleanup](https://github.com/qa-onrex/qa-automation/blob/main/scripts/cleanup_data.py): `scripts/cleanup_data.py`

### Dashboard

- [Dashboard interface](https://github.com/qa-onrex/qa-automation/blob/main/docs/index.html): `docs/index.html`
- [Dashboard views](https://github.com/qa-onrex/qa-automation/blob/main/docs/scripts/dashboard.js): `docs/scripts/dashboard.js`
- [Timeline views](https://github.com/qa-onrex/qa-automation/blob/main/docs/scripts/timeline.js): `docs/scripts/timeline.js`
- [Archive browsing](https://github.com/qa-onrex/qa-automation/blob/main/docs/scripts/archive.js): `docs/scripts/archive.js`

### Other components

- **Report mailbox**
- **Netlify hosting**
- **Dashboard user**

## Connections

- Report mailbox → Fetch attachments: provides reports (evidence: `scripts/fetch_emails.py`)
- Fetch attachments → Encrypt and decrypt: encrypts attachments (evidence: `scripts/fetch_emails.py`)
- Fetch attachments → Encrypted ZIPs: stores ZIPs (evidence: `scripts/fetch_emails.py`)
- Extract report HTML → Encrypt and decrypt: decrypts and encrypts (evidence: `scripts/extract_html.py`)
- Extract report HTML → Encrypted ZIPs: reads ZIPs (evidence: `scripts/extract_html.py`)
- Extract report HTML → Stored HTML reports: writes reports (evidence: `scripts/extract_html.py`)
- Publish reports → Stored HTML reports: reads reports
- Publish reports → Netlify hosting: deploys files (evidence: `scripts/upload_html.py`)
- Parse report results → Encrypt and decrypt: decrypts reports (evidence: `scripts/parse_html.py`)
- Parse report results → Stored HTML reports: reads reports
- Parse report results → Test result records: writes records (evidence: `scripts/parse_html.py`)
- Build dashboard data → Test result records: reads records (evidence: `scripts/generate_dashboard.py`)
- Build dashboard data → Dashboard dataset: writes dataset
- Build timeline data → Test result records: reads records (evidence: `scripts/generate_timeline.py`)
- Build timeline data → Dashboard dataset: reads dataset
- Build timeline data → Timeline dataset: writes dataset
- Monthly archiving → Dashboard dataset: archives monthly data (evidence: `scripts/archive_manager.py`)
- Monthly archiving → Archived datasets: writes archives (evidence: `scripts/archive_manager.py`)
- Retention cleanup → Test result records: prunes records (evidence: `scripts/cleanup_data.py`)
- Dashboard interface → Dashboard views: loads views
- Dashboard views → Dashboard dataset: reads dataset
- Timeline views → Timeline dataset: reads dataset
- Archive browsing → Archived datasets: browses archives
- Dashboard user → Dashboard interface: views dashboard
