A self-contained inventory forecasting lab: a local FastAPI mini-WMS backed by SQLite, FIFO batch consumption, Prophet-based per-product demand forecasting, and an evaluation harness that scores every forecast against held-out actuals with MAE/MAPE and comparison plots.
Built as my Database & Data Management Systems course project (VIT, SEM5), developed alongside my warehouse-management internship work at Sandvik Rock Tools — this repo is the fully synthetic, self-contained academic companion. An IEEE-format paper accompanies the work (withheld from the repo pending employer co-author sign-off).
seed synthetic products & transactions (app/data_generator_min.py, app/seed.py)
↓
FastAPI mini-WMS: products, FIFO batch consumption (app/main.py, app/fifo.py)
↓
per-product Prophet forecasts, 30-day horizon (app/forecast_all.py)
↓
evaluation: MAE / MAPE vs held-out actuals + plots (app/compare.py, app/report_*.py)
| Metric | Value |
|---|---|
| MAE | 3.4 – 6.3 units/day across products |
| MAPE | 30% – 237% |
MAPE is reported but unstable on intermittent, low-volume demand — when
actual daily demand is near zero, small absolute errors explode the percentage
(PROD-003's 237% is 6 units of MAE on a slow mover). That behaviour, and why
MAE is the better headline metric for this data, is exactly what the
evaluation harness is built to expose. Full numbers in
results/metrics_hist_30d.csv.
pip install -r requirements.txt
python -m app.seed # create wms.db with synthetic data
uvicorn app.main:app --reload # mini-WMS API on :8000
python -m app.forecast_all # per-product 30-day forecasts
python -m app.compare # MAE/MAPE + comparison plotsFastAPI · SQLAlchemy · SQLite · Prophet · pandas · Matplotlib
