AI-Powered Retail Analytics Platform built using Machine Learning, FastAPI, Streamlit, and PostgreSQL.
- 30-day sales forecasting
- Prophet based predictions
- Forecast visualization
- Future sales CSV export
- K-Means clustering
- Segment visualization
- Customer grouping analysis
- Churn risk scoring
- SHAP Explainability
- High-risk customer identification
- ABC Analysis
- EOQ Calculation
- Safety Stock Estimation
- Reorder Point Prediction
- Drift Monitoring
- Stockout Alerts
- Churn Spike Detection
- KPI Tracking
| Layer | Technology |
|---|---|
| Backend | FastAPI |
| Dashboard | Streamlit |
| Database | PostgreSQL |
| ML Models | Scikit-Learn |
| Forecasting | Prophet |
| Visualization | Matplotlib |
| Data Processing | Pandas |
| Deployment | Streamlit Cloud |
NeuralRetail/
├── docs/
├── models/
│ ├── churn.pkl
│ ├── kmeans.pkl
│ ├── prophet.pkl
│ └── scaler.pkl
│
├── reports/
│ ├── abc_chart.png
│ ├── forecast.png
│ ├── future_30_days.csv
│ ├── segments.png
│ └── shap_summary.png
│
├── src/
│ ├── api/
│ │ └── main.py
│ │
│ ├── dashboard/
│ │ └── app.py
│ │
│ ├── forecasting/
│ ├── inventory/
│ ├── churn/
│ ├── segmentation/
│ └── database/
│
├── requirements.txt
├── README.md
└── .gitignoreClone repository
git clone https://github.com/NipurnCoder/NeuralRetail.git
cd NeuralRetailCreate virtual environment
python -m venv venvActivate environment
venv\Scripts\activatesource venv/bin/activateInstall dependencies
pip install -r requirements.txtStart PostgreSQL
Create database
CREATE DATABASE neuralretail;Run schema
\i schema.sqluvicorn src.api.main:app --reloadAPI
http://127.0.0.1:8000streamlit run src/dashboard/app.pyDashboard URL
http://localhost:8501| Model | Purpose |
|---|---|
| KMeans | Segmentation |
| Prophet | Forecasting |
| Random Forest | Churn Prediction |
| EOQ | Inventory Planning |
| ABC Analysis | Product Categorization |
Overview Dashboard
Forecasting Dashboard
Customer Segmentation
Churn Dashboard
Inventory Optimization
Monitoring Dashboard
✔ Forecast Accuracy
✔ Churn AUC
✔ Stockout Reduction
✔ Inventory Savings
✔ Customer Segmentation
✔ Demand Prediction
- Docker Deployment
- CI/CD Pipeline
- Authentication
- Kafka Streaming
- Redis Cache
- Grafana Monitoring
- Kubernetes Deployment
NIPURN
B-Tech CSE | AI Engineer | Data Science Enthusiast
LiveDemo: https://neuralretail-qtssqfjelxkmmnlf936c5k.streamlit.app/
GitHub: https://github.com/NipurnCoder
⭐ If you found this project useful, consider giving it a star.