Back to projects

RetailSense AI

A demand-forecasting platform for a 54-store grocery chain, deployed twice over: Docker Compose and Kubernetes.

SWE (AI/MLOps)MLOpsForecastingFastAPIKubernetesMLflowReact

RetailSense AI is a production-grade MLOps platform forecasting daily demand across 54 stores and 33 product families for Corporacion Favorita, an Ecuadorian grocery chain. Twenty-one tracked MLflow runs compare LightGBM, XGBoost, and an ARIMA baseline; LightGBM wins a paired t-test A/B comparison (p=0.0036) at RMSE 336, MAE 230, MAPE 8.78%, a 55% RMSE improvement over the ARIMA baseline, and is registered as the production model. A FastAPI backend exposes forecast, segmentation (K-Means/GMM), SHAP explainability, A/B-test, and drift-detection endpoints, served through a React and Recharts dashboard behind Nginx. The full stack, FastAPI, React, MLflow, PostgreSQL, MinIO, was deployed twice over on the same AWS EC2 instance: once via Docker Compose and once via Kubernetes (Minikube). That EC2 instance has since been stopped, the project is presented here through its GitHub repo and screenshots.

Live dashboard on AWS EC2
Forecast input form
Forecast prediction: 2,486 units, 95% CI [1,827, 3,146], LightGBM
SHAP feature importance explainability
A/B test: LightGBM vs XGBoost paired t-test
MLflow: RMSE comparison across 21 tracked runs

What I built

  • Built a full feature-engineering pipeline (lag features, rolling statistics, date decomposition, holiday and oil-price encoding, store clustering) over 4+ years of daily sales across 54 stores and 33 product families.
  • Tracked 21 MLflow runs across LightGBM, XGBoost, ARIMA, K-Means, and GMM, selecting the production model through a paired t-test on MAE (p=0.0036) rather than a single-run comparison.
  • Registered LightGBM (RMSE 336.33, MAE 229.67, MAPE 8.78%) as the production model, a 55% RMSE improvement over the ARIMA baseline (RMSE 740.71).
  • Exposed forecast, segmentation, SHAP explainability, A/B-test, and KS-test drift-detection endpoints through a FastAPI backend, with a React and Recharts dashboard behind Nginx.
  • Deployed the same 5-service stack (frontend, backend, MLflow, MinIO, PostgreSQL) twice: via Docker Compose and via Kubernetes (Minikube) on the same AWS EC2 instance, with NodePort services exposing each Kubernetes deployment.
  • Built a KS-test based drift monitor comparing incoming request feature distributions against training data.

Tech stack

SWE (AI/MLOps)MLOpsForecastingFastAPIKubernetesMLflowReact

Key results

336.33

RMSE (LightGBM)

8.78%

MAPE

55%

RMSE improvement vs ARIMA

21

MLflow tracked runs

Back to all projects