How tannyzazanaja/netmonitor works
NetMonitor is a web-based network monitoring dashboard. Operators authenticate, configure sites and devices or discover them, then review live status, traffic, services, alerts, analytics, and topology. The backend exposes the API, coordinates monitoring and alerting, and stores configuration in JSON; Prometheus provides historical metrics. The graph follows documented product flow and sampled imports/calls. Some topology, analytics, and server internals were not excerpted, so their detailed links are omitted or marked unverified.
Main entry points: App.jsx App routing · server.js Backend API · DeviceContext.jsx Device state · storageService.js Storage API client
Components 33
Web application
- App routing
src/App.jsx - Dashboard
src/components/dashboard/DashboardView.jsx - Device manager
src/components/devices/DeviceManagerView.jsx - Device discovery
src/components/discovery/ScannerModal.jsx - Traffic view
src/components/traffic/TrafficView.jsx - Services view
src/components/services/ServicesView.jsx - Alerts view
src/components/alerts/AlertsView.jsx - Settings and sites
src/components/settings/SettingsView.jsx - Analytics
src/components/analytics/AnalyticsView.jsx - Topology map
src/components/topology/TopologyView.jsx
Client state and services
- Authentication state
src/context/AuthContext.jsx - Device state
src/context/DeviceContext.jsx - Settings and Prometheus client
src/context/SettingsContext.jsx - Alert state and stream
src/context/AlertContext.jsx - Topology discovery state
src/context/TopologyContext.jsx - Storage API client
src/services/storageService.js - Prometheus client
src/services/prometheusService.js - Topology engine
src/services/topologyEngine.js - Alert storage client
src/services/alertStorage.js - Auth API client
src/services/authService.js - Toast notifications
src/context/ToastContext.jsx
Backend operations
- Backend API
server/server.js - Network scanner
server/scanner.js - SNMP mapping
server/snmpMapper.js - Backup and restore
server/services/backup.js - Prometheus SNMP setup
server/setupPrometheusSnmp.js
Monitoring services
- Prometheus
- Blackbox / SNMP exporters
Persistence
- JSON configuration store
Other components
- IT operator
- Browser
- Network devices
- LINE / webhook
Connections 46
- IT operator → Browser: uses
README.md - Browser → App routing: opens
README.md - App routing → Authentication state: provides context
src/App.jsx - App routing → Settings and Prometheus client: provides context
src/App.jsx - App routing → Device state: provides context
src/App.jsx - App routing → Topology discovery state: provides context
src/App.jsx - App routing → Alert state and stream: provides context
src/App.jsx - App routing → Dashboard: routes to
src/App.jsx - App routing → Device manager: routes to
src/App.jsx - App routing → Traffic view: routes to
src/App.jsx - App routing → Services view: routes to
src/App.jsx - App routing → Alerts view: routes to
src/App.jsx - App routing → Settings and sites: routes to
src/App.jsx - App routing → Analytics: routes to
src/App.jsx - App routing → Topology map: routes to
src/App.jsx - Device manager → Device discovery: opens scanner
src/components/devices/DeviceManagerView.jsx - Authentication state → Auth API client: calls
src/context/AuthContext.jsx - Device state → Storage API client: loads and saves
src/context/DeviceContext.jsx - Device state → Settings and Prometheus client: reads settings
src/context/DeviceContext.jsx - Settings and Prometheus client → Storage API client: syncs settings
src/context/SettingsContext.jsx - Settings and Prometheus client → Prometheus client: checks connection
src/context/SettingsContext.jsx - Alert state and stream → Alert storage client: loads and saves alerts
src/context/AlertContext.jsx - Topology discovery state → Topology engine: runs discovery and layouts
src/context/TopologyContext.jsx - Topology discovery state → Storage API client: persists positions
src/context/TopologyContext.jsx - Dashboard → Device state: reads status
src/components/dashboard/DashboardView.jsx - Dashboard → Alert state and stream: reads alerts
src/components/dashboard/DashboardView.jsx - Traffic view → Prometheus client: queries metrics
src/services/prometheusService.js - Traffic view → Device state: reads devices
src/components/traffic/TrafficView.jsx - Services view → Device state: reads devices
src/components/services/ServicesView.jsx - Alerts view → Alert state and stream: reads alerts
src/components/alerts/AlertsView.jsx - Settings and sites → Storage API client: uses settings storage
src/components/settings/SettingsView.jsx - Device discovery → Backend API: requests scan
- Backend API → Network scanner: uses scanner
server/server.js - Network scanner → SNMP mapping: uses mapping
server/scanner.js - Backend API → SNMP mapping: uses mapping
server/server.js - Backend API → Backup and restore: uses backup
server/server.js - Backend API → JSON configuration store: reads and writes
README.md - Backend API → Prometheus: queries metrics
README.md - Backend API → Prometheus: updates targets
README.md - Blackbox / SNMP exporters → Network devices: collects probes
README.md - Blackbox / SNMP exporters → Prometheus: exports metrics
README.md - Backend API → Browser: streams SSE
README.md - Backend API → LINE / webhook: sends alerts
README.md - Prometheus SNMP setup → Prometheus: configures SNMP
- Alert storage client → Backend API: requests alert API
src/services/alertStorage.js - Storage API client → Backend API: requests storage API
src/services/storageService.js