How godlinspshanya/ev-health-monitoring-system works
This repository is an EV charging-station health-monitoring application with a Streamlit dashboard and FastAPI backend. Operators use the dashboard to manage station, telemetry, maintenance, staffing, and operational records; they can also request machine-learning failure predictions and inspect historical data and alerts. The backend validates requests, runs prediction logic, and persists records in SQLite. The README also documents REST endpoints and Swagger API documentation. Edges reflect the shown dashboard/API/backend and backend/storage relationships; unsampled implementation details are omitted.
Main entry points: main.py REST endpoints · models Domain records · schemas Request schemas · dashboard.py Health dashboard
Components 15
Operator interface
- Health dashboard
frontend/dashboard.py - HTTP API client
frontend/api.py
Backend services
- REST endpoints
backend/main.py - User management
backend/main.py - Station management
backend/main.py - Telemetry records
backend/main.py - Maintenance records
backend/main.py - Operational records
backend/main.py - Request schemas
backend/schemas
Prediction
- Prediction endpoint
backend/main.py - Failure predictor
backend/ml/predict.py - Model training
backend/ml/train_model.py
Persistence
- Domain records
backend/models - SQLite database
predictive_maintenance_process.db
Other components
- Operator
Connections 23
- Operator → Health dashboard: uses
- Health dashboard → HTTP API client: calls
frontend/dashboard.py - HTTP API client → REST endpoints: sends HTTP
frontend/api.py - REST endpoints → User management: routes
backend/main.py - REST endpoints → Station management: routes
backend/main.py - REST endpoints → Telemetry records: routes
backend/main.py - REST endpoints → Maintenance records: routes
backend/main.py - REST endpoints → Operational records: routes
backend/main.py - REST endpoints → Prediction endpoint: routes
backend/main.py - User management → Request schemas: validates with
backend/main.py - Station management → Request schemas: validates with
backend/main.py - Telemetry records → Request schemas: validates with
backend/main.py - Maintenance records → Request schemas: validates with
backend/main.py - Prediction endpoint → Request schemas: validates with
backend/main.py - User management → Domain records: queries and writes
backend/main.py - Station management → Domain records: queries and writes
backend/main.py - Telemetry records → Domain records: queries and writes
backend/main.py - Maintenance records → Domain records: queries and writes
backend/main.py - Operational records → Domain records: queries and writes
backend/main.py - Prediction endpoint → Domain records: saves result
backend/main.py - Domain records → SQLite database: uses database base
backend/models/alert.py - REST endpoints → SQLite database: creates schema and sessions
backend/main.py - Prediction endpoint → Failure predictor: requests prediction
backend/main.py