How abdullahhussain706/ai-powered-nids works
This is a desktop hybrid network intrusion detection system. Its main workflow captures live traffic into PCAPs, parses packets into bidirectional flows, derives detection features, runs signature, two-stage ML, and anomaly detectors, fuses corroborating alerts, and persists results for desktop review. The graph also preserves documented capture management, model training, audit logging, and dashboard, alert, log, and settings capabilities. Relationships use README workflow statements and SOURCE INDEX references; unsampled subsystem links are omitted where their wiring is not shown.
Main entry points: flow_builder.py Flow builder · main_window.py Main window · packet_capture.py Live capture · fusion_engine.py Alert fusion
Components 24
Capture and flows
- Live capture
core/packet_capture.py - PCAP storage
services/pcap_storage_service.py - Packet parser
core/packet_parser.py - Flow builder
core/flow_builder.py
Detection and fusion
- Flow features
core/feature_engine.py - CICIDS features
core/cicids_feature_engine.py - Signature engine
core/signature_engine.py - JSON rules
rule - Two-stage ML
ml/model_pipeline.py - Trained models
ml/models - Anomaly engine
core/anomaly_engine.py - Alert fusion
core/fusion_engine.py - ML training and evaluation
ml/train_stage1.py
Alert persistence
- Alert manager
core/alert_manager.py - SQLite database
database/db_manager.py - JSONL audit logs
utils/logger.py
Desktop application
- Main window
ui/main_window.py - Dashboard view
ui/dashboard_view.py - Alerts view
ui/alerts_view.py - Logs view
ui/logs_view.py - Settings view
ui/settings_view.py
Other components
- Operator
- Runtime launcher
run.py - Network interface
Connections 27
- Operator → Runtime launcher: starts app
README.md - Runtime launcher → Live capture: launches backend
README.md - Runtime launcher → Main window: launches frontend
README.md - Network interface → Live capture: supplies traffic
README.md - Live capture → PCAP storage: stores captures
README.md - Live capture → Packet parser: parses captures
README.md - Packet parser → Flow builder: builds flows
README.md - Flow builder → Flow features: extracts features
README.md - Flow builder → CICIDS features: extracts CICIDS features
README.md - Flow features → Signature engine: runs rules
core/feature_engine.py - JSON rules → Signature engine: configures detection
README.md - Flow builder → Two-stage ML: classifies flows
README.md - Two-stage ML → Trained models: loads models
README.md - Flow builder → Anomaly engine: checks anomalies
README.md - Anomaly engine → CICIDS features: extracts features
core/anomaly_engine.py - Signature engine → Alert fusion: provides alerts
README.md - Two-stage ML → Alert fusion: provides alerts
README.md - Anomaly engine → Alert fusion: provides alerts
README.md - ML training and evaluation → Trained models: produces artifacts
README.md - Alert fusion → Alert manager: forwards alerts
README.md - Alert manager → SQLite database: persists alerts
core/alert_manager.py - Alert manager → JSONL audit logs: logs alerts
README.md - Main window → Dashboard view: shows dashboard
ui/main_window.py - Main window → Alerts view: shows alerts
ui/main_window.py - Main window → Logs view: shows logs
ui/main_window.py - Main window → Settings view: shows settings
ui/main_window.py - PCAP storage → Settings view: reports storage stats
ui/settings_view.py