How olalie/tapmap works
TapMap is a local network-activity visualizer. Its principal workflow scans sockets, identifies applications, enriches public IPs with GeoIP data, and renders live connections on a map. Separate branches provide rolling-history insights, daily reports, significant-connection events and notifications, unmapped-service and open-port views, and GeoIP database management. The app coordinates these features; sampled source confirms some internal calls, while other relationships below are grounded in the README. Unsampled implementation details are not inferred beyond documented capabilities.
Main entry points: app.py Dash application · model.py Snapshot builder · runtime.py Runtime context · service.py GeoDB management
Components 30
Runtime and orchestration
- Dash application
src/tapmap/app.py - Runtime context
src/tapmap/runtime.py - Configuration
src/tapmap/config.py - App directories
src/tapmap/app_dirs.py
Connection enrichment
- Snapshot builder
src/tapmap/model/model.py - Socket discovery
src/tapmap/model/netinfo.py - Application identity
src/tapmap/model/appinfo/app_info.py - IP geolocation
src/tapmap/model/geoinfo.py - Service bookkeeping
src/tapmap/state/service_entries.py
Map and exploration
- Live map
src/tapmap/ui/map_view.py - Service details
src/tapmap/ui/service_point_view.py - Network tools
src/tapmap/ui/modal_view.py - Unmapped services
src/tapmap/ui/unmapped_view.py
History and insights
- Connection state
src/tapmap/state/connection_state.py - Insights analytics
src/tapmap/state/insights.py - Insights state
src/tapmap/state/insights_state.py - Daily report analytics
src/tapmap/state/daily_report.py - History persistence
src/tapmap/insights_persistence.py - Significant events
src/tapmap/state/significance.py - Event persistence
src/tapmap/significant_connections_persistence.py
Tools and integrations
- GeoDB management
src/tapmap/geodb/service.py - MaxMind provider
src/tapmap/geodb/maxmind.py - DB-IP provider
src/tapmap/geodb/dbip.py - Notification dispatch
src/tapmap/notifications/channel.py - Desktop notifications
src/tapmap/notifications/desktop.py - MQTT notifications
src/tapmap/notifications/mqtt.py - System tray
src/tapmap/tray.py - Login autostart
src/tapmap/state/autostart.py
Other components
- Desktop user
- MQTT broker
Connections 29
- Desktop user → Dash application: opens
README.md - Dash application → Runtime context: configures
src/tapmap/app.py - Runtime context → Configuration: reads defaults
src/tapmap/runtime.py - Runtime context → App directories: resolves paths
src/tapmap/runtime.py - Dash application → Snapshot builder: requests snapshots
src/tapmap/app.py - Snapshot builder → Socket discovery: scans sockets
src/tapmap/model/model.py - Snapshot builder → Application identity: enriches apps
src/tapmap/model/model.py - Snapshot builder → IP geolocation: looks up IPs
src/tapmap/model/model.py - Dash application → GeoDB management: manages databases
src/tapmap/app.py - GeoDB management → MaxMind provider: downloads and validates
src/tapmap/geodb/service.py - GeoDB management → DB-IP provider: downloads and validates
src/tapmap/geodb/service.py - Dash application → Connection state: updates state
src/tapmap/app.py - Connection state → Service bookkeeping: merges applications
- Dash application → Live map: renders map
README.md - Dash application → Service details: prepares map details
src/tapmap/ui/service_point_view.py - Dash application → Network tools: renders tool screens
src/tapmap/app.py - Dash application → Unmapped services: shows unmapped services
- Dash application → Insights analytics: analyzes activity
src/tapmap/app.py - Dash application → Insights state: maintains history
src/tapmap/app.py - Insights state → History persistence: persists history
src/tapmap/insights_persistence.py - Dash application → Daily report analytics: builds report
- Dash application → Significant events: records new activity
src/tapmap/app.py - Significant events → Event persistence: persists events
- Dash application → Notification dispatch: dispatches events
- Notification dispatch → Desktop notifications: sends desktop alerts
- Notification dispatch → MQTT notifications: publishes MQTT
- MQTT notifications → MQTT broker: publishes events
README.md - Dash application → System tray: controls lifecycle
README.md - Dash application → Login autostart: configures login launch
README.md