main
Network Topology Wrapper (MVP)
Internal tool for local network discovery, device tracking, and a live topology view. Designed for quick laptop testing and easy move to an internal VM.
Features (MVP)
- Periodic subnet scan (device presence)
- Device inventory (IP, hostname, guessed type, vendor hint)
- Live topology graph in web UI
- Live online/offline feed (SSE)
- Optional DNS log ingest for "which IP queried which domain"
- Optional ingest endpoints for DHCP lease and flow events
Architecture
backend/app/main.py: FastAPI app and API routesbackend/app/state.py: in-memory state manager and topology builderbackend/app/scanner.py: subnet scanner and hostname/type detectionbackend/app/dnslog.py: optional dnsmasq/unbound log tailingfrontend/: static HTML/CSS/JS UIscripts/: helper setup scripts
Quick Start (Laptop)
- Copy env file:
cp .env.example .env
- Adjust
SCAN_SUBNETto your LAN (example192.168.88.0/24). - Run with Docker (Linux recommended for host networking):
docker compose up --build
- Open:
http://localhost:8088
API
GET /api/topology: full topology graph and latest device infoGET /api/events/stream: server-sent events for live updatesPOST /api/ingest/dns: push DNS query eventsPOST /api/ingest/dhcp: push DHCP lease eventsPOST /api/ingest/flow: push flow events (lightweight)
Notes
- Accurate topology improves a lot with SNMP + LLDP/CDP enabled on MikroTik/Cisco devices.
- "IP -> domain" visibility depends on DNS logs and client behavior (DoH/DoT may bypass local DNS visibility).
Next Steps (after MVP)
- Add Redis + Postgres for persistence
- Add SNMP LLDP topology poller (MikroTik/Cisco)
- Add auth (basic SSO/reverse proxy)
Description
Languages
Python
59.8%
JavaScript
22.4%
CSS
10.2%
HTML
5.6%
Dockerfile
1.1%
Other
0.9%