# alexjustesen/speedtest-tracker architecture

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

- Interactive diagram: https://gitdiagram.com/alexjustesen/speedtest-tracker
- Repository: https://github.com/alexjustesen/speedtest-tracker

## Overview

Speedtest Tracker monitors internet performance through scheduled and user-triggered Ookla tests, stores result history, and presents dashboards, APIs, and alerts. The graph includes documented metric export and major README capabilities; unsampled scheduling, event-driven notification, and dashboard internals are represented at their supported directory paths, with unverified connections dashed. Source excerpts and the SOURCE INDEX support only a subset of internal call relationships.

Main entry points: [`app/Jobs/Ookla`](https://github.com/alexjustesen/speedtest-tracker/tree/1.x/app/Jobs/Ookla) (Test job workflow), [`app/Models/Result.php`](https://github.com/alexjustesen/speedtest-tracker/blob/1.x/app/Models/Result.php) (Result model), [`app/Http/Controllers/Api/V1/ResultsController.php`](https://github.com/alexjustesen/speedtest-tracker/blob/1.x/app/Http/Controllers/Api/V1/ResultsController.php) (Results API), [`app/Livewire/Topbar/Actions.php`](https://github.com/alexjustesen/speedtest-tracker/blob/1.x/app/Livewire/Topbar/Actions.php) (Quick actions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_testing["Speedtest execution"]
  node_schedule["Scheduled tests"]
  node_speedtest_jobs["Test job workflow"]
  node_run_test["Run speedtest<br/>[RunSpeedtest.php]"]
  node_server_lookup["Server lookup"]
  node_test_states["Test events"]
end

subgraph group_results["Results and reporting"]
  node_result_model[("Result model<br/>[Result.php]")]
  node_result_attributes["Result attributes"]
  node_dashboard["Dashboard<br/>[Dashboard.php]"]
  node_dashboard_widgets["Trend charts"]
  node_api_routes["API routes<br/>[routes.php]"]
  node_results_api["Results API"]
  node_api_base["API response tools<br/>[ApiController.php]"]
  node_result_resource["Result serialization<br/>[ResultResource.php]"]
end

subgraph group_admin["Administration"]
  node_web_routes["Web interface<br/>[web.php]"]
  node_topbar_actions["Quick actions<br/>[Actions.php]"]
  node_admin_settings["Admin settings"]
end

subgraph group_integrations["Integrations and alerts"]
  node_metrics_api["Metrics endpoint"]
  node_prometheus["Prometheus metrics"]
  node_data_settings["Integration settings"]
  node_influx["InfluxDB export"]
  node_notification_settings["Notification settings"]
  node_notification_events["Notification processing"]
  node_notification_channels["Notification channels"]
end

node_user(("User"))
node_ookla{{"Ookla service"}}
node_notification_services{{"Notification services"}}

node_user -->|"starts test"| node_topbar_actions
node_topbar_actions -->|"loads servers"| node_server_lookup
node_topbar_actions -->|"dispatches test"| node_run_test
node_run_test -.->|"initiates workflow"| node_speedtest_jobs
node_speedtest_jobs -.->|"runs tests"| node_ookla
node_schedule -.->|"schedules runs"| node_speedtest_jobs
node_speedtest_jobs -.->|"records results"| node_result_model
node_speedtest_jobs -.->|"emits events"| node_test_states
node_test_states -.->|"triggers processing"| node_notification_events
node_notification_events -.->|"sends alerts"| node_notification_channels
node_notification_channels -.->|"delivers notifications"| node_notification_services
node_admin_settings -.->|"configures alerts"| node_notification_settings
node_user -->|"requests data"| node_api_routes
node_api_routes -->|"routes results"| node_results_api
node_results_api -->|"queries results"| node_result_model
node_results_api -->|"serializes results"| node_result_resource
node_results_api -->|"uses response tools"| node_api_base
node_user -.->|"opens interface"| node_web_routes
node_dashboard -.->|"reads history"| node_result_model
node_dashboard_widgets -.->|"plots trends"| node_result_model
node_metrics_api -->|"generates metrics"| node_prometheus
node_metrics_api -->|"checks enablement"| node_data_settings
node_prometheus -->|"reads latest result"| node_result_model
node_prometheus -->|"uses settings"| node_data_settings
node_speedtest_jobs -.->|"exports results"| node_influx
node_web_routes -.->|"serves dashboard"| node_dashboard

click node_schedule "https://github.com/alexjustesen/speedtest-tracker/blob/1.x/app/Services/ScheduledSpeedtestService.php"
click node_speedtest_jobs "https://github.com/alexjustesen/speedtest-tracker/tree/1.x/app/Jobs/Ookla"
click node_run_test "https://github.com/alexjustesen/speedtest-tracker/blob/1.x/app/Actions/Ookla/RunSpeedtest.php"
click node_server_lookup "https://github.com/alexjustesen/speedtest-tracker/blob/1.x/app/Actions/GetOoklaSpeedtestServers.php"
click node_test_states "https://github.com/alexjustesen/speedtest-tracker/tree/1.x/app/Events"
click node_result_model "https://github.com/alexjustesen/speedtest-tracker/blob/1.x/app/Models/Result.php"
click node_result_attributes "https://github.com/alexjustesen/speedtest-tracker/blob/1.x/app/Models/Traits/ResultDataAttributes.php"
click node_dashboard "https://github.com/alexjustesen/speedtest-tracker/blob/1.x/app/Filament/Pages/Dashboard.php"
click node_dashboard_widgets "https://github.com/alexjustesen/speedtest-tracker/tree/1.x/app/Filament/Widgets"
click node_web_routes "https://github.com/alexjustesen/speedtest-tracker/blob/1.x/routes/web.php"
click node_topbar_actions "https://github.com/alexjustesen/speedtest-tracker/blob/1.x/app/Livewire/Topbar/Actions.php"
click node_api_routes "https://github.com/alexjustesen/speedtest-tracker/blob/1.x/routes/api/v1/routes.php"
click node_results_api "https://github.com/alexjustesen/speedtest-tracker/blob/1.x/app/Http/Controllers/Api/V1/ResultsController.php"
click node_api_base "https://github.com/alexjustesen/speedtest-tracker/blob/1.x/app/Http/Controllers/Api/V1/ApiController.php"
click node_result_resource "https://github.com/alexjustesen/speedtest-tracker/blob/1.x/app/Http/Resources/V1/ResultResource.php"
click node_metrics_api "https://github.com/alexjustesen/speedtest-tracker/blob/1.x/app/Http/Controllers/MetricsController.php"
click node_prometheus "https://github.com/alexjustesen/speedtest-tracker/blob/1.x/app/Services/PrometheusMetricsService.php"
click node_data_settings "https://github.com/alexjustesen/speedtest-tracker/blob/1.x/app/Settings/DataIntegrationSettings.php"
click node_influx "https://github.com/alexjustesen/speedtest-tracker/tree/1.x/app/Jobs/Influxdb/v2"
click node_notification_settings "https://github.com/alexjustesen/speedtest-tracker/blob/1.x/app/Settings/NotificationSettings.php"
click node_notification_events "https://github.com/alexjustesen/speedtest-tracker/tree/1.x/app/Listeners"
click node_notification_channels "https://github.com/alexjustesen/speedtest-tracker/tree/1.x/app/Notifications"
click node_admin_settings "https://github.com/alexjustesen/speedtest-tracker/tree/1.x/app/Filament/Pages/Settings"

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_schedule,node_speedtest_jobs,node_run_test,node_server_lookup,node_test_states,node_user toneBlue
class node_result_model,node_result_attributes,node_dashboard,node_dashboard_widgets,node_api_routes,node_results_api,node_api_base,node_result_resource toneAmber
class node_web_routes,node_topbar_actions,node_admin_settings toneMint
class node_metrics_api,node_prometheus,node_data_settings,node_influx,node_notification_settings,node_notification_events,node_notification_channels toneRose
class node_ookla,node_notification_services toneIndigo
```

## Components

### Speedtest execution

- [Scheduled tests](https://github.com/alexjustesen/speedtest-tracker/blob/1.x/app/Services/ScheduledSpeedtestService.php): `app/Services/ScheduledSpeedtestService.php`
- [Test job workflow](https://github.com/alexjustesen/speedtest-tracker/tree/1.x/app/Jobs/Ookla): `app/Jobs/Ookla`
- [Run speedtest](https://github.com/alexjustesen/speedtest-tracker/blob/1.x/app/Actions/Ookla/RunSpeedtest.php): `app/Actions/Ookla/RunSpeedtest.php`
- [Server lookup](https://github.com/alexjustesen/speedtest-tracker/blob/1.x/app/Actions/GetOoklaSpeedtestServers.php): `app/Actions/GetOoklaSpeedtestServers.php`
- [Test events](https://github.com/alexjustesen/speedtest-tracker/tree/1.x/app/Events): `app/Events`

### Results and reporting

- [Result model](https://github.com/alexjustesen/speedtest-tracker/blob/1.x/app/Models/Result.php): `app/Models/Result.php`
- [Result attributes](https://github.com/alexjustesen/speedtest-tracker/blob/1.x/app/Models/Traits/ResultDataAttributes.php): `app/Models/Traits/ResultDataAttributes.php`
- [Dashboard](https://github.com/alexjustesen/speedtest-tracker/blob/1.x/app/Filament/Pages/Dashboard.php): `app/Filament/Pages/Dashboard.php`
- [Trend charts](https://github.com/alexjustesen/speedtest-tracker/tree/1.x/app/Filament/Widgets): `app/Filament/Widgets`
- [API routes](https://github.com/alexjustesen/speedtest-tracker/blob/1.x/routes/api/v1/routes.php): `routes/api/v1/routes.php`
- [Results API](https://github.com/alexjustesen/speedtest-tracker/blob/1.x/app/Http/Controllers/Api/V1/ResultsController.php): `app/Http/Controllers/Api/V1/ResultsController.php`
- [API response tools](https://github.com/alexjustesen/speedtest-tracker/blob/1.x/app/Http/Controllers/Api/V1/ApiController.php): `app/Http/Controllers/Api/V1/ApiController.php`
- [Result serialization](https://github.com/alexjustesen/speedtest-tracker/blob/1.x/app/Http/Resources/V1/ResultResource.php): `app/Http/Resources/V1/ResultResource.php`

### Administration

- [Web interface](https://github.com/alexjustesen/speedtest-tracker/blob/1.x/routes/web.php): `routes/web.php`
- [Quick actions](https://github.com/alexjustesen/speedtest-tracker/blob/1.x/app/Livewire/Topbar/Actions.php): `app/Livewire/Topbar/Actions.php`
- [Admin settings](https://github.com/alexjustesen/speedtest-tracker/tree/1.x/app/Filament/Pages/Settings): `app/Filament/Pages/Settings`

### Integrations and alerts

- [Metrics endpoint](https://github.com/alexjustesen/speedtest-tracker/blob/1.x/app/Http/Controllers/MetricsController.php): `app/Http/Controllers/MetricsController.php`
- [Prometheus metrics](https://github.com/alexjustesen/speedtest-tracker/blob/1.x/app/Services/PrometheusMetricsService.php): `app/Services/PrometheusMetricsService.php`
- [Integration settings](https://github.com/alexjustesen/speedtest-tracker/blob/1.x/app/Settings/DataIntegrationSettings.php): `app/Settings/DataIntegrationSettings.php`
- [InfluxDB export](https://github.com/alexjustesen/speedtest-tracker/tree/1.x/app/Jobs/Influxdb/v2): `app/Jobs/Influxdb/v2`
- [Notification settings](https://github.com/alexjustesen/speedtest-tracker/blob/1.x/app/Settings/NotificationSettings.php): `app/Settings/NotificationSettings.php`
- [Notification processing](https://github.com/alexjustesen/speedtest-tracker/tree/1.x/app/Listeners): `app/Listeners`
- [Notification channels](https://github.com/alexjustesen/speedtest-tracker/tree/1.x/app/Notifications): `app/Notifications`

### Other components

- **User**
- **Ookla service**
- **Notification services**

## Connections

- User → Quick actions: starts test (evidence: `app/Livewire/Topbar/Actions.php`)
- Quick actions → Server lookup: loads servers (evidence: `app/Livewire/Topbar/Actions.php`)
- Quick actions → Run speedtest: dispatches test (evidence: `app/Livewire/Topbar/Actions.php`)
- Run speedtest → Test job workflow: initiates workflow
- Test job workflow → Ookla service: runs tests
- Scheduled tests → Test job workflow: schedules runs
- Test job workflow → Result model: records results
- Test job workflow → Test events: emits events
- Test events → Notification processing: triggers processing
- Notification processing → Notification channels: sends alerts
- Notification channels → Notification services: delivers notifications
- Admin settings → Notification settings: configures alerts (evidence: `app/Filament/Pages/Settings/Notification.php`)
- User → API routes: requests data (evidence: `routes/api/v1/routes.php`)
- API routes → Results API: routes results (evidence: `routes/api/v1/routes.php`)
- Results API → Result model: queries results (evidence: `app/Http/Controllers/Api/V1/ResultsController.php`)
- Results API → Result serialization: serializes results (evidence: `app/Http/Controllers/Api/V1/ResultsController.php`)
- Results API → API response tools: uses response tools (evidence: `app/Http/Controllers/Api/V1/ResultsController.php`)
- User → Web interface: opens interface
- Dashboard → Result model: reads history
- Trend charts → Result model: plots trends
- Metrics endpoint → Prometheus metrics: generates metrics (evidence: `app/Http/Controllers/MetricsController.php`)
- Metrics endpoint → Integration settings: checks enablement (evidence: `app/Http/Controllers/MetricsController.php`)
- Prometheus metrics → Result model: reads latest result (evidence: `app/Services/PrometheusMetricsService.php`)
- Prometheus metrics → Integration settings: uses settings (evidence: `app/Services/PrometheusMetricsService.php`)
- Test job workflow → InfluxDB export: exports results
- Web interface → Dashboard: serves dashboard
