# highskai/netpulse architecture

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

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

## Overview

NetPulse is a self-hosted network monitor: a signed-in user manages devices in the web dashboard, scheduled checks record device results, and the dashboard presents history, inventory, alerts, and diagnostics. The map preserves the README’s discovery, network/topology, packet-capture, external-probe, account, and access-control capabilities. The excerpts show the web security gate, storage contract, and selected domain contracts; links for several unsampled subsystems are therefore marked unverified rather than asserted as observed calls.

Main entry points: [`src/netpulse/web/views.py`](https://github.com/highskai/netpulse/blob/main/src/netpulse/web/views.py) (Dashboard routes), [`src/netpulse/web/admin_views.py`](https://github.com/highskai/netpulse/blob/main/src/netpulse/web/admin_views.py) (Administration routes), [`src/netpulse/web/app.py`](https://github.com/highskai/netpulse/blob/main/src/netpulse/web/app.py) (Web application), [`src/netpulse/checks.py`](https://github.com/highskai/netpulse/blob/main/src/netpulse/checks.py) (Device checks)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web and access"]
  node_webapp["Web application<br/>[app.py]"]
  node_views["Dashboard routes<br/>[views.py]"]
  node_adminviews["Administration routes<br/>[admin_views.py]"]
  node_security["Request security<br/>[security.py]"]
  node_access["Network access<br/>[access.py]"]
  node_accounts["Accounts<br/>[accounts.py]"]
  node_auth["Authentication<br/>[auth.py]"]
  node_tls["Local HTTPS certificates<br/>[tls.py]"]
end

subgraph group_monitor["Monitoring workflow"]
  node_scheduler["Check scheduler<br/>[scheduler.py]"]
  node_checks["Device checks<br/>[checks.py]"]
  node_ping["Ping probes"]
  node_discovery["Device discovery<br/>[discovery.py]"]
  node_alerts["Alert engine<br/>[alerting.py]"]
  node_alertrecords["Alert records<br/>[alerts.py]"]
  node_notify["Notifications"]
end

subgraph group_insight["Network insights"]
  node_metrics["History and reports<br/>[metrics.py]"]
  node_charts["Dashboard charts<br/>[charts.py]"]
  node_networkreader["Windows network reader<br/>[reader.py]"]
  node_networkdata["Network information<br/>[network.py]"]
  node_topology["Network map<br/>[topology.py]"]
end

subgraph group_diagnostics["Diagnostics"]
  node_trace["Path traces<br/>[trace.py]"]
  node_traffic["Packet capture<br/>[traffic.py]"]
  node_capture["Capture sources<br/>[source.py]"]
  node_capturedecode["Packet decoding<br/>[decode.py]"]
  node_outside["Outside checks<br/>[outside.py]"]
  node_globalping["Globalping probes<br/>[globalping.py]"]
end

subgraph group_persistence["Domain and storage"]
  node_domain["Domain model<br/>[domain.py]"]
  node_store[("SQLite history and inventory<br/>[store.py]")]
end

node_user(("Network user"))

node_user -->|"uses dashboard"| node_webapp
node_webapp -->|"gates requests"| node_security
node_webapp -.->|"registers routes"| node_views
node_webapp -.->|"registers routes"| node_adminviews
node_views -.->|"reads and updates"| node_store
node_adminviews -->|"manages users"| node_accounts
node_adminviews -->|"creates accounts"| node_auth
node_security -.->|"checks identity"| node_auth
node_security -.->|"checks access"| node_access
node_adminviews -.->|"configures access"| node_access
node_adminviews -.->|"configures certificates"| node_tls
node_scheduler -.->|"runs checks"| node_checks
node_checks -.->|"probes hosts"| node_ping
node_checks -->|"records results"| node_store
node_scheduler -.->|"evaluates alerts"| node_alerts
node_alerts -.->|"updates alert state"| node_alertrecords
node_alerts -.->|"sends notifications"| node_notify
node_discovery -.->|"reads neighbours"| node_networkreader
node_discovery -.->|"stores candidates"| node_store
node_views -.->|"loads history"| node_metrics
node_views -.->|"builds charts"| node_charts
node_networkreader -->|"returns network data"| node_networkdata
node_topology -.->|"uses network data"| node_networkdata
node_views -.->|"renders map"| node_topology
node_views -.->|"runs path traces"| node_trace
node_views -.->|"controls captures"| node_traffic
node_traffic -->|"starts capture"| node_capture
node_traffic -->|"decodes packets"| node_capturedecode
node_views -.->|"requests outside checks"| node_outside
node_outside -.->|"dispatches probes"| node_globalping
node_checks -->|"uses domain values"| node_domain
node_store -->|"stores domain values"| node_domain

click node_webapp "https://github.com/highskai/netpulse/blob/main/src/netpulse/web/app.py"
click node_views "https://github.com/highskai/netpulse/blob/main/src/netpulse/web/views.py"
click node_adminviews "https://github.com/highskai/netpulse/blob/main/src/netpulse/web/admin_views.py"
click node_security "https://github.com/highskai/netpulse/blob/main/src/netpulse/web/security.py"
click node_access "https://github.com/highskai/netpulse/blob/main/src/netpulse/access.py"
click node_accounts "https://github.com/highskai/netpulse/blob/main/src/netpulse/accounts.py"
click node_auth "https://github.com/highskai/netpulse/blob/main/src/netpulse/auth.py"
click node_scheduler "https://github.com/highskai/netpulse/blob/main/src/netpulse/scheduler.py"
click node_checks "https://github.com/highskai/netpulse/blob/main/src/netpulse/checks.py"
click node_ping "https://github.com/highskai/netpulse/tree/main/src/netpulse/ping"
click node_discovery "https://github.com/highskai/netpulse/blob/main/src/netpulse/discovery.py"
click node_alerts "https://github.com/highskai/netpulse/blob/main/src/netpulse/alerting.py"
click node_alertrecords "https://github.com/highskai/netpulse/blob/main/src/netpulse/alerts.py"
click node_notify "https://github.com/highskai/netpulse/tree/main/src/netpulse/notify"
click node_metrics "https://github.com/highskai/netpulse/blob/main/src/netpulse/metrics.py"
click node_charts "https://github.com/highskai/netpulse/blob/main/src/netpulse/charts.py"
click node_networkreader "https://github.com/highskai/netpulse/blob/main/src/netpulse/netinfo/reader.py"
click node_networkdata "https://github.com/highskai/netpulse/blob/main/src/netpulse/network.py"
click node_topology "https://github.com/highskai/netpulse/blob/main/src/netpulse/topology.py"
click node_trace "https://github.com/highskai/netpulse/blob/main/src/netpulse/trace.py"
click node_traffic "https://github.com/highskai/netpulse/blob/main/src/netpulse/traffic.py"
click node_capture "https://github.com/highskai/netpulse/blob/main/src/netpulse/capture/source.py"
click node_capturedecode "https://github.com/highskai/netpulse/blob/main/src/netpulse/capture/decode.py"
click node_outside "https://github.com/highskai/netpulse/blob/main/src/netpulse/outside.py"
click node_globalping "https://github.com/highskai/netpulse/blob/main/src/netpulse/probes/globalping.py"
click node_tls "https://github.com/highskai/netpulse/blob/main/src/netpulse/crypto/tls.py"
click node_domain "https://github.com/highskai/netpulse/blob/main/src/netpulse/domain.py"
click node_store "https://github.com/highskai/netpulse/blob/main/src/netpulse/store.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_webapp,node_views,node_adminviews,node_security,node_access,node_accounts,node_auth,node_tls,node_user toneBlue
class node_scheduler,node_checks,node_ping,node_discovery,node_alerts,node_alertrecords,node_notify toneAmber
class node_metrics,node_charts,node_networkreader,node_networkdata,node_topology toneMint
class node_trace,node_traffic,node_capture,node_capturedecode,node_outside,node_globalping toneRose
class node_domain,node_store toneIndigo
```

## Components

### Web and access

- [Web application](https://github.com/highskai/netpulse/blob/main/src/netpulse/web/app.py): `src/netpulse/web/app.py`
- [Dashboard routes](https://github.com/highskai/netpulse/blob/main/src/netpulse/web/views.py): `src/netpulse/web/views.py`
- [Administration routes](https://github.com/highskai/netpulse/blob/main/src/netpulse/web/admin_views.py): `src/netpulse/web/admin_views.py`
- [Request security](https://github.com/highskai/netpulse/blob/main/src/netpulse/web/security.py): `src/netpulse/web/security.py`
- [Network access](https://github.com/highskai/netpulse/blob/main/src/netpulse/access.py): `src/netpulse/access.py`
- [Accounts](https://github.com/highskai/netpulse/blob/main/src/netpulse/accounts.py): `src/netpulse/accounts.py`
- [Authentication](https://github.com/highskai/netpulse/blob/main/src/netpulse/auth.py): `src/netpulse/auth.py`
- [Local HTTPS certificates](https://github.com/highskai/netpulse/blob/main/src/netpulse/crypto/tls.py): `src/netpulse/crypto/tls.py`

### Monitoring workflow

- [Check scheduler](https://github.com/highskai/netpulse/blob/main/src/netpulse/scheduler.py): `src/netpulse/scheduler.py`
- [Device checks](https://github.com/highskai/netpulse/blob/main/src/netpulse/checks.py): `src/netpulse/checks.py`
- [Ping probes](https://github.com/highskai/netpulse/tree/main/src/netpulse/ping): `src/netpulse/ping`
- [Device discovery](https://github.com/highskai/netpulse/blob/main/src/netpulse/discovery.py): `src/netpulse/discovery.py`
- [Alert engine](https://github.com/highskai/netpulse/blob/main/src/netpulse/alerting.py): `src/netpulse/alerting.py`
- [Alert records](https://github.com/highskai/netpulse/blob/main/src/netpulse/alerts.py): `src/netpulse/alerts.py`
- [Notifications](https://github.com/highskai/netpulse/tree/main/src/netpulse/notify): `src/netpulse/notify`

### Network insights

- [History and reports](https://github.com/highskai/netpulse/blob/main/src/netpulse/metrics.py): `src/netpulse/metrics.py`
- [Dashboard charts](https://github.com/highskai/netpulse/blob/main/src/netpulse/charts.py): `src/netpulse/charts.py`
- [Windows network reader](https://github.com/highskai/netpulse/blob/main/src/netpulse/netinfo/reader.py): `src/netpulse/netinfo/reader.py`
- [Network information](https://github.com/highskai/netpulse/blob/main/src/netpulse/network.py): `src/netpulse/network.py`
- [Network map](https://github.com/highskai/netpulse/blob/main/src/netpulse/topology.py): `src/netpulse/topology.py`

### Diagnostics

- [Path traces](https://github.com/highskai/netpulse/blob/main/src/netpulse/trace.py): `src/netpulse/trace.py`
- [Packet capture](https://github.com/highskai/netpulse/blob/main/src/netpulse/traffic.py): `src/netpulse/traffic.py`
- [Capture sources](https://github.com/highskai/netpulse/blob/main/src/netpulse/capture/source.py): `src/netpulse/capture/source.py`
- [Packet decoding](https://github.com/highskai/netpulse/blob/main/src/netpulse/capture/decode.py): `src/netpulse/capture/decode.py`
- [Outside checks](https://github.com/highskai/netpulse/blob/main/src/netpulse/outside.py): `src/netpulse/outside.py`
- [Globalping probes](https://github.com/highskai/netpulse/blob/main/src/netpulse/probes/globalping.py): `src/netpulse/probes/globalping.py`

### Domain and storage

- [Domain model](https://github.com/highskai/netpulse/blob/main/src/netpulse/domain.py): `src/netpulse/domain.py`
- [SQLite history and inventory](https://github.com/highskai/netpulse/blob/main/src/netpulse/store.py): `src/netpulse/store.py`

### Other components

- **Network user**

## Connections

- Network user → Web application: uses dashboard (evidence: `README.md`)
- Web application → Request security: gates requests (evidence: `src/netpulse/web/app.py`)
- Web application → Dashboard routes: registers routes (evidence: `src/netpulse/web/app.py`)
- Web application → Administration routes: registers routes (evidence: `src/netpulse/web/app.py`)
- Dashboard routes → SQLite history and inventory: reads and updates (evidence: `src/netpulse/web/views.py`)
- Administration routes → Accounts: manages users (evidence: `src/netpulse/web/admin_views.py`)
- Administration routes → Authentication: creates accounts (evidence: `src/netpulse/web/admin_views.py`)
- Request security → Authentication: checks identity (evidence: `src/netpulse/web/security.py`)
- Request security → Network access: checks access (evidence: `src/netpulse/web/security.py`)
- Administration routes → Network access: configures access (evidence: `src/netpulse/web/admin_views.py`)
- Administration routes → Local HTTPS certificates: configures certificates (evidence: `src/netpulse/web/admin_views.py`)
- Check scheduler → Device checks: runs checks
- Device checks → Ping probes: probes hosts (evidence: `src/netpulse/checks.py`)
- Device checks → SQLite history and inventory: records results (evidence: `src/netpulse/checks.py`)
- Check scheduler → Alert engine: evaluates alerts
- Alert engine → Alert records: updates alert state
- Alert engine → Notifications: sends notifications
- Device discovery → Windows network reader: reads neighbours
- Device discovery → SQLite history and inventory: stores candidates (evidence: `src/netpulse/discovery.py`)
- Dashboard routes → History and reports: loads history (evidence: `src/netpulse/web/views.py`)
- Dashboard routes → Dashboard charts: builds charts (evidence: `src/netpulse/web/views.py`)
- Windows network reader → Network information: returns network data (evidence: `src/netpulse/netinfo/reader.py`)
- Network map → Network information: uses network data
- Dashboard routes → Network map: renders map (evidence: `src/netpulse/web/views.py`)
- Dashboard routes → Path traces: runs path traces
- Dashboard routes → Packet capture: controls captures (evidence: `src/netpulse/web/views.py`)
- Packet capture → Capture sources: starts capture (evidence: `src/netpulse/traffic.py`)
- Packet capture → Packet decoding: decodes packets (evidence: `src/netpulse/traffic.py`)
- Dashboard routes → Outside checks: requests outside checks
- Outside checks → Globalping probes: dispatches probes
- Device checks → Domain model: uses domain values (evidence: `src/netpulse/checks.py`)
- SQLite history and inventory → Domain model: stores domain values (evidence: `src/netpulse/store.py`)
