An AI-Driven Student Retention & Adaptive Counseling System that predicts dropout risk, highlights likely reasons, recommends actions, and helps track interventions over time.
Schools often recognize risk only after a student has already disengaged. This system helps detect early warning signs, explain the root causes, and enable timely support.
- Early detection over late reaction
- Transparent, explainable AI
- Actionable insights, not just scores
- Human-centered interventions
- Continuous monitoring and improvement
- Student data is collected (attendance, marks, behavior, scholarship, and related profile indicators).
- Backend ML logic predicts dropout risk probability.
- Risk drivers and trends are surfaced through analytics/dashboard views.
- Recommendation logic provides intervention guidance.
- Dashboard and student views support ongoing monitoring and follow-up.
Languages used in this flow:
- Frontend and UI: JavaScript (React + Vite)
- Backend API and ML pipeline: Python (Flask, scikit-learn, SHAP)
- Styling: CSS/SCSS
How It Works
┌───────────────────────────────────────────────────────────┐
│ │
▼ │
Student data entered │
│ │
▼ │
┌──────────────┐ │
│ Frontend │ ─── React form + dashboard input (JavaScript)│
│ (React/Vite) │ │
└───┬──────────┘ │
│ │
▼ │
┌──────────────┐ │
│ Backend │ ─── Flask API receives student data (Python) │
│ /predict │ │
└───┬──────────┘ │
│ │
▼ │
┌──────────────┐ │
│ ML Model │ ─── Predicts dropout risk score (Python) │
└───┬──────────┘ │
│ │
▼ │
┌──────────────┐ │
│ SHAP │ ─── Explains top risk factors (Python) │
└───┬──────────┘ │
│ │
▼ │
┌───────────────┐ │
│ Recommendation│ ─── Suggests intervention actions │
│ Engine │ │
└───┬───────────┘ │
│ │
▼ │
┌──────────────┐ │
│ Dashboard │ ─── Shows risk + reasons + next actions │
│ Output │ │
└───┬──────────┘ │
│ │
▼ │
Counselor acts ───► Follow-up result? ────────────────────────┘
│
▼
Continue support,
monitor progress,
update decisions
- Dropout risk prediction (probability score)
- SHAP explanations (top contributing factors)
- Automatic counseling suggestions
- High-risk student list
- Intervention monitoring and outcomes
- Login/Sign-up (demo mode)
Run all commands from the project root (
AI-Student-Retention) unless noted.
git clone <your-repo-url>
cd AI-Student-Retentionpy -3 -m venv .venv
.\.venv\Scripts\activate
pip install --upgrade pip
pip install -r backend\requirements.txtIf py is not available, use python -m venv .venv instead.
cd frontend
npm install
cd ..- Create
frontend/.env.localwith:VITE_API_BASE_URL=http://127.0.0.1:5000 - Create
backend/.envwith:GOOGLE_CLIENT_ID=YOUR_GOOGLE_CLIENT_ID.apps.googleusercontent.com
- If
.venv\Scripts\activatefails, use direct Python path commands shown above. - If OAuth shows
origin_mismatch, ensure the origin is exactlyhttp://localhost:5300. - If frontend cannot reach backend, start backend first and verify
/health. - If running the backend, use
scripts/start-backend.ps1(PowerShell) from the project root. - For the frontend, use
scripts/start-frontend.ps1(PowerShell) from the project root. - If
scripts/start-backend.ps1says Python is missing, install Python 3.11+ and re-run the setup steps.
This repo supports one-service deployment where Flask serves both API and built React frontend.
- Push the latest code to GitHub.
- In Render, create a Blueprint and select this repo.
- Render auto-detects
render.yamland creates the web service. - Set
GOOGLE_CLIENT_IDin Render environment variables (optional, only for Google login). - Deploy and open:
https://<your-service>.onrender.com/healthhttps://<your-service>.onrender.com
Notes:
- Production uses
gunicornviaDockerfile. - Blueprint is pinned to Render free plan (
plan: free) to avoid paid-instance prompts. - Free plan storage is ephemeral. If you need persistent app-written data (
backend/data/*.json), switch to a paid plan and mount a disk at/app/backend/data.
- Academic advisors prioritizing at-risk students
- Teachers identifying class-level risk drivers
- Counselors tracking intervention impact
- Administrators monitoring retention programs
To give educators a reliable, explainable, and actionable system that improves student retention through early support and measurable interventions.
This project is licensed under the MIT License.
Made with ❤️