End-to-end demand forecasting using Multiple Linear Regression, FastAPI, and React.
Stock_Inventory_Model/
├── data/ # Raw and processed datasets
├── models/ # Saved ML model artifacts
├── notebooks/ # Jupyter notebooks for EDA
├── backend/
│ ├── app/
│ │ ├── api/ # FastAPI route handlers
│ │ ├── models/ # Pydantic schemas
│ │ ├── services/ # Business logic (ML, RAG)
│ │ └── utils/ # Helpers
│ ├── main.py
│ └── requirements.txt
├── frontend/
│ ├── public/
│ ├── src/
│ │ ├── components/ # Reusable UI components
│ │ ├── pages/ # Dashboard, Forecast, etc.
│ │ ├── services/ # API calls
│ │ └── utils/
│ └── package.json
└── README.md
Download from Kaggle: https://www.kaggle.com/c/rossmann-store-sales/data
Place train.csv and store.csv in the data/ folder.
cd backend
pip install -r requirements.txt
python -m app.services.train_model # Train and save model
uvicorn main:app --reload --port 8000cd frontend
npm install
npm start # Runs on http://localhost:3000| Method | Endpoint | Description |
|---|---|---|
| GET | / | Health check |
| POST | /predict | Predict sales demand |
| POST | /recommend | Get stock recommendation |
| POST | /ai-insights | RAG-based insights |