flowchart TB
subgraph FE["Browser · plain JavaScript, no build step"]
direction LR
LF["Leaflet<br/>interactive map"] ~~~ CJ["Chart.js<br/>throughput chart"] ~~~ SIO["Socket.IO client<br/>live updates"]
end
subgraph BE["Python 3.9+ backend"]
direction LR
FL["Flask + Flask-SocketIO<br/>web server, REST API, push"] ~~~ JJ["Jinja2<br/>templates, offline report"]
DP["dpkt<br/>decode pcap / pcapng"] ~~~ GEO["pygeoip / maxminddb<br/>IP → location"]
end
subgraph CAP["Packet capture"]
direction LR
SC["Scapy<br/>when NetMap already has rights"] ~~~ LP["ctypes + system libpcap<br/>root helper, standard library only"]
end
subgraph DATA["Data"]
direction LR
DB[("GeoLiteCity.dat<br/>or *city*.mmdb")] ~~~ PC[("sample-browsing.pcap<br/>demo-alerts.pcap")]
end
FE <-->|"HTTP + WebSocket"| BE
CAP -->|packets| BE
BE --> DATA
19 tests in tests/: parsing, GeoIP, alert rules, exporters, every API route, and the root-helper protocol (replayed from a file, so no root is needed).
GitHub Actions
Runs the tests and a CLI smoke test on Ubuntu, macOS and Windows with Python 3.9 and 3.13 (workflow).
Wireshark
To record your own .pcapng captures to open in NetMap.