# ardzeyftw/pldt-h153-381-modem-wan-traffic-throttling-analytics-system architecture

> Architecture diagram of the GitHub repository ardzeyftw/pldt-h153-381-modem-wan-traffic-throttling-analytics-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ardzeyftw/pldt-h153-381-modem-wan-traffic-throttling-analytics-system
- Repository: https://github.com/ardzeyftw/pldt-h153-381-modem-wan-traffic-throttling-analytics-system

## Overview

This is a modem-based WAN traffic and ISP-throttling evidence platform. Its main workflow polls the Huawei modem for traffic and signal data, accounts for usage, periodically runs active CDN speed probes with verification, persists evidence, and serves dashboard history and CSV exports. The browser dashboard presents live status, charts, probe history, and controls. Backend details are sampled only in part; README-documented capabilities are included where their exact implementation is not visible.

Main entry points: [`app.js`](https://github.com/ardzeyftw/pldt-h153-381-modem-wan-traffic-throttling-analytics-system/blob/main/app.js) (Dashboard client), [`snmp_poller.py`](https://github.com/ardzeyftw/pldt-h153-381-modem-wan-traffic-throttling-analytics-system/blob/main/snmp_poller.py) (HTTP API), [`index.html`](https://github.com/ardzeyftw/pldt-h153-381-modem-wan-traffic-throttling-analytics-system/blob/main/index.html) (Dashboard page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_collection["Collection and analysis"]
  node_poller["Modem poller<br/>[snmp_poller.py]"]
  node_accounting["Usage accounting<br/>[snmp_poller.py]"]
  node_probe["Speed probe engine<br/>[snmp_poller.py]"]
  node_verification["Throttle verification<br/>[snmp_poller.py]"]
end

subgraph group_persistence["Evidence storage"]
  node_database[("Evidence database<br/>[snmp_poller.py]")]
end

subgraph group_service["Web service and exports"]
  node_history["History aggregation<br/>[snmp_poller.py]"]
  node_api["HTTP API<br/>[snmp_poller.py]"]
  node_csv["CSV export<br/>[snmp_poller.py]"]
end

subgraph group_interface["Dashboard interface"]
  node_page["Dashboard page<br/>[index.html]"]
  node_dashboard["Dashboard client<br/>[app.js]"]
  node_traffic_view["Live traffic view<br/>[app.js]"]
  node_probe_view["Probe controls and log<br/>[app.js]"]
  node_history_view["Charts and history<br/>[app.js]"]
end

node_modem["Huawei modem"]
node_cdn["CDN targets"]
node_operator(("Operator"))

node_poller -->|"polls telemetry"| node_modem
node_poller -->|"processes counters"| node_accounting
node_accounting -->|"stores samples"| node_database
node_poller -->|"schedules probes"| node_probe
node_probe -->|"downloads from"| node_cdn
node_probe -->|"checks low speeds"| node_verification
node_verification -->|"stores results"| node_database
node_api -->|"reads and resets"| node_database
node_history -->|"reads samples"| node_database
node_api -->|"requests history"| node_history
node_api -->|"requests export"| node_csv
node_csv -->|"reads evidence"| node_database
node_operator -->|"uses"| node_dashboard
node_page -->|"loads"| node_dashboard
node_dashboard -->|"fetches data"| node_api
node_dashboard -->|"renders controls"| node_probe_view
node_dashboard -->|"renders status"| node_traffic_view
node_dashboard -->|"renders history"| node_history_view
node_api -->|"serves responses"| node_dashboard
node_api -->|"dispatches manual run"| node_probe

click node_poller "https://github.com/ardzeyftw/pldt-h153-381-modem-wan-traffic-throttling-analytics-system/blob/main/snmp_poller.py"
click node_accounting "https://github.com/ardzeyftw/pldt-h153-381-modem-wan-traffic-throttling-analytics-system/blob/main/snmp_poller.py"
click node_probe "https://github.com/ardzeyftw/pldt-h153-381-modem-wan-traffic-throttling-analytics-system/blob/main/snmp_poller.py"
click node_verification "https://github.com/ardzeyftw/pldt-h153-381-modem-wan-traffic-throttling-analytics-system/blob/main/snmp_poller.py"
click node_database "https://github.com/ardzeyftw/pldt-h153-381-modem-wan-traffic-throttling-analytics-system/blob/main/snmp_poller.py"
click node_history "https://github.com/ardzeyftw/pldt-h153-381-modem-wan-traffic-throttling-analytics-system/blob/main/snmp_poller.py"
click node_api "https://github.com/ardzeyftw/pldt-h153-381-modem-wan-traffic-throttling-analytics-system/blob/main/snmp_poller.py"
click node_csv "https://github.com/ardzeyftw/pldt-h153-381-modem-wan-traffic-throttling-analytics-system/blob/main/snmp_poller.py"
click node_page "https://github.com/ardzeyftw/pldt-h153-381-modem-wan-traffic-throttling-analytics-system/blob/main/index.html"
click node_dashboard "https://github.com/ardzeyftw/pldt-h153-381-modem-wan-traffic-throttling-analytics-system/blob/main/app.js"
click node_traffic_view "https://github.com/ardzeyftw/pldt-h153-381-modem-wan-traffic-throttling-analytics-system/blob/main/app.js"
click node_probe_view "https://github.com/ardzeyftw/pldt-h153-381-modem-wan-traffic-throttling-analytics-system/blob/main/app.js"
click node_history_view "https://github.com/ardzeyftw/pldt-h153-381-modem-wan-traffic-throttling-analytics-system/blob/main/app.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_poller,node_accounting,node_probe,node_verification toneBlue
class node_database toneAmber
class node_history,node_api,node_csv toneMint
class node_page,node_dashboard,node_traffic_view,node_probe_view,node_history_view toneRose
class node_modem,node_cdn,node_operator toneIndigo
```

## Components

### Collection and analysis

- [Modem poller](https://github.com/ardzeyftw/pldt-h153-381-modem-wan-traffic-throttling-analytics-system/blob/main/snmp_poller.py): `snmp_poller.py`
- [Usage accounting](https://github.com/ardzeyftw/pldt-h153-381-modem-wan-traffic-throttling-analytics-system/blob/main/snmp_poller.py): `snmp_poller.py`
- [Speed probe engine](https://github.com/ardzeyftw/pldt-h153-381-modem-wan-traffic-throttling-analytics-system/blob/main/snmp_poller.py): `snmp_poller.py`
- [Throttle verification](https://github.com/ardzeyftw/pldt-h153-381-modem-wan-traffic-throttling-analytics-system/blob/main/snmp_poller.py): `snmp_poller.py`

### Evidence storage

- [Evidence database](https://github.com/ardzeyftw/pldt-h153-381-modem-wan-traffic-throttling-analytics-system/blob/main/snmp_poller.py): `snmp_poller.py`

### Web service and exports

- [History aggregation](https://github.com/ardzeyftw/pldt-h153-381-modem-wan-traffic-throttling-analytics-system/blob/main/snmp_poller.py): `snmp_poller.py`
- [HTTP API](https://github.com/ardzeyftw/pldt-h153-381-modem-wan-traffic-throttling-analytics-system/blob/main/snmp_poller.py): `snmp_poller.py`
- [CSV export](https://github.com/ardzeyftw/pldt-h153-381-modem-wan-traffic-throttling-analytics-system/blob/main/snmp_poller.py): `snmp_poller.py`

### Dashboard interface

- [Dashboard page](https://github.com/ardzeyftw/pldt-h153-381-modem-wan-traffic-throttling-analytics-system/blob/main/index.html): `index.html`
- [Dashboard client](https://github.com/ardzeyftw/pldt-h153-381-modem-wan-traffic-throttling-analytics-system/blob/main/app.js): `app.js`
- [Live traffic view](https://github.com/ardzeyftw/pldt-h153-381-modem-wan-traffic-throttling-analytics-system/blob/main/app.js): `app.js`
- [Probe controls and log](https://github.com/ardzeyftw/pldt-h153-381-modem-wan-traffic-throttling-analytics-system/blob/main/app.js): `app.js`
- [Charts and history](https://github.com/ardzeyftw/pldt-h153-381-modem-wan-traffic-throttling-analytics-system/blob/main/app.js): `app.js`

### Other components

- **Huawei modem**
- **CDN targets**
- **Operator**

## Connections

- Modem poller → Huawei modem: polls telemetry
- Modem poller → Usage accounting: processes counters
- Usage accounting → Evidence database: stores samples
- Modem poller → Speed probe engine: schedules probes
- Speed probe engine → CDN targets: downloads from
- Speed probe engine → Throttle verification: checks low speeds
- Throttle verification → Evidence database: stores results
- HTTP API → Evidence database: reads and resets
- History aggregation → Evidence database: reads samples
- HTTP API → History aggregation: requests history
- HTTP API → CSV export: requests export
- CSV export → Evidence database: reads evidence
- Operator → Dashboard client: uses
- Dashboard page → Dashboard client: loads
- Dashboard client → HTTP API: fetches data
- Dashboard client → Probe controls and log: renders controls
- Dashboard client → Live traffic view: renders status
- Dashboard client → Charts and history: renders history
- HTTP API → Dashboard client: serves responses
- HTTP API → Speed probe engine: dispatches manual run
