How maarckz/inventory works
INVENTORY is a Flask-based corporate asset inventory and security-operations application. Its primary workflow gathers Wazuh agent telemetry and independently discovers agentless network devices, persists both inventory domains, then serves dashboards, machine records, topology documentation, alerts, reports, and AI assistance to authenticated users. The map preserves those distinct stages and the NetScope discovery/documentation branches. Some subsystems are documented or named in the source index but were not sampled; their links are included only where README or indexed references support them.
Main entry points: netscope.py Topology API · app.py Flask app · netscope_core.py Device documentation · models.py Data models
Components 27
Web application
- Flask app
core/app.py - Authentication
routes/auth.py - Machine records
routes/machines.py - Dashboard
routes/dashboard.py - Settings
routes/settings.py
Wazuh inventory
- Wazuh collector
utils/collector.py
NetScope topology
- Topology API
routes/netscope.py - Network discovery
services/netscope_discovery.py - Scan engine
services/netscope_engine.py - Device documentation
services/netscope_core.py - Agent bridge
services/netscope_wazuh_bridge.py - Topology snapshots
services/netscope_snapshots.py - Switch mapping
services/netscope_switches.py - Port scanning
services/netscope_portscan.py - Topology export
services/netscope_export.py
Analysis and alerts
- Inventory statistics
services/stats.py - Notification center
services/notifications.py - Assistant API
routes/assistant.py - AI assistant
services/assistant.py - PDF reports
utils/pdf_export.py
Persistence and services
- Data models
models.py - PostgreSQL
- Cache
utils/cache.py
Other components
- IT operator
- Wazuh Manager
- Local network
- Redis
Connections 38
- IT operator → Flask app: uses
README.md - Flask app → Authentication: registers routes
core/app.py - Flask app → Dashboard: registers routes
core/app.py - Flask app → Machine records: registers routes
core/app.py - Flask app → Settings: registers routes
core/app.py - Flask app → Topology API: registers blueprint
core/app.py - Flask app → Assistant API: registers blueprint
core/app.py - Wazuh Manager → Wazuh collector: supplies telemetry
README.md - Wazuh collector → PostgreSQL: persists inventory
README.md - Topology API → Scan engine: invokes scans
routes/netscope.py - Topology API → Device documentation: uses device store
routes/netscope.py - Topology API → Network discovery: uses discovery
routes/netscope.py - Topology API → Agent bridge: uses agent bridge
routes/netscope.py - Topology API → Topology snapshots: uses snapshots
routes/netscope.py - Topology API → Switch mapping: uses switch mapping
routes/netscope.py - Topology API → Port scanning: uses port scans
routes/netscope.py - Topology API → Topology export: uses export
routes/netscope.py - Local network → Network discovery: provides hosts
README.md - Scan engine → Device documentation: records scan results
services/netscope_engine.py - Scan engine → Agent bridge: syncs agents
services/netscope_engine.py - Network discovery → Device documentation: updates devices
services/netscope_discovery.py - Agent bridge → Device documentation: merges agent data
services/netscope_wazuh_bridge.py - Device documentation → Data models: queries device records
services/netscope_core.py - Dashboard → Inventory statistics: loads statistics
routes/dashboard.py - Dashboard → Device documentation: loads topology data
routes/dashboard.py - Machine records → Inventory statistics: uses inventory helpers
routes/machines.py - Assistant API → AI assistant: delegates requests
routes/assistant.py - AI assistant → Data models: reads host and chat data
services/assistant.py - AI assistant → Device documentation: uses network context
services/assistant.py - IT operator → Notification center: receives alerts
README.md - Notification center → Device documentation: checks network conflicts
services/notifications.py - Notification center → Data models: stores alert settings
services/notifications.py - IT operator → PDF reports: requests reports
README.md - Settings → PDF reports: exports reports
routes/settings.py - Inventory statistics → Data models: queries inventory
services/stats.py - Data models → PostgreSQL: maps relational records
README.md - Dashboard → Cache: caches dashboard data
routes/dashboard.py - Cache → Redis: uses when configured
utils/cache.py