BalanceAI is an AI-powered student planning app that helps users build a weekly schedule, detect burnout risk, and generate a healthier optimized plan.
- Freeman Yiu - Integration / Repo Lead / QA
- Youcheng Taing - Scheduler / Optimizer
- Yen Nguyen - Frontend / UX (React)
- Matthew Yeung - Burnout Detection Engine
Users can enter:
- Classes
- Work shifts
- Assignments and study tasks
- Deadlines
- Personal workload preferences
The app then:
- analyzes burnout risk
- explains why a schedule looks unhealthy
- optimizes task placement around fixed commitments
- compares the original and improved weekly plan
BalanceAI uses a hybrid AI approach rather than a chatbot-based approach.
It combines:
- rule-based burnout scoring
- heuristic and constraint-based scheduling
- explainable workload insights
This means the system makes intelligent planning decisions and produces recommendations based on schedule structure, deadlines, workload limits, and recovery time.
- React
- Vite
- FastAPI
- Python
- Scheduler / optimizer in
src/scheduler/ - Burnout scoring in
src/burnout/ - API and integration pipeline in
src/api/andsrc/integration/
- A Streamlit demo entrypoint still exists in
app.py, but the main app flow is now React + FastAPI.
frontend/ React frontend
src/api/ FastAPI server
src/integration/ Shared pipeline and analysis helpers
src/scheduler/ Scheduling and optimization logic
src/burnout/ Burnout scoring and explanation logic
tests/ Backend pytest suite
docs/ Contracts and notes
- The user enters schedule data in the React frontend.
- The frontend sends a JSON payload to
POST /api/analyze. - The backend builds a baseline plan.
- The scheduler generates an optimized schedule.
- The burnout engine scores both the baseline and optimized plans.
- The frontend displays burnout insights and before-vs-after comparison views.
GET /api/health
Returns:
{ "status": "ok" }POST /api/analyze
Example request:
{
"commitments": [
{ "title": "CS 101", "day": "Mon", "start": 9.0, "end": 10.5 }
],
"tasks": [
{ "title": "Essay Draft", "duration": 2.0, "deadline_day": "Tue" }
],
"sleep_window": { "start": 23.0, "end": 7.0 },
"preferences": {
"max_daily_hours": 8.0,
"preferred_study_start": 7.0,
"preferred_study_end": 22.0,
"slot_step": 0.5,
"buffer_hours": 1.0,
"weekly_hours_threshold": 50.0,
"late_night_cutoff": 23.0,
"max_consecutive_blocks": 3,
"min_breaks_per_day": 1,
"deadline_cluster_days": 2
}
}The response includes:
before_planafter_planbefore_assessmentafter_assessmentmetadata
See docs/scheduler_contract.md for the scheduler contract.
git clone <your-repo-url>
cd HackathonAIWellbeing26Create and activate a virtual environment:
python3 -m venv .venv
source .venv/bin/activateInstall backend dependencies:
pip install -r requirements.txtStart the FastAPI backend:
uvicorn src.api.server:app --reload --port 8000The backend will run at:
http://127.0.0.1:8000
In a new terminal:
cd frontend
npm installStart the frontend:
npm run devThe frontend will run at a Vite local URL, usually:
http://127.0.0.1:5173
- Open the frontend in your browser
- Add commitments and tasks
- Click
Analyze and Optimize - View burnout analysis and before-vs-after schedule comparison
From the project root:
source .venv/bin/activate
pytest -qBuild the frontend:
cd frontend
npm run buildRun the legacy Streamlit demo:
source .venv/bin/activate
streamlit run app.py- The frontend currently expects the backend at
http://127.0.0.1:8000. - If the backend is not running, the frontend cannot analyze schedules.
- Backend tests cover scheduler logic, burnout logic, and API behavior.
- Calendar export
- Authentication
- Mobile-friendly packaging
- Smarter personalization
- Calendar integrations
MIT License