# smk1367/wireless-monitor architecture

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

- Interactive diagram: https://gitdiagram.com/smk1367/wireless-monitor
- Repository: https://github.com/smk1367/wireless-monitor

## Overview

Wireless Monitor discovers and scans network devices, stores current and historical results, and presents them through a role-aware dashboard. The main user workflow is viewing device inventory and details; administrators can also manage inventory, users, blacklist entries, and antenna/site data, and review scan history. The README documents discovery and vendor collectors, while sampled scanner code supports SSH and SNMP collection. Because excerpts omit parts of the API and scanner, their exact orchestration and some subsystem wiring cannot be confirmed.

Main entry points: [`api_server.py`](https://github.com/smk1367/wireless-monitor/blob/main/api_server.py) (Flask API), [`scanner.py`](https://github.com/smk1367/wireless-monitor/blob/main/scanner.py) (Network scanner), [`index.html`](https://github.com/smk1367/wireless-monitor/blob/main/index.html) (Web dashboard), [`database.py`](https://github.com/smk1367/wireless-monitor/blob/main/database.py) (Database operations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Dashboard and API"]
  node_dashboard["Web dashboard<br/>[index.html]"]
  node_api["Flask API<br/>[api_server.py]"]
end

subgraph group_collection["Device collection"]
  node_scanner["Network scanner<br/>[scanner.py]"]
end

subgraph group_storage["Inventory and history"]
  node_dbmodule["Database operations<br/>[database.py]"]
  node_store[("SQLite data<br/>[data.db]")]
  node_history["Scan history<br/>[database.py]"]
  node_inventory["Device inventory<br/>[database.py]"]
end

subgraph group_admin["Administration"]
  node_access["Users and roles<br/>[api_server.py]"]
  node_blacklist["Blacklist<br/>[api_server.py]"]
  node_manualips["Manual IP inventory<br/>[api_server.py]"]
  node_excel["Excel site data<br/>[excel_manager.py]"]
end

node_user(("Dashboard user"))
node_routers(("Network devices"))
node_ssh["SSH access"]
node_snmp["SNMP access"]

node_user -->|"uses"| node_dashboard
node_dashboard -->|"requests"| node_api
node_api -->|"queries and updates"| node_dbmodule
node_dbmodule -->|"reads and writes"| node_store
node_scanner -->|"scans"| node_routers
node_scanner -->|"collects via"| node_ssh
node_scanner -->|"collects via"| node_snmp
node_api -->|"serves management"| node_access
node_api -->|"manages"| node_blacklist
node_api -->|"manages"| node_manualips
node_api -->|"serves history"| node_history
node_api -->|"serves devices"| node_inventory
node_api -->|"handles Excel routes"| node_excel
node_excel -->|"imports and exports"| node_store

click node_dashboard "https://github.com/smk1367/wireless-monitor/blob/main/index.html"
click node_api "https://github.com/smk1367/wireless-monitor/blob/main/api_server.py"
click node_scanner "https://github.com/smk1367/wireless-monitor/blob/main/scanner.py"
click node_dbmodule "https://github.com/smk1367/wireless-monitor/blob/main/database.py"
click node_store "https://github.com/smk1367/wireless-monitor/blob/main/data/data.db"
click node_history "https://github.com/smk1367/wireless-monitor/blob/main/database.py"
click node_inventory "https://github.com/smk1367/wireless-monitor/blob/main/database.py"
click node_access "https://github.com/smk1367/wireless-monitor/blob/main/api_server.py"
click node_blacklist "https://github.com/smk1367/wireless-monitor/blob/main/api_server.py"
click node_manualips "https://github.com/smk1367/wireless-monitor/blob/main/api_server.py"
click node_excel "https://github.com/smk1367/wireless-monitor/blob/main/excel_import/excel_manager.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_scanner toneAmber
class node_dbmodule,node_store,node_history,node_inventory toneMint
class node_access,node_blacklist,node_manualips,node_excel toneRose
class node_routers,node_ssh,node_snmp toneIndigo
```

## Components

### Dashboard and API

- [Web dashboard](https://github.com/smk1367/wireless-monitor/blob/main/index.html): `index.html`
- [Flask API](https://github.com/smk1367/wireless-monitor/blob/main/api_server.py): `api_server.py`

### Device collection

- [Network scanner](https://github.com/smk1367/wireless-monitor/blob/main/scanner.py): `scanner.py`

### Inventory and history

- [Database operations](https://github.com/smk1367/wireless-monitor/blob/main/database.py): `database.py`
- [SQLite data](https://github.com/smk1367/wireless-monitor/blob/main/data/data.db): `data/data.db`
- [Scan history](https://github.com/smk1367/wireless-monitor/blob/main/database.py): `database.py`
- [Device inventory](https://github.com/smk1367/wireless-monitor/blob/main/database.py): `database.py`

### Administration

- [Users and roles](https://github.com/smk1367/wireless-monitor/blob/main/api_server.py): `api_server.py`
- [Blacklist](https://github.com/smk1367/wireless-monitor/blob/main/api_server.py): `api_server.py`
- [Manual IP inventory](https://github.com/smk1367/wireless-monitor/blob/main/api_server.py): `api_server.py`
- [Excel site data](https://github.com/smk1367/wireless-monitor/blob/main/excel_import/excel_manager.py): `excel_import/excel_manager.py`

### Other components

- **Dashboard user**
- **Network devices**
- **SSH access**
- **SNMP access**

## Connections

- Dashboard user → Web dashboard: uses
- Web dashboard → Flask API: requests
- Flask API → Database operations: queries and updates
- Database operations → SQLite data: reads and writes
- Network scanner → Network devices: scans
- Network scanner → SSH access: collects via
- Network scanner → SNMP access: collects via
- Flask API → Users and roles: serves management
- Flask API → Blacklist: manages
- Flask API → Manual IP inventory: manages
- Flask API → Scan history: serves history
- Flask API → Device inventory: serves devices
- Flask API → Excel site data: handles Excel routes
- Excel site data → SQLite data: imports and exports
