How shashankreddyo8/deep-learning-based-anomoly-and-malware-detection-in-iot-networks works
Threat Sentinel is an IoT malware-detection product with a Flask inference backend and a SOC dashboard. The principal workflow is dashboard polling of the prediction API, followed by displaying current detections, alerts, charts, and history. The backend also includes ensemble inference and digital-twin functionality; the repository has separate model-training and evaluation code. Some backend routes, training orchestration, and digital-twin UI wiring were not sampled, so those relationships are not inferred.
Main entry points: index.tsx SOC Dashboard · DigitalTwin.tsx Twin Dashboard · app.py Flask Prediction API · predictions.ts Prediction Client
Components 26
SOC Dashboard
- SOC Dashboard
src/routes/index.tsx - Prediction Client
src/lib/predictions.ts - SOC Header
src/components/soc/Header.tsx - Device Telemetry
src/components/soc/DeviceTelemetry.tsx - Threat Status
src/components/soc/ThreatStatus.tsx - Live Prediction
src/components/soc/LivePrediction.tsx - Threat Alerts
src/components/soc/AlertBanner.tsx - Threat Charts
src/components/soc/Charts.tsx - Prediction History
src/components/soc/HistoryTable.tsx - Model Analysis
src/components/soc/ModelAnalysis.tsx - Model Comparison
src/components/soc/ModelComparison.tsx
Detection Backend
- Flask Prediction API
ml_server/app.py - Ensemble Inference
ml_server/ensemble_inference.py - Inference Engine
ml_server/inference.py - Sequence Validation
ml_server/sequence_validator.py
Digital Twin
- Twin Runtime
ml_server/digital_twin.py - Twin Detection Runner
ml_server/run_twin_detection.py - Twin Dashboard
src/components/digital-twin/DigitalTwin.tsx - Network Topology
src/components/digital-twin/NetworkTopology.tsx - Device Twin View
src/components/digital-twin/DeviceTwin.tsx - Gateway Twin View
src/components/digital-twin/GatewayTwin.tsx
Model Development
- Model Registry
src/lib/models.ts - Training Data Prep
training/data_prep.py - Model Training
training/train_models.py - Training Evaluation
training/evaluate.py
Other components
- Security Analyst
Connections 18
- Security Analyst → SOC Dashboard: views monitoring
README.md - SOC Dashboard → Prediction Client: polls predictions
src/routes/index.tsx - SOC Dashboard → SOC Header: renders
src/routes/index.tsx - SOC Dashboard → Device Telemetry: renders
src/routes/index.tsx - SOC Dashboard → Threat Status: renders
src/routes/index.tsx - SOC Dashboard → Threat Alerts: renders
src/routes/index.tsx - SOC Dashboard → Threat Charts: renders
src/routes/index.tsx - SOC Dashboard → Prediction History: renders
src/routes/index.tsx - SOC Dashboard → Model Analysis: renders
src/routes/index.tsx - SOC Dashboard → Model Registry: looks up model
src/routes/index.tsx - Prediction Client → Flask Prediction API: fetches records
README.md - Flask Prediction API → Twin Runtime: uses twin runtime
ml_server/app.py - Flask Prediction API → Ensemble Inference: uses inference
ml_server/app.py - Model Comparison → Model Registry: loads metrics
src/components/soc/ModelComparison.tsx - Training Evaluation → Training Data Prep: imports preparation
training/evaluate.py - Twin Dashboard → Network Topology
- Twin Dashboard → Device Twin View
- Twin Dashboard → Gateway Twin View