# openspeedtest/speed-test architecture

> Architecture diagram of the GitHub repository openspeedtest/speed-test, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/openspeedtest/speed-test
- Repository: https://github.com/openspeedtest/speed-test

## Overview

OpenSpeedTest is a static-browser network bandwidth estimator. The principal workflow is to open the test page, start a test manually or through documented URL parameters, and have its JavaScript use XHR against the hosted download and upload paths. The README also documents continuous stress testing and responsive SVG UI. Source excerpts were unavailable, so links reflect only those documented behaviors; the exact transfer orchestration and result-rendering details are not inferred.

Main entry points: [`index.html`](https://github.com/openspeedtest/speed-test/blob/main/index.html) (Test page), [`assets/js/app-2.5.4.js`](https://github.com/openspeedtest/speed-test/blob/main/assets/js/app-2.5.4.js) (Speed test engine), [`hosted.html`](https://github.com/openspeedtest/speed-test/blob/main/hosted.html) (Hosted page), [`assets/js/darkmode.js`](https://github.com/openspeedtest/speed-test/blob/main/assets/js/darkmode.js) (Dark mode)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Test interface"]
  node_page["Test page<br/>[index.html]"]
  node_hosted["Hosted page<br/>[hosted.html]"]
  node_darkmode["Dark mode<br/>[darkmode.js]"]
end

subgraph group_measurement["Measurement runtime"]
  node_engine["Speed test engine<br/>[app-2.5.4.js]"]
end

subgraph group_transfer["Transfer endpoints"]
  node_downloads["Download payloads"]
  node_upload["Upload endpoint"]
end

node_user(("Browser user"))
node_webserver["Static web server"]

node_user -->|"opens"| node_page
node_webserver -->|"serves"| node_page
node_webserver -->|"serves"| node_hosted
node_page -->|"loads"| node_engine
node_page -->|"loads"| node_darkmode
node_engine -->|"XHR download"| node_downloads
node_engine -->|"XHR upload"| node_upload

click node_page "https://github.com/openspeedtest/speed-test/blob/main/index.html"
click node_hosted "https://github.com/openspeedtest/speed-test/blob/main/hosted.html"
click node_darkmode "https://github.com/openspeedtest/speed-test/blob/main/assets/js/darkmode.js"
click node_engine "https://github.com/openspeedtest/speed-test/blob/main/assets/js/app-2.5.4.js"
click node_downloads "https://github.com/openspeedtest/speed-test/blob/main/downloading"
click node_upload "https://github.com/openspeedtest/speed-test/blob/main/upload"

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_page,node_hosted,node_darkmode,node_user toneBlue
class node_engine toneAmber
class node_downloads,node_upload,node_webserver toneMint
```

## Components

### Test interface

- [Test page](https://github.com/openspeedtest/speed-test/blob/main/index.html): `index.html`
- [Hosted page](https://github.com/openspeedtest/speed-test/blob/main/hosted.html): `hosted.html`
- [Dark mode](https://github.com/openspeedtest/speed-test/blob/main/assets/js/darkmode.js): `assets/js/darkmode.js`

### Measurement runtime

- [Speed test engine](https://github.com/openspeedtest/speed-test/blob/main/assets/js/app-2.5.4.js): `assets/js/app-2.5.4.js`

### Transfer endpoints

- [Download payloads](https://github.com/openspeedtest/speed-test/blob/main/downloading): `downloading`
- [Upload endpoint](https://github.com/openspeedtest/speed-test/blob/main/upload): `upload`

### Other components

- **Browser user**
- **Static web server**

## Connections

- Browser user → Test page: opens
- Static web server → Test page: serves
- Static web server → Hosted page: serves
- Test page → Speed test engine: loads
- Test page → Dark mode: loads
- Speed test engine → Download payloads: XHR download
- Speed test engine → Upload endpoint: XHR upload
