How abdulrahimabubakari/ev-battery-soh-api works
This repository is an EV battery State-of-Health prediction product: users submit cycle features or raw CSV data through a React dashboard/API and receive SoH estimates and degradation visualizations. A separate ML workflow prepares labeled cycle data, engineers physics-based features, adds cycle context, and trains and tracks models. The graph also preserves the documented model-info and health capabilities. Source excerpts show the API and key training steps; unsampled runtime details and the absent model artifact limit further wiring claims.
Main entry points: data Feature table · main.py FastAPI endpoints · App.js SoH dashboard · index.js React entry
Components 14
Dashboard
- SoH dashboard
frontend/src/App.js - React entry
frontend/src/index.js - Web vitals
frontend/src/reportWebVitals.js
Prediction API
- FastAPI endpoints
api/main.py - LightGBM artifact
src
Data Preparation
- Cycle CSV data
data - Label cycles
notebooks/01_data_exploration.py - Feature extraction
src/feature_engineering.py - Cycle enrichment
src/add_cycle_number.py - Feature table
data
Model Training
- LightGBM training
src/train_lightgbm.py - XGBoost training
src/train_model.py
Other components
- Battery analyst
- MLflow tracking
Connections 14
- Battery analyst → SoH dashboard: uses
README.md - React entry → SoH dashboard: renders
frontend/src/index.js - React entry → Web vitals: invokes
frontend/src/index.js - SoH dashboard → FastAPI endpoints: requests predictions
frontend/src/App.js - FastAPI endpoints → LightGBM artifact: loads model
api/main.py - FastAPI endpoints → LightGBM artifact: predicts with
api/main.py - Label cycles → Cycle CSV data: writes labels
notebooks/01_data_exploration.py - Feature extraction → Cycle CSV data: reads cycles
src/feature_engineering.py - Feature extraction → Feature table: writes features
src/feature_engineering.py - Cycle enrichment → Feature table: updates features
src/add_cycle_number.py - LightGBM training → Feature table: reads features
src/train_lightgbm.py - XGBoost training → Feature table: reads features
src/train_model.py - LightGBM training → MLflow tracking: logs run
src/train_lightgbm.py - XGBoost training → MLflow tracking: logs run
src/train_model.py