Strategix is an interactive bank campaign intelligence app that predicts which customers are most likely to subscribe to a term deposit. It combines a FastAPI machine-learning backend with a polished React/Vite frontend for lead prioritization, ROI simulation, model explainability, and manager-ready campaign briefs.
- React dashboard with responsive, Apple-inspired UI
- FastAPI backend serving both API endpoints and the production React build
- Random Forest classification model trained from the bank marketing dataset
- Pre-call customer scoring with
durationexcluded to avoid data leakage - Ranked lead queue with score filters, priority filters, age/job filters, and CSV export
- ROI simulator for campaign threshold, call cost, revenue, profit, and calls saved
- Model explainability with feature importance and score-band validation
- Live customer profile testing through
/api/predict - Editable manager brief and recommended call-list export
- Frontend: React, Vite, CSS
- Backend: FastAPI, Uvicorn
- Data/ML: pandas, NumPy, scikit-learn
- Dataset:
bank-additional-full.csv
Bank-Datathon/
|-- app.py # FastAPI backend and ML pipeline
|-- bank-additional-full.csv # Required dataset
|-- model.pkl # Existing model artifact, not required by current app
`-- frontend/
|-- package.json
|-- vite.config.js
|-- index.html
`-- src/
|-- App.jsx # Main React application
|-- main.jsx
`-- styles.css # UI theme and interactions
Clone the repository and move into the project folder:
git clone <your-repo-url>
cd Bank-DatathonInstall Python dependencies:
pip install fastapi uvicorn pandas numpy scikit-learn pydanticInstall frontend dependencies:
cd frontend
npm installBuild the React frontend:
npm run buildReturn to the project root:
cd ..Run the app:
python -m uvicorn app:app --host 127.0.0.1 --port 8000Open the website:
http://127.0.0.1:8000
Use two terminals.
Terminal 1, from the project root:
python -m uvicorn app:app --host 127.0.0.1 --port 8000Terminal 2:
cd frontend
npm run devOpen:
http://127.0.0.1:5173
Vite proxies /api requests to the FastAPI backend on port 8000.
GET /api/health
GET /api/bootstrap
POST /api/predict
Example prediction request:
{
"profile": {
"age": 40,
"job": "admin.",
"marital": "married",
"education": "university.degree",
"default": "no",
"housing": "yes",
"loan": "no",
"contact": "cellular",
"month": "may",
"day_of_week": "mon",
"campaign": 1,
"pdays": 999,
"previous": 0,
"poutcome": "nonexistent",
"emp.var.rate": 1.1,
"cons.price.idx": 93.994,
"cons.conf.idx": -36.4,
"euribor3m": 4.857,
"nr.employed": 5191.0
}
}bank-additional-full.csvmust be present in the project root.- The current FastAPI app trains and caches the model at runtime from the CSV.
durationis intentionally removed from features because it is only known after a customer call.frontend/dist/is generated bynpm run buildand is served by FastAPI in production mode.
python -m py_compile app.pycd frontend
npm run buildInvoke-WebRequest -UseBasicParsing http://127.0.0.1:8000/api/healthThis project is for educational and hackathon/demo use. Add a license file before publishing if you plan to distribute or reuse it publicly.
- Anuja Sawant Email : sawantanuja16@gmail.com
- Varshith Sai Manchem Email : manchemvarshith123@gmail.com
