# shaffat01/netmonitor_pro architecture

> Architecture diagram of the GitHub repository shaffat01/netmonitor_pro, 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/shaffat01/netmonitor_pro
- Repository: https://github.com/shaffat01/netmonitor_pro

## Overview

NetMonitor Pro is a Flask-based network availability monitor. Users manage monitored nodes through the web dashboard, while scheduled or manual polling measures reachability and updates node status and downtime history; dashboard and detail views expose current health, statistics, and event timelines. The tree and excerpts support the monitoring, persistence, and UI architecture, but the README provides no feature documentation and portions of app.py and monitor.py are unsampled, so uncertain route wiring and integrations are omitted.

Main entry points: [`app.py`](https://github.com/shaffat01/netmonitor_pro/blob/main/app.py) (Flask routes), [`models.py`](https://github.com/shaffat01/netmonitor_pro/blob/main/models.py) (Data models), [`monitor.py`](https://github.com/shaffat01/netmonitor_pro/blob/main/monitor.py) (Network monitor), [`static/js/main.js`](https://github.com/shaffat01/netmonitor_pro/blob/main/static/js/main.js) (Dashboard UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_dashboard["Dashboard UI<br/>[main.js]"]
  node_detail_ui["Node detail UI<br/>[node_detail.js]"]
  node_templates["Page templates"]
end

subgraph group_app["Application services"]
  node_web_app["Flask routes<br/>[app.py]"]
  node_config["Monitor config<br/>[config.py]"]
  node_node_admin["Node management<br/>[app.py]"]
  node_csv_import["CSV import<br/>[app.py]"]
  node_node_api["Node API<br/>[app.py]"]
  node_log_api["Downtime APIs<br/>[app.py]"]
  node_stats_api["Statistics API<br/>[app.py]"]
end

subgraph group_monitoring["Monitoring"]
  node_monitor["Network monitor<br/>[monitor.py]"]
  node_windows_notify["Windows alerts<br/>[win_notify.py]"]
  node_scheduler["Polling scheduler<br/>[app.py]"]
end

subgraph group_state["Monitoring state"]
  node_models["Data models<br/>[models.py]"]
  node_database[("SQLite database<br/>[nodes.db]")]
end

node_operator(("Operator"))
node_icmp(("ICMP targets"))

node_operator -->|"uses"| node_dashboard
node_operator -->|"opens"| node_detail_ui
node_dashboard -->|"renders"| node_templates
node_detail_ui -->|"renders"| node_templates
node_dashboard -->|"requests"| node_node_api
node_dashboard -->|"requests"| node_stats_api
node_dashboard -->|"requests"| node_log_api
node_detail_ui -->|"requests"| node_log_api
node_detail_ui -->|"requests"| node_node_api
node_node_admin -->|"reads/writes"| node_models
node_csv_import -->|"writes"| node_models
node_node_api -->|"reads/writes"| node_models
node_log_api -->|"reads/writes"| node_models
node_stats_api -->|"reads"| node_models
node_scheduler -->|"dispatches"| node_monitor
node_web_app -->|"starts"| node_monitor
node_web_app -->|"routes"| node_node_admin
node_web_app -->|"routes"| node_csv_import
node_web_app -->|"routes"| node_node_api
node_web_app -->|"routes"| node_log_api
node_web_app -->|"routes"| node_stats_api
node_monitor -->|"reads"| node_config
node_monitor -->|"pings"| node_icmp
node_monitor -->|"updates"| node_models
node_models -->|"persists"| node_database
node_monitor -.->|"alerts"| node_windows_notify

click node_dashboard "https://github.com/shaffat01/netmonitor_pro/blob/main/static/js/main.js"
click node_detail_ui "https://github.com/shaffat01/netmonitor_pro/blob/main/static/js/node_detail.js"
click node_templates "https://github.com/shaffat01/netmonitor_pro/tree/main/templates"
click node_web_app "https://github.com/shaffat01/netmonitor_pro/blob/main/app.py"
click node_config "https://github.com/shaffat01/netmonitor_pro/blob/main/config.py"
click node_monitor "https://github.com/shaffat01/netmonitor_pro/blob/main/monitor.py"
click node_windows_notify "https://github.com/shaffat01/netmonitor_pro/blob/main/win_notify.py"
click node_models "https://github.com/shaffat01/netmonitor_pro/blob/main/models.py"
click node_database "https://github.com/shaffat01/netmonitor_pro/blob/main/nodes.db"
click node_node_admin "https://github.com/shaffat01/netmonitor_pro/blob/main/app.py"
click node_csv_import "https://github.com/shaffat01/netmonitor_pro/blob/main/app.py"
click node_node_api "https://github.com/shaffat01/netmonitor_pro/blob/main/app.py"
click node_log_api "https://github.com/shaffat01/netmonitor_pro/blob/main/app.py"
click node_stats_api "https://github.com/shaffat01/netmonitor_pro/blob/main/app.py"
click node_scheduler "https://github.com/shaffat01/netmonitor_pro/blob/main/app.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_detail_ui,node_templates toneBlue
class node_web_app,node_config,node_node_admin,node_csv_import,node_node_api,node_log_api,node_stats_api toneAmber
class node_monitor,node_windows_notify,node_scheduler toneMint
class node_models,node_database toneRose
class node_operator,node_icmp toneIndigo
```

## Components

### Web interface

- [Dashboard UI](https://github.com/shaffat01/netmonitor_pro/blob/main/static/js/main.js): `static/js/main.js`
- [Node detail UI](https://github.com/shaffat01/netmonitor_pro/blob/main/static/js/node_detail.js): `static/js/node_detail.js`
- [Page templates](https://github.com/shaffat01/netmonitor_pro/tree/main/templates): `templates`

### Application services

- [Flask routes](https://github.com/shaffat01/netmonitor_pro/blob/main/app.py): `app.py`
- [Monitor config](https://github.com/shaffat01/netmonitor_pro/blob/main/config.py): `config.py`
- [Node management](https://github.com/shaffat01/netmonitor_pro/blob/main/app.py): `app.py`
- [CSV import](https://github.com/shaffat01/netmonitor_pro/blob/main/app.py): `app.py`
- [Node API](https://github.com/shaffat01/netmonitor_pro/blob/main/app.py): `app.py`
- [Downtime APIs](https://github.com/shaffat01/netmonitor_pro/blob/main/app.py): `app.py`
- [Statistics API](https://github.com/shaffat01/netmonitor_pro/blob/main/app.py): `app.py`

### Monitoring

- [Network monitor](https://github.com/shaffat01/netmonitor_pro/blob/main/monitor.py): `monitor.py`
- [Windows alerts](https://github.com/shaffat01/netmonitor_pro/blob/main/win_notify.py): `win_notify.py`
- [Polling scheduler](https://github.com/shaffat01/netmonitor_pro/blob/main/app.py): `app.py`

### Monitoring state

- [Data models](https://github.com/shaffat01/netmonitor_pro/blob/main/models.py): `models.py`
- [SQLite database](https://github.com/shaffat01/netmonitor_pro/blob/main/nodes.db): `nodes.db`

### Other components

- **Operator**
- **ICMP targets**

## Connections

- Operator → Dashboard UI: uses
- Operator → Node detail UI: opens
- Dashboard UI → Page templates: renders
- Node detail UI → Page templates: renders
- Dashboard UI → Node API: requests
- Dashboard UI → Statistics API: requests
- Dashboard UI → Downtime APIs: requests
- Node detail UI → Downtime APIs: requests
- Node detail UI → Node API: requests
- Node management → Data models: reads/writes
- CSV import → Data models: writes
- Node API → Data models: reads/writes
- Downtime APIs → Data models: reads/writes
- Statistics API → Data models: reads
- Polling scheduler → Network monitor: dispatches
- Flask routes → Network monitor: starts
- Flask routes → Node management: routes
- Flask routes → CSV import: routes
- Flask routes → Node API: routes
- Flask routes → Downtime APIs: routes
- Flask routes → Statistics API: routes
- Network monitor → Monitor config: reads
- Network monitor → ICMP targets: pings
- Network monitor → Data models: updates
- Data models → SQLite database: persists
- Network monitor → Windows alerts: alerts
