Project Foresight is an end-to-end, enterprise-ready AI-powered demand & inventory intelligence platform. Designed to bridge the gap between machine learning research and production operations, it offers capabilities in demand forecasting, customer segmentation, churn prediction, inventory optimization, and robust model monitoring.
The interactive dashboard is deployed and active on Streamlit Community Cloud: 🔗 Project Foresight Streamlit Dashboard
A comprehensive, day-by-day development journal of this project (from raw data generation to load testing) has been compiled: 📄 Day-wise Project Report (or view online on GitHub: Project Report on GitHub)
├── .github/ # GitHub workflow and CI/CD configurations
├── airflow/
│ └── dags/
│ └── project_foresight_retrain.py # Airflow retraining MLOps DAG
├── app/
│ ├── main.py # Streamlit main entrypoint
│ ├── utils/ # Visualizations & data utility functions
│ └── views/ # Custom dashboard views (forecasting, segments, etc.)
├── data/
│ ├── raw/ # Raw customer transaction datasets
│ └── processed/ # Engineered features and cleaned data
├── k8s/
│ └── deployment.yaml # Kubernetes HPA and Service deployment manifests
├── monitoring/
│ ├── grafana/ # Dashboard templates for Grafana
│ ├── metrics_api.py # FastAPI Prometheus exporter service
│ └── prometheus.yml # Prometheus scrape configuration
├── reports/ # Auto-generated model evaluation reports
├── tests/
│ └── load/
│ └── locustfile.py # Locust load-testing script
├── 01_eda.ipynb # Exploratory Data Analysis notebook
├── 02_cleaning_features.ipynb # Feature cleaning and engineering notebook
├── 03_segmentation.ipynb # RFM customer segmentation notebook
├── 04_timeseries_prep.ipynb # Time-series preprocessing notebook
├── 05_prophet_baseline.ipynb # Prophet forecasting baseline notebook
├── 06_lstm_forecaster.ipynb # Deep learning PyTorch LSTM forecaster notebook
├── 08_hybrid_ensemble.ipynb # Hybrid ensemble forecaster notebook
├── 09_churn_xgboost.ipynb # XGBoost customer churn model notebook
├── 10_inventory_optimization.ipynb # Safety stock and EOQ optimizer notebook
├── 11_optuna_tuning.ipynb # Hyperparameter optimization using Optuna notebook
├── 12_drift_evidently.ipynb # Model & data drift evaluation notebook
├── 13_day.ipynb ... 27_day.ipynb # Daily execution, pipeline, and feedback notebooks
├── DEPLOYMENT.md # Streamlit Cloud deployment instructions
├── Dockerfile # Multi-stage production container build
├── LICENSE # MIT License text
└── requirements.txt # Main python packages & dependencies
Clone the repository and install all python dependencies inside a virtual environment:
# Create and activate virtual environment
python -m venv venv
venv\Scripts\activate # On Windows
# Install requirements
pip install -r requirements.txt
Launch the Streamlit web dashboard:
streamlit run app/main.py
Open http://localhost:8501 in your browser to view the Project Foresight Dashboard.
Start the FastAPI exporter to feed mock/live MLOps metrics (like AUC, MAPE, Drift score) to Prometheus:
uvicorn monitoring.metrics_api:app --host 0.0.0.0 --port 8000
Access the metrics endpoint at http://localhost:8000/metrics.
Run Locust to verify deployment performance and capacity:
locust -f tests/load/locustfile.py
To build and run the production-ready, multi-stage Docker container:
# Build the Docker image
docker build -t project-foresight:latest .
# Run the container locally
docker run -d -p 8501:8501 --name foresight-service project-foresight:latest
To deploy the service on a Kubernetes cluster with a load balancer and Horizontal Pod Autoscaler (HPA):
kubectl apply -f k8s/deployment.yaml
This project is licensed under the MIT License. See the LICENSE file for the full text.
MIT License
Copyright (c) 2026 Project Foresight Authors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.