How jdpoorani33/predictive-new works
This repository is an industrial SCADA digital-twin and predictive-maintenance platform. Its primary workflow simulates or receives multi-PLC sensor telemetry, serves live status and history through a FastAPI backend, derives health/anomaly and remaining-useful-life estimates, and presents operational, analytics, maintenance, and evaluation views in a React frontend. Separate time-, frequency-, and TSFresh feature pipelines support model integration and benchmarking. The graph reflects README-documented capabilities and shown imports/calls; unsampled backend routes and model internals are represented conservatively.
Main entry points: main.py FastAPI Service · App.jsx Web App Shell · simulator.py PLC Simulator · api.js API Client
Components 22
Telemetry Simulation
- PLC Simulator
simulator/simulator.py - Dataset Generator
datasets/dataset_generator.py
Backend and Inference
- FastAPI Service
main.py - Preprocessing
preprocessing/preprocessing.py - RUL Prediction
model/predict.py - Maintenance Policy
model/maintenance_engine.py - Model Validation
model/validation.py
Feature Engineering
- Time Features
time_features.py - FFT Features
frequency_features.py - TSFresh Features
tsfresh_features.py - ML Integration
ml_pipeline.py
SCADA Frontend
- Web App Shell
frontend/src/App.jsx - API Client
frontend/src/services/api.js - Live Dashboard
frontend/src/pages/Dashboard.jsx - Telemetry Charts
frontend/src/components/LiveChart.jsx - Analytics View
frontend/src/pages/Analytics.jsx - Maintenance View
frontend/src/pages/Maintenance.jsx - Model Evaluation
frontend/src/components/ModelEvaluation.jsx - PLC ID Validation
frontend/src/utils/plcValidation.js - Critical Alerts
frontend/src/components/CriticalAlertModal.jsx
Other components
- Operator
- MQTT Broker
Connections 24
- Operator → Web App Shell: uses dashboard
README.md - PLC Simulator → MQTT Broker: publishes telemetry
simulator/simulator.py - Dataset Generator → PLC Simulator: uses simulation
datasets/dataset_generator.py - MQTT Broker → FastAPI Service: supplies telemetry
- FastAPI Service → PLC Simulator: initializes simulation
main.py - FastAPI Service → RUL Prediction: uses inference
main.py - FastAPI Service → Maintenance Policy: uses maintenance policy
main.py - FastAPI Service → Preprocessing: uses preprocessing
main.py - FastAPI Service → Model Validation: uses validation
main.py - Time Features → ML Integration: feeds feature fusion
README.md - FFT Features → ML Integration: feeds feature fusion
README.md - TSFresh Features → ML Integration: feeds feature fusion
README.md - Operator → PLC Simulator: runs digital twin
README.md - Web App Shell → API Client: requests API data
frontend/src/App.jsx - API Client → FastAPI Service: calls HTTP endpoints
frontend/src/services/api.js - Web App Shell → Live Dashboard: renders dashboard
frontend/src/App.jsx - Web App Shell → Analytics View: renders analytics
frontend/src/App.jsx - Web App Shell → Maintenance View: renders maintenance
frontend/src/App.jsx - Live Dashboard → Telemetry Charts: renders trends
frontend/src/pages/Dashboard.jsx - Live Dashboard → PLC ID Validation: validates PLC IDs
frontend/src/pages/Dashboard.jsx - Web App Shell → Critical Alerts: renders alerts
frontend/src/App.jsx - Model Evaluation → API Client: requests metrics
frontend/src/components/ModelEvaluation.jsx - Telemetry Charts → API Client: requests predictions
frontend/src/components/LiveChart.jsx - Operator → Model Evaluation: reviews benchmarks
README.md