# gabrielfc7/netpulse architecture

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

- Interactive diagram: https://gitdiagram.com/gabrielfc7/netpulse
- Repository: https://github.com/gabrielfc7/netpulse

## Overview

NetPulse Pro is a local network-monitoring and diagnostics dashboard. Its principal workflow is to sample gateway and internet health, record measurements and incidents, diagnose drops, and alert the user with repair advice; users can also run targeted diagnostics, security checks, and network optimizations. The graph preserves the README’s major capability areas. Evidence is limited to the supplied excerpts and README, so some feature-to-backend wiring is not asserted.

Main entry points: [`backend/server.py`](https://github.com/gabrielfc7/netpulse/blob/main/backend/server.py) (HTTP API), [`backend/monitor.py`](https://github.com/gabrielfc7/netpulse/blob/main/backend/monitor.py) (Health Monitor), [`backend/ping_analyzer.py`](https://github.com/gabrielfc7/netpulse/blob/main/backend/ping_analyzer.py) (Ping Analysis), [`backend/db.py`](https://github.com/gabrielfc7/netpulse/blob/main/backend/db.py) (Metrics & Incidents)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Dashboard"]
  node_dashboard["Web Dashboard<br/>[app.js]"]
  node_api["HTTP API<br/>[server.py]"]
end

subgraph group_monitoring["Monitoring &amp; Diagnosis"]
  node_monitor["Health Monitor<br/>[monitor.py]"]
  node_ping["Ping Analysis<br/>[ping_analyzer.py]"]
  node_drop["Drop Doctor<br/>[drop_doctor.py]"]
end

subgraph group_diagnostics["Diagnostics &amp; Security"]
  node_wifi["Wi-Fi Scanner<br/>[wifi_scanner.py]"]
  node_bandwidth["Bandwidth Tests<br/>[bandwidth.py]"]
  node_bufferbloat["Bufferbloat Tests<br/>[bufferbloat.py]"]
  node_dns["DNS Benchmark<br/>[dns_bench.py]"]
  node_security["Security Auditor<br/>[security_audit.py]"]
  node_process["Process Monitor<br/>[process_monitor.py]"]
  node_version["Version Checker<br/>[version.py]"]
end

subgraph group_actions["Alerts &amp; Repair"]
  node_optimizer["Network Optimizer<br/>[optimizer.py]"]
  node_notifier["Alert Dispatcher<br/>[notifier.py]"]
end

subgraph group_services["Internal Services"]
  node_history[("Metrics &amp; Incidents<br/>[db.py]")]
  node_cache["TTL Cache<br/>[cache.py]"]
  node_utils["System Utilities<br/>[utils.py]"]
end

node_user(("User"))
node_network(("Local Network"))
node_notification_services(("Notification Services"))

node_user -->|"uses"| node_dashboard
node_dashboard -.->|"requests data"| node_api
node_monitor -->|"samples latency"| node_ping
node_monitor -->|"records metrics"| node_history
node_monitor -->|"diagnoses drops"| node_drop
node_monitor -->|"sends alerts"| node_notifier
node_monitor -->|"reads settings"| node_history
node_ping -->|"pings hosts"| node_network
node_api -->|"runs diagnostic"| node_ping
node_api -->|"analyzes drops"| node_drop
node_api -.->|"runs repair"| node_optimizer
node_api -->|"serves history"| node_history
node_wifi -->|"scans nearby Wi-Fi"| node_network
node_security -->|"audits exposure"| node_network
node_dns -->|"tests resolvers"| node_network
node_optimizer -->|"applies fixes"| node_network
node_notifier -->|"loads settings"| node_history
node_notifier -->|"broadcasts alerts"| node_notification_services
node_bufferbloat -->|"uses measurements"| node_ping
node_dns -->|"caches results"| node_cache
node_wifi -->|"caches results"| node_cache
node_api -.->|"imports scanner"| node_wifi
node_api -.->|"imports tests"| node_bandwidth
node_api -.->|"imports tests"| node_bufferbloat
node_api -.->|"imports benchmark"| node_dns
node_api -.->|"imports auditor"| node_security
node_api -.->|"imports monitor"| node_process
node_api -.->|"imports checker"| node_version

click node_dashboard "https://github.com/gabrielfc7/netpulse/blob/main/frontend/js/app.js"
click node_api "https://github.com/gabrielfc7/netpulse/blob/main/backend/server.py"
click node_monitor "https://github.com/gabrielfc7/netpulse/blob/main/backend/monitor.py"
click node_ping "https://github.com/gabrielfc7/netpulse/blob/main/backend/ping_analyzer.py"
click node_drop "https://github.com/gabrielfc7/netpulse/blob/main/backend/drop_doctor.py"
click node_history "https://github.com/gabrielfc7/netpulse/blob/main/backend/db.py"
click node_wifi "https://github.com/gabrielfc7/netpulse/blob/main/backend/wifi_scanner.py"
click node_bandwidth "https://github.com/gabrielfc7/netpulse/blob/main/backend/bandwidth.py"
click node_bufferbloat "https://github.com/gabrielfc7/netpulse/blob/main/backend/bufferbloat.py"
click node_dns "https://github.com/gabrielfc7/netpulse/blob/main/backend/dns_bench.py"
click node_security "https://github.com/gabrielfc7/netpulse/blob/main/backend/security_audit.py"
click node_process "https://github.com/gabrielfc7/netpulse/blob/main/backend/process_monitor.py"
click node_version "https://github.com/gabrielfc7/netpulse/blob/main/backend/version.py"
click node_optimizer "https://github.com/gabrielfc7/netpulse/blob/main/backend/optimizer.py"
click node_notifier "https://github.com/gabrielfc7/netpulse/blob/main/backend/notifier.py"
click node_cache "https://github.com/gabrielfc7/netpulse/blob/main/backend/cache.py"
click node_utils "https://github.com/gabrielfc7/netpulse/blob/main/backend/utils.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_dashboard,node_api,node_user toneBlue
class node_monitor,node_ping,node_drop toneAmber
class node_wifi,node_bandwidth,node_bufferbloat,node_dns,node_security,node_process,node_version toneMint
class node_optimizer,node_notifier toneRose
class node_history,node_cache,node_utils,node_network,node_notification_services toneIndigo
```

## Components

### Dashboard

- [Web Dashboard](https://github.com/gabrielfc7/netpulse/blob/main/frontend/js/app.js): `frontend/js/app.js`
- [HTTP API](https://github.com/gabrielfc7/netpulse/blob/main/backend/server.py): `backend/server.py`

### Monitoring & Diagnosis

- [Health Monitor](https://github.com/gabrielfc7/netpulse/blob/main/backend/monitor.py): `backend/monitor.py`
- [Ping Analysis](https://github.com/gabrielfc7/netpulse/blob/main/backend/ping_analyzer.py): `backend/ping_analyzer.py`
- [Drop Doctor](https://github.com/gabrielfc7/netpulse/blob/main/backend/drop_doctor.py): `backend/drop_doctor.py`

### Diagnostics & Security

- [Wi-Fi Scanner](https://github.com/gabrielfc7/netpulse/blob/main/backend/wifi_scanner.py): `backend/wifi_scanner.py`
- [Bandwidth Tests](https://github.com/gabrielfc7/netpulse/blob/main/backend/bandwidth.py): `backend/bandwidth.py`
- [Bufferbloat Tests](https://github.com/gabrielfc7/netpulse/blob/main/backend/bufferbloat.py): `backend/bufferbloat.py`
- [DNS Benchmark](https://github.com/gabrielfc7/netpulse/blob/main/backend/dns_bench.py): `backend/dns_bench.py`
- [Security Auditor](https://github.com/gabrielfc7/netpulse/blob/main/backend/security_audit.py): `backend/security_audit.py`
- [Process Monitor](https://github.com/gabrielfc7/netpulse/blob/main/backend/process_monitor.py): `backend/process_monitor.py`
- [Version Checker](https://github.com/gabrielfc7/netpulse/blob/main/backend/version.py): `backend/version.py`

### Alerts & Repair

- [Network Optimizer](https://github.com/gabrielfc7/netpulse/blob/main/backend/optimizer.py): `backend/optimizer.py`
- [Alert Dispatcher](https://github.com/gabrielfc7/netpulse/blob/main/backend/notifier.py): `backend/notifier.py`

### Internal Services

- [Metrics & Incidents](https://github.com/gabrielfc7/netpulse/blob/main/backend/db.py): `backend/db.py`
- [TTL Cache](https://github.com/gabrielfc7/netpulse/blob/main/backend/cache.py): `backend/cache.py`
- [System Utilities](https://github.com/gabrielfc7/netpulse/blob/main/backend/utils.py): `backend/utils.py`

### Other components

- **User**
- **Local Network**
- **Notification Services**

## Connections

- User → Web Dashboard: uses (evidence: `README.md`)
- Web Dashboard → HTTP API: requests data
- Health Monitor → Ping Analysis: samples latency (evidence: `backend/monitor.py`)
- Health Monitor → Metrics & Incidents: records metrics (evidence: `backend/monitor.py`)
- Health Monitor → Drop Doctor: diagnoses drops (evidence: `backend/monitor.py`)
- Health Monitor → Alert Dispatcher: sends alerts (evidence: `backend/monitor.py`)
- Health Monitor → Metrics & Incidents: reads settings (evidence: `backend/monitor.py`)
- Ping Analysis → Local Network: pings hosts (evidence: `backend/ping_analyzer.py`)
- HTTP API → Ping Analysis: runs diagnostic (evidence: `backend/server.py`)
- HTTP API → Drop Doctor: analyzes drops (evidence: `backend/server.py`)
- HTTP API → Network Optimizer: runs repair (evidence: `backend/server.py`)
- HTTP API → Metrics & Incidents: serves history (evidence: `backend/server.py`)
- Wi-Fi Scanner → Local Network: scans nearby Wi-Fi (evidence: `README.md`)
- Security Auditor → Local Network: audits exposure (evidence: `backend/security_audit.py`)
- DNS Benchmark → Local Network: tests resolvers (evidence: `backend/dns_bench.py`)
- Network Optimizer → Local Network: applies fixes (evidence: `README.md`)
- Alert Dispatcher → Metrics & Incidents: loads settings (evidence: `backend/notifier.py`)
- Alert Dispatcher → Notification Services: broadcasts alerts (evidence: `backend/notifier.py`)
- Bufferbloat Tests → Ping Analysis: uses measurements (evidence: `backend/bufferbloat.py`)
- DNS Benchmark → TTL Cache: caches results (evidence: `backend/dns_bench.py`)
- Wi-Fi Scanner → TTL Cache: caches results (evidence: `backend/wifi_scanner.py`)
- HTTP API → Wi-Fi Scanner: imports scanner (evidence: `backend/server.py`)
- HTTP API → Bandwidth Tests: imports tests (evidence: `backend/server.py`)
- HTTP API → Bufferbloat Tests: imports tests (evidence: `backend/server.py`)
- HTTP API → DNS Benchmark: imports benchmark (evidence: `backend/server.py`)
- HTTP API → Security Auditor: imports auditor (evidence: `backend/server.py`)
- HTTP API → Process Monitor: imports monitor (evidence: `backend/server.py`)
- HTTP API → Version Checker: imports checker (evidence: `backend/server.py`)
