|
Students experience burnout during academic semesters |
Average detection time after burnout onset |
Seek help before reaching critical stress |
graph LR
A[π Tasks] --> E{π§ AI Engine}
B[π
Calendar] --> E
C[π Grades] --> E
D[β±οΈ Workload] --> E
E --> F[π― Collision]
E --> G[β‘ Volatility]
E --> H[π Recovery]
E --> I[π Drift]
F --> J[π¨ Risk Score]
G --> J
H --> J
I --> J
J --> K[π¨βπ« Proctor Alert]
J --> L[π§ Notification]
J --> M[π Dashboard]
style E fill:#6366f1,stroke:#4f46e5,color:#fff,stroke-width:3px
style J fill:#ef4444,stroke:#dc2626,color:#fff,stroke-width:3px
style K fill:#10b981,stroke:#059669,color:#fff
style L fill:#10b981,stroke:#059669,color:#fff
style M fill:#10b981,stroke:#059669,color:#fff
graph TB
subgraph "π¨ Presentation Layer"
UI1[Student Dashboard<br/>β’ Risk Visualization<br/>β’ Task Management<br/>β’ Grade Tracking]
UI2[Proctor Dashboard<br/>β’ At-Risk Students<br/>β’ Intervention Tools<br/>β’ Analytics]
UI3[Admin Console<br/>β’ User Management<br/>β’ Calendar Control<br/>β’ System Config]
end
subgraph "π Security Layer"
AUTH[JWT Authentication<br/>β’ Role-based Access<br/>β’ Token Validation<br/>β’ Session Management]
RATE[Rate Limiter<br/>β’ 100 req/min<br/>β’ IP-based throttling]
end
subgraph "π API Gateway Layer"
ROUTER[Express Router<br/>β’ /api/auth<br/>β’ /api/burnout<br/>β’ /api/tasks<br/>β’ /api/calendar<br/>β’ /api/grades<br/>β’ /api/proctor<br/>β’ /api/admin]
VALID[Request Validator<br/>β’ Schema Validation<br/>β’ Type Checking<br/>β’ Sanitization]
end
subgraph "π§ Business Logic Layer"
BP[Burnout Predictor<br/>β’ Multi-Signal Analysis<br/>β’ Risk Scoring<br/>β’ Trend Detection]
WL[Workload Calculator<br/>β’ Daily Scores<br/>β’ Weekly Aggregation<br/>β’ Task/Event Weighting]
INT[Intervention Manager<br/>β’ Alert Triggering<br/>β’ Message Queue<br/>β’ Status Tracking]
end
subgraph "π Detection Algorithms Layer"
D1[π― Collision Detector<br/>βββββββββββββββ<br/>Scan: Next 14 days<br/>Flag: β₯3 major items/week<br/>OR β₯50 hours/week<br/>βββββββββββββββ<br/>Score Impact: +30]
D2[β‘ Volatility Detector<br/>βββββββββββββββ<br/>Scan: Last 4 weeks<br/>Compare: Current vs Avg<br/>50-100% β +15<br/>100-200% β +20<br/>200%+ β +25<br/>βββββββββββββββ<br/>Score Impact: +25 max]
D3[π Recovery Detector<br/>βββββββββββββββ<br/>Scan: Last 30 days<br/>Track: High-load streaks<br/>Flag: β₯7 consecutive days<br/>High = score >10<br/>βββββββββββββββ<br/>Score Impact: +25]
D4[π Drift Detector<br/>βββββββββββββββ<br/>Scan: Last 6 months<br/>Correlate: Workload β Grades<br/>Flag: Negative trend β₯3mo<br/>Workload β + Grades β<br/>βββββββββββββββ<br/>Score Impact: +20]
end
subgraph "πΎ Data Access Layer"
DAO1[Task Repository<br/>β’ CRUD Operations<br/>β’ Deadline Queries<br/>β’ Completion Tracking]
DAO2[Event Repository<br/>β’ Calendar CRUD<br/>β’ Institutional Events<br/>β’ Personal Events]
DAO3[Signal Repository<br/>β’ Risk Score Storage<br/>β’ Historical Analysis<br/>β’ Trend Queries]
DAO4[Workload Repository<br/>β’ Daily Score Storage<br/>β’ Weekly Aggregation<br/>β’ Time-series Queries]
end
subgraph "ποΈ Database Layer"
DB[(MongoDB<br/>ββββββββββ<br/>Collections:<br/>β’ users<br/>β’ tasks<br/>β’ events<br/>β’ grades<br/>β’ signals<br/>β’ workload_scores<br/>β’ interventions)]
end
subgraph "β° Background Jobs"
CRON1[Daily Analysis Job<br/>β’ Runs: 2:00 AM<br/>β’ Analyzes all students<br/>β’ Generates signals<br/>β’ Triggers alerts]
CRON2[Weekly Report Job<br/>β’ Runs: Sunday 6:00 AM<br/>β’ Proctor summaries<br/>β’ Trend reports<br/>β’ Email distribution]
end
UI1 --> AUTH
UI2 --> AUTH
UI3 --> AUTH
AUTH --> RATE
RATE --> ROUTER
ROUTER --> VALID
VALID --> BP
VALID --> WL
VALID --> INT
BP --> D1
BP --> D2
BP --> D3
BP --> D4
D1 --> DAO1
D1 --> DAO2
D2 --> DAO4
D3 --> DAO4
D4 --> DAO3
D4 --> DAO4
WL --> DAO1
WL --> DAO2
WL --> DAO4
INT --> DAO3
DAO1 --> DB
DAO2 --> DB
DAO3 --> DB
DAO4 --> DB
CRON1 --> BP
CRON2 --> DAO3
style BP fill:#6366f1,stroke:#4f46e5,color:#fff,stroke-width:3px
style D1 fill:#f59e0b,stroke:#d97706,color:#000,stroke-width:2px
style D2 fill:#ef4444,stroke:#dc2626,color:#fff,stroke-width:2px
style D3 fill:#8b5cf6,stroke:#7c3aed,color:#fff,stroke-width:2px
style D4 fill:#ec4899,stroke:#db2777,color:#fff,stroke-width:2px
style DB fill:#10b981,stroke:#059669,color:#fff,stroke-width:3px
style CRON1 fill:#14b8a6,stroke:#0d9488,color:#fff
style CRON2 fill:#14b8a6,stroke:#0d9488,color:#fff
sequenceDiagram
participant S as π¨βπ Student
participant UI as π¨ Dashboard
participant API as π API Server
participant AUTH as π Auth
participant WL as βοΈ Workload Service
participant BP as π§ Burnout Predictor
participant D1 as π― Collision
participant D2 as β‘ Volatility
participant D3 as π Recovery
participant D4 as π Drift
participant DB as πΎ MongoDB
participant NOTIF as π§ Notification
participant P as π¨βπ« Proctor
Note over S,P: SCENARIO: Student adds new exam task
S->>UI: Add Task: "Calculus Exam"<br/>Type: exam, Effort: 5h<br/>Deadline: Feb 15
UI->>API: POST /api/tasks
API->>AUTH: Validate JWT Token
AUTH-->>API: β
Authenticated
API->>DB: Save Task Document
DB-->>API: Task Created
Note over API,WL: AUTOMATIC WORKLOAD RECALCULATION
API->>WL: calculateWorkloadScores(studentId)
WL->>DB: Fetch all tasks for next 30 days
WL->>DB: Fetch all calendar events
DB-->>WL: Tasks + Events
Note over WL: Daily Score Calculation<br/>Task Score: (5h Γ 3.0) = 15<br/>Event Score: 0<br/>Daily Total: 15
WL->>DB: Save WorkloadScore document
WL-->>API: Workload Updated
API-->>UI: β
Task Added
Note over API,BP: TRIGGER BURNOUT ANALYSIS
API->>BP: predictBurnout(studentId)
par Parallel Signal Detection
BP->>D1: detectCollisions()
D1->>DB: Query next 14 days<br/>tasks + events
DB-->>D1: 4 major items found<br/>in next 7 days
D1-->>BP: hasCollision: true<br/>score: +30
BP->>D2: detectVolatility()
D2->>DB: Query last 4 weeks<br/>workload scores
DB-->>D2: Week 1-3 avg: 47h<br/>Week 4: 107h
Note over D2: Change: +127%
D2-->>BP: hasVolatility: true<br/>score: +20
BP->>D3: detectRecoveryGap()
D3->>DB: Query last 30 days<br/>workload scores
DB-->>D3: 12 consecutive days<br/>score >10
D3-->>BP: hasRecoveryDeficit: true<br/>score: +25
BP->>D4: detectPerformanceDrift()
D4->>DB: Query last 6 months<br/>workload + grades
DB-->>D4: No correlation issue
D4-->>BP: hasDrift: false<br/>score: +0
end
Note over BP: TOTAL RISK SCORE<br/>Collision: 30<br/>Volatility: 20<br/>Recovery: 25<br/>Drift: 0<br/>ββββββββββ<br/>TOTAL: 75 (π΄ HIGH)
BP->>DB: Save Signal document<br/>score: 75, risk: "high"
DB-->>BP: β
Signal Saved
Note over BP,NOTIF: RISK THRESHOLD EXCEEDED
BP->>NOTIF: Trigger High Risk Alert
NOTIF->>DB: Get Student + Proctor info
DB-->>NOTIF: Student: John Doe<br/>Proctor: Dr. Smith
par Notification Dispatch
NOTIF->>S: π§ Email: "High Burnout Alert"
NOTIF->>P: π§ Email: "Student Alert: John Doe"
NOTIF->>DB: Log intervention required
end
BP-->>API: β
Analysis Complete
API-->>UI: Risk Score Updated
Note over S,P: Student sees updated dashboard<br/>Proctor receives alert
UI->>S: Display: π΄ Risk Score: 75<br/>β’ 4 major deadlines next week<br/>β’ 127% workload increase<br/>β’ 12 days without recovery
P->>UI: View Proctor Dashboard
UI->>API: GET /api/proctor/students
API->>DB: Fetch students with latest signals
DB-->>API: Student list with risk scores
API-->>UI: Students data
UI->>P: Display: π¨ John Doe - Risk: 75<br/>[Send Message] button
flowchart TD
START([π¬ START ANALYSIS]) --> FETCH[π₯ Fetch Student Data<br/>β’ Tasks<br/>β’ Events<br/>β’ Grades<br/>β’ Workload History]
FETCH --> PARALLEL{π Run 4 Detectors<br/>in Parallel}
PARALLEL --> C1[π― COLLISION DETECTOR]
PARALLEL --> V1[β‘ VOLATILITY DETECTOR]
PARALLEL --> R1[π RECOVERY DETECTOR]
PARALLEL --> D1[π DRIFT DETECTOR]
C1 --> C2{Next 14 days:<br/>β₯3 major items/week<br/>OR β₯50 hours?}
C2 -->|YES| C3[β
Collision Found<br/>Score: +30]
C2 -->|NO| C4[β No Collision<br/>Score: +0]
V1 --> V2[Calculate Last<br/>4 Weeks Average]
V2 --> V3{Current Week vs Avg}
V3 -->|50-100% β| V4[β οΈ Moderate Spike<br/>Score: +15]
V3 -->|100-200% β| V5[π₯ High Spike<br/>Score: +20]
V3 -->|>200% β| V6[π₯ Extreme Spike<br/>Score: +25]
V3 -->|<50% β| V7[β
Normal<br/>Score: +0]
R1 --> R2[Scan Last 30 Days<br/>for High-Load Days]
R2 --> R3{β₯7 Consecutive<br/>Days Score >10?}
R3 -->|YES| R4[β οΈ Recovery Deficit<br/>Score: +25]
R3 -->|NO| R5[β
Adequate Recovery<br/>Score: +0]
D1 --> D2[Get 6 Month<br/>Workload & Grade Trends]
D2 --> D3{Workload β<br/>while Grades β<br/>for β₯3 months?}
D3 -->|YES| D4[π Performance Drift<br/>Score: +20]
D3 -->|NO| D5[β
No Drift<br/>Score: +0]
C3 --> AGG[π AGGREGATE SCORES]
C4 --> AGG
V4 --> AGG
V5 --> AGG
V6 --> AGG
V7 --> AGG
R4 --> AGG
R5 --> AGG
D4 --> AGG
D5 --> AGG
AGG --> TOTAL{Calculate<br/>Total Score}
TOTAL --> CLASS{Classify Risk}
CLASS -->|0-29| LOW[π’ LOW RISK<br/>Healthy Pattern<br/>Continue Monitoring]
CLASS -->|30-59| MED[π‘ MEDIUM RISK<br/>Warning Signs<br/>Increase Support]
CLASS -->|60-100| HIGH[π΄ HIGH RISK<br/>Immediate Action<br/>Trigger Intervention]
LOW --> SAVE[πΎ Save Signal to DB]
MED --> SAVE
HIGH --> SAVE
SAVE --> NOTIFY{Risk Level?}
NOTIFY -->|HIGH| ALERT[π¨ Send Alerts:<br/>β’ Email Student<br/>β’ Notify Proctor<br/>β’ Dashboard Update]
NOTIFY -->|MEDIUM| DASH[π Update Dashboard]
NOTIFY -->|LOW| DASH
ALERT --> END([β
ANALYSIS COMPLETE])
DASH --> END
style START fill:#10b981,stroke:#059669,color:#fff
style PARALLEL fill:#6366f1,stroke:#4f46e5,color:#fff
style C1 fill:#f59e0b,stroke:#d97706,color:#000
style V1 fill:#ef4444,stroke:#dc2626,color:#fff
style R1 fill:#8b5cf6,stroke:#7c3aed,color:#fff
style D1 fill:#ec4899,stroke:#db2777,color:#fff
style HIGH fill:#ef4444,stroke:#dc2626,color:#fff,stroke-width:3px
style MED fill:#f59e0b,stroke:#d97706,color:#000,stroke-width:2px
style LOW fill:#10b981,stroke:#059669,color:#fff,stroke-width:2px
style END fill:#10b981,stroke:#059669,color:#fff
graph TB
subgraph TASKS["Task Types & Weights"]
T1["EXAM - Weight 3.0x - Example: 5h = 15pts"]
T2["PROJECT - Weight 2.5x - Example: 8h = 20pts"]
T3["ASSIGNMENT - Weight 1.5x - Example: 3h = 4.5pts"]
T4["QUIZ - Weight 1.0x - Example: 1h = 1pt"]
end
subgraph EVENTS["Event Types & Weights"]
E1["INSTITUTIONAL EXAM - Fixed 8.0 - Cannot skip"]
E2["REGISTRATION - Fixed 4.0 - Time-sensitive"]
E3["GENERAL EVENT - Fixed 3.0 - Workshops"]
E4["HOLIDAY - Fixed 0.0 - Rest day"]
end
subgraph CALC["Daily Score Calculation"]
C1["Formula: Daily = Task Scores + Event Scores"]
C2["Example Feb 8: Tasks 47pts + Events 14pts = 61pts"]
end
subgraph WEEK["Weekly Aggregation"]
W1["Sum of 7 Daily Scores"]
W2["Example: Mon 61 + Tue 47 + Wed 53 + Thu 12 + Fri 8 + Sat 5 + Sun 3 = 189"]
W3["Status: < 100 Normal, 100-200 High, 200+ Critical"]
end
T1 --> C1
T2 --> C1
T3 --> C1
T4 --> C1
E1 --> C1
E2 --> C1
E3 --> C1
E4 --> C1
C1 --> C2
C2 --> W1
W1 --> W2
W2 --> W3
style TASKS fill:#6366f1,stroke:#4f46e5,color:#fff
style EVENTS fill:#8b5cf6,stroke:#7c3aed,color:#fff
style CALC fill:#10b981,stroke:#059669,color:#fff
style WEEK fill:#f59e0b,stroke:#d97706,color:#000
erDiagram
USER ||--o{ TASK : "creates"
USER ||--o{ GRADE : "records"
USER ||--o{ SIGNAL : "generates"
USER ||--o{ WORKLOAD_SCORE : "has"
USER ||--o{ CALENDAR_EVENT : "creates_personal"
USER ||--o{ INTERVENTION : "receives"
USER ||--o{ INTERVENTION : "sends_as_proctor"
USER }o--|| USER : "managed_by_proctor"
SIGNAL ||--o{ INTERVENTION : "triggers"
USER {
ObjectId _id PK
string name "Required, min 2 chars"
string email UK "Required, valid email"
string password "Hashed, bcrypt"
enum role "student|proctor|admin"
ObjectId proctorId FK "Null if not student"
datetime createdAt
datetime updatedAt
}
TASK {
ObjectId _id PK
ObjectId studentId FK "Required"
string title "Required, max 200 chars"
enum type "exam|project|assignment|quiz"
datetime deadline "Required, future date"
number estimatedEffort "Hours, 0.5-24"
boolean isCompleted "Default: false"
datetime completedAt "Null if not done"
datetime createdAt
datetime updatedAt
}
CALENDAR_EVENT {
ObjectId _id PK
string title "Required, max 200 chars"
enum eventType "exam|registration|event|holiday"
datetime startDate "Required"
datetime endDate "Required, >= startDate"
boolean isInstitutional "Admin only = true"
ObjectId createdBy FK "User ID"
string venue "Optional, max 100 chars"
number priority "1-5, default 3"
string description "Optional, max 500 chars"
number duration "Hours, default 3"
datetime createdAt
}
GRADE {
ObjectId _id PK
ObjectId studentId FK "Required"
string subject "Required, max 100 chars"
string examType "Midterm|Final|Quiz|Assignment"
number marks "Required, >= 0"
number maxMarks "Required, > 0"
number percentage "Calculated: marks/maxMarks*100"
datetime date "Required, exam date"
string semester "Fall2024|Spring2025|etc"
datetime createdAt
}
WORKLOAD_SCORE {
ObjectId _id PK
ObjectId studentId FK "Required"
date date UK "Unique per student per day"
number dailyScore "Required, >= 0"
number taskScore "Default: 0"
number eventScore "Default: 0"
number weeklyScore "Rolling 7-day sum"
object breakdown "taskCount, eventCount, etc"
datetime createdAt
}
SIGNAL {
ObjectId _id PK
ObjectId studentId FK "Required"
number score "0-100, burnout risk"
enum risk "low|medium|high"
array reasons "Human-readable explanations"
object signals "collision, volatility, recovery, drift"
datetime timestamp "Default: now"
boolean acknowledged "Default: false"
datetime acknowledgedAt "Null if not acked"
}
INTERVENTION {
ObjectId _id PK
ObjectId studentId FK "Required"
ObjectId proctorId FK "Required"
ObjectId signalId FK "Signal that triggered"
string message "Required, proctor message"
string resources "Links, recommendations"
boolean acknowledged "Student confirmation"
datetime acknowledgedAt "Null if pending"
string studentResponse "Optional feedback"
datetime createdAt
datetime updatedAt
}
flowchart LR
subgraph "π₯ INPUT COLLECTIONS"
TASK[(TASK<br/>ββββββββ<br/>Student's<br/>assignments<br/>exams<br/>projects)]
EVENT[(CALENDAR_EVENT<br/>ββββββββ<br/>Institutional<br/>+ Personal<br/>events)]
GRADE[(GRADE<br/>ββββββββ<br/>Exam scores<br/>Performance<br/>history)]
end
subgraph "βοΈ PROCESSING"
WL[WORKLOAD<br/>CALCULATOR<br/>ββββββββ<br/>Daily scores<br/>Weekly totals<br/>Breakdown]
BP[BURNOUT<br/>PREDICTOR<br/>ββββββββ<br/>4 Detectors<br/>Risk scoring<br/>Classification]
end
subgraph "πΎ OUTPUT COLLECTIONS"
WLSCORE[(WORKLOAD_SCORE<br/>ββββββββ<br/>Time-series<br/>Aggregated<br/>scores)]
SIG[(SIGNAL<br/>ββββββββ<br/>Risk scores<br/>Detected<br/>patterns)]
INT[(INTERVENTION<br/>ββββββββ<br/>Proctor<br/>actions<br/>Follow-ups)]
end
TASK --> WL
EVENT --> WL
WL --> WLSCORE
WLSCORE --> BP
TASK --> BP
EVENT --> BP
GRADE --> BP
BP --> SIG
SIG --> INT
style WL fill:#6366f1,stroke:#4f46e5,color:#fff,stroke-width:2px
style BP fill:#8b5cf6,stroke:#7c3aed,color:#fff,stroke-width:2px
style SIG fill:#ef4444,stroke:#dc2626,color:#fff,stroke-width:2px
flowchart TD
START([Start Collision Detection]) --> PARAM[Set Parameters: 14 days lookback, 3 major items, 50 hours threshold]
PARAM --> FETCH[Fetch tasks and events for next 14 days]
FETCH --> FILTER[Filter Major Items: Exams, Projects, Institutional Events]
FILTER --> GROUP[Group by Week]
GROUP --> WEEK1{Week 1 Analysis}
WEEK1 --> COUNT1[Count: 2 exams + 1 project + 1 institutional = 4 items]
COUNT1 --> HOURS1[Calculate Hours: Tasks 47h + Events 14h = 61h total]
HOURS1 --> CHECK1{Items >= 3 OR Hours >= 50?}
CHECK1 -->|YES| COL1[COLLISION DETECTED! Score: +30]
CHECK1 -->|NO| WEEK2{Week 2 Analysis}
WEEK2 --> COUNT2[Count and Calculate]
COUNT2 --> CHECK2{Threshold Met?}
CHECK2 -->|YES| COL2[COLLISION! Score: +30]
CHECK2 -->|NO| NOCOL[No Collision, Score: 0]
COL1 --> SAVE[Save Result with Details]
COL2 --> SAVE
NOCOL --> SAVE2[Save Negative Result]
SAVE --> RETURN([Return to Burnout Predictor])
SAVE2 --> RETURN
style START fill:#10b981,stroke:#059669,color:#fff
style COL1 fill:#ef4444,stroke:#dc2626,color:#fff,stroke-width:3px
style COL2 fill:#ef4444,stroke:#dc2626,color:#fff,stroke-width:3px
style NOCOL fill:#10b981,stroke:#059669,color:#fff
style RETURN fill:#6366f1,stroke:#4f46e5,color:#fff
flowchart TD
START([Start Volatility Detection]) --> PARAM[Parameters: 4 weeks, 50% moderate, 100% high, 200% extreme]
PARAM --> FETCH[Fetch weekly scores for last 4 weeks]
FETCH --> DATA{Enough Data?}
DATA -->|Less than 4 weeks| NODATA[Insufficient Data, Score: 0]
DATA -->|4 weeks available| CALC[Calculate Baseline: Weeks 1-3 Average = 47h]
CALC --> CURRENT[Current Week: 107h]
CURRENT --> CHANGE[Calculate Change: 127.7% increase]
CHANGE --> CLASS{Classify Spike}
CLASS -->|0-50%| NORMAL[Normal Variation, Score: 0]
CLASS -->|50-100%| MODERATE[Moderate Spike, Score: +15]
CLASS -->|100-200%| HIGH[High Spike, Score: +20]
CLASS -->|Over 200%| EXTREME[Extreme Spike, Score: +25]
NODATA --> SAVE[Save Result]
NORMAL --> SAVE
MODERATE --> SAVE
HIGH --> SAVE2[Save: hasVolatility true, change 127.7%, severity high, score 20]
EXTREME --> SAVE
SAVE --> RETURN([Return to Burnout Predictor])
SAVE2 --> RETURN
style START fill:#10b981,stroke:#059669,color:#fff
style HIGH fill:#f59e0b,stroke:#d97706,color:#000,stroke-width:3px
style EXTREME fill:#ef4444,stroke:#dc2626,color:#fff,stroke-width:3px
style MODERATE fill:#eab308,stroke:#ca8a04,color:#000
style RETURN fill:#6366f1,stroke:#4f46e5,color:#fff
flowchart TD
START([Start Recovery Detection]) --> PARAM[Parameters: 30 days lookback, score > 10 threshold, 7 day minimum]
PARAM --> FETCH[Fetch last 30 days of daily scores]
FETCH --> IDENTIFY[Identify high-load days where score > 10]
IDENTIFY --> EXAMPLE[Example: 12 consecutive days from Jan 28 to Feb 8]
EXAMPLE --> STREAK[Find longest consecutive streak]
STREAK --> CHECK{Streak >= 7 days?}
CHECK -->|YES| DEFICIT[RECOVERY DEFICIT! 12 consecutive days, Score: +25]
CHECK -->|NO| ADEQUATE[Adequate Recovery, Max streak 4 days, Score: 0]
DEFICIT --> SAVE[Save: hasRecoveryDeficit true, days 12, dates Jan28-Feb8, score 25]
ADEQUATE --> SAVE2[Save: hasRecoveryDeficit false, score 0]
SAVE --> RETURN([Return to Burnout Predictor])
SAVE2 --> RETURN
style START fill:#10b981,stroke:#059669,color:#fff
style DEFICIT fill:#ef4444,stroke:#dc2626,color:#fff,stroke-width:3px
style ADEQUATE fill:#10b981,stroke:#059669,color:#fff
style RETURN fill:#6366f1,stroke:#4f46e5,color:#fff
flowchart TD
START([Start Drift Detection]) --> PARAM[Parameters: 6 months lookback, 3 months minimum, correlation < -0.5]
PARAM --> FETCH[Fetch monthly workload scores and grade averages]
FETCH --> GROUP[Group data by month and calculate averages]
GROUP --> EXAMPLE[Example: Sep 40h/85%, Oct 52h/81%, Nov 73h/68%, Dec 68h/72%, Jan 75h/65%, Feb 82h/62%]
EXAMPLE --> CORR[Calculate Pearson correlation between workload and grades]
CORR --> VALUE[Correlation Value: r = -0.89 - Strong negative]
VALUE --> TREND[Identify Trends: Workload increasing, Grades decreasing]
TREND --> DURATION[Check duration of negative correlation]
DURATION --> CHECK{Correlation < -0.5 AND Duration >= 3 months?}
CHECK -->|YES| DRIFT[PERFORMANCE DRIFT! Duration 5 months, Score: +20]
CHECK -->|NO| NODRIFT[No Drift - Performance aligned with effort, Score: 0]
DRIFT --> SAVE[Save: hasDrift true, duration 5, correlation -0.89, workload up, grades down, score 20]
NODRIFT --> SAVE2[Save: hasDrift false, score 0]
SAVE --> RETURN([Return to Burnout Predictor])
SAVE2 --> RETURN
style START fill:#10b981,stroke:#059669,color:#fff
style DRIFT fill:#ef4444,stroke:#dc2626,color:#fff,stroke-width:3px
style NODRIFT fill:#10b981,stroke:#059669,color:#fff
style RETURN fill:#6366f1,stroke:#4f46e5,color:#fff
graph TB
ROOT["API Server"]
ROOT --> AUTH["api/auth"]
ROOT --> BURN["api/burnout"]
ROOT --> TASK["api/tasks"]
ROOT --> CAL["api/calendar"]
ROOT --> GRADE["api/grades"]
ROOT --> WL["api/workload"]
ROOT --> PROC["api/proctor"]
ROOT --> ADM["api/admin"]
AUTH --> A1["POST /register"]
AUTH --> A2["POST /login"]
AUTH --> A3["GET /profile"]
AUTH --> A4["PUT /profile"]
BURN --> B1["GET /analysis"]
BURN --> B2["GET /history"]
BURN --> B3["POST /predict/:id"]
BURN --> B4["GET /recommendations"]
TASK --> T1["GET /"]
TASK --> T2["POST /"]
TASK --> T3["PUT /:id"]
TASK --> T4["DELETE /:id"]
TASK --> T5["PATCH /:id/complete"]
CAL --> C1["GET /all"]
CAL --> C2["GET /institutional"]
CAL --> C3["POST /personal"]
CAL --> C4["DELETE /:id"]
GRADE --> G1["GET /"]
GRADE --> G2["POST /"]
GRADE --> G3["GET /analytics"]
GRADE --> G4["DELETE /:id"]
WL --> W1["GET /"]
WL --> W2["GET /breakdown"]
WL --> W3["POST /recalculate"]
PROC --> P1["GET /students"]
PROC --> P2["GET /student/:id"]
PROC --> P3["POST /intervene"]
PROC --> P4["GET /analytics"]
PROC --> P5["GET /interventions"]
ADM --> AD1["GET /users"]
ADM --> AD2["POST /users"]
ADM --> AD3["PUT /users/:id"]
ADM --> AD4["DELETE /users/:id"]
ADM --> AD5["POST /calendar/upload"]
ADM --> AD6["GET /analytics"]
style ROOT fill:#6366f1,stroke:#4f46e5,color:#fff,stroke-width:3px
style BURN fill:#ef4444,stroke:#dc2626,color:#fff,stroke-width:2px
style PROC fill:#10b981,stroke:#059669,color:#fff,stroke-width:2px
style ADM fill:#f59e0b,stroke:#d97706,color:#000,stroke-width:2px
sequenceDiagram
participant C as π€ Client
participant API as π API Server
participant AUTH as π Auth Middleware
participant DB as πΎ Database
participant CTRL as π― Controller
Note over C,CTRL: USER REGISTRATION
C->>API: POST /api/auth/register<br/>{name, email, password, role}
API->>DB: Check if email exists
DB-->>API: Email available
API->>API: Hash password (bcrypt)
API->>DB: Create user document
DB-->>API: User created
API->>API: Generate JWT token
API-->>C: {token, user}<br/>Status: 201
Note over C,CTRL: USER LOGIN
C->>API: POST /api/auth/login<br/>{email, password}
API->>DB: Find user by email
DB-->>API: User found
API->>API: Compare password hash
alt Password Valid
API->>API: Generate JWT token
API-->>C: {token, user}<br/>Status: 200
else Password Invalid
API-->>C: Error: Invalid credentials<br/>Status: 401
end
Note over C,CTRL: PROTECTED ENDPOINT ACCESS
C->>API: GET /api/burnout/analysis<br/>Headers: {Authorization: "Bearer <token>"}
API->>AUTH: Verify JWT token
AUTH->>AUTH: Decode & validate
alt Token Valid
AUTH->>DB: Find user by ID from token
DB-->>AUTH: User found
AUTH->>CTRL: Attach user to request
CTRL->>DB: Fetch burnout data
DB-->>CTRL: Data retrieved
CTRL-->>API: Process response
API-->>C: {score, risk, signals}<br/>Status: 200
else Token Invalid/Expired
AUTH-->>C: Error: Unauthorized<br/>Status: 401
end
Note over C,CTRL: ROLE-BASED ACCESS (Proctor Only)
C->>API: GET /api/proctor/students<br/>Headers: {Authorization: "Bearer <token>"}
API->>AUTH: Verify JWT token
AUTH->>AUTH: Decode & check role
alt Role = Proctor
AUTH->>CTRL: Allow access
CTRL->>DB: Fetch assigned students
DB-->>CTRL: Student list
CTRL-->>C: {students}<br/>Status: 200
else Role β Proctor
AUTH-->>C: Error: Forbidden<br/>Status: 403
end
# 1οΈβ£ Clone repository
git clone https://github.com/yourusername/burnout-prediction-system.git
cd burnout-prediction-system
# 2οΈβ£ Backend setup
cd backend
npm install
# 3οΈβ£ Environment configuration
cp .env.example .env
# Edit .env with your MongoDB URI
# 4οΈβ£ Start MongoDB (if local)
mongod --dbpath /path/to/data
# 5οΈβ£ Start server
npm start
# β
Server running on http://localhost:3000
# 6οΈβ£ Open frontend
# Navigate to frontend/pages/login.html# ποΈ Database
MONGODB_URI=mongodb://localhost:27017/burnout-system
MONGODB_TEST_URI=mongodb://localhost:27017/burnout-test
# π Authentication
JWT_SECRET=your_super_secret_key_minimum_32_characters_long
JWT_EXPIRES_IN=7d
# π Server
PORT=3000
NODE_ENV=development
# π§ Email Notifications (Optional)
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=noreply@yourdomain.com
SMTP_PASS=your_app_password_here
# β° Scheduled Jobs
ENABLE_DAILY_ANALYSIS=true
DAILY_ANALYSIS_TIME=02:00
# π System Configuration
HIGH_RISK_THRESHOLD=60
MEDIUM_RISK_THRESHOLD=30
COLLISION_THRESHOLD=3
VOLATILITY_MODERATE=50
VOLATILITY_HIGH=100
VOLATILITY_EXTREME=200gantt
title John Doe - 4 Week Burnout Journey
dateFormat YYYY-MM-DD
section Week 1 (Normal)
Tasks (3) :2026-01-13, 2026-01-19
Events (1) :2026-01-13, 2026-01-19
Daily Score 8 :milestone, 2026-01-15, 0d
Risk: LOW π’ :crit, 2026-01-13, 2026-01-19
section Week 2 (Increasing)
Tasks (5) :2026-01-20, 2026-01-26
Events (2) :2026-01-20, 2026-01-26
Daily Score 15 :milestone, 2026-01-22, 0d
Risk: LOW π’ :crit, 2026-01-20, 2026-01-26
section Week 3 (High)
Tasks (7) :2026-01-27, 2026-02-02
Events (3) :2026-01-27, 2026-02-02
Daily Score 18 :milestone, 2026-01-29, 0d
Risk: MEDIUM π‘ :2026-01-27, 2026-02-02
section Week 4 (Critical)
Tasks (9) :2026-02-03, 2026-02-09
Events (4) :2026-02-03, 2026-02-09
Daily Score 24 :milestone, 2026-02-06, 0d
Risk: HIGH π΄ :active, 2026-02-03, 2026-02-09
Intervention Sent :milestone, 2026-02-08, 0d
| Date | Tasks | Events | Daily Score | Status |
|---|---|---|---|---|
| Feb 3 Mon | 2 Assignments (6h) | Workshop (3h) | 15 | π‘ High |
| Feb 4 Tue | 1 Quiz (1h) | - | 8 | π’ Normal |
| Feb 5 Wed | 1 Exam (5h) | Registration (4h) | 23 | π΄ Critical |
| Feb 6 Thu | 1 Project (8h) | Tour (8h) | 44 | π΄ Critical |
| Feb 7 Fri | 2 Exams (9h) | - | 27 | π΄ Critical |
| Feb 8 Sat | 1 Assignment (3h) | Welfare Visit (3h) | 12 | π‘ High |
| Feb 9 Sun | - | - | 3 | π’ Recovery |
| WEEKLY TOTAL | 132 | π΄ CRITICAL | ||
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β π¨ BURNOUT ANALYSIS - JOHN DOE β
β Generated: Feb 8, 2026 10:30 AM β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β RISK SCORE: 75/100 ββββββββββ π΄ HIGH RISK β
β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β π― COLLISION DETECTOR Score: +30/30 β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ€ β
β β Status: β
DETECTED β β
β β β β
β β Findings: β β
β β β’ 7 major items in next 7 days β β
β β β’ Total hours: 132 (threshold: 50) β β
β β β β
β β Items: β β
β β β’ Feb 5: Data Structures Exam (5h) β β
β β β’ Feb 5: Course Registration (4h) β β
β β β’ Feb 6: ML Project Submission (8h) β β
β β β’ Feb 6: Student Tour (8h) β β
β β β’ Feb 7: Calculus Midterm (5h) β β
β β β’ Feb 7: Physics Exam (4h) β β
β β β’ Feb 8: Welfare Visit (3h) β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β β‘ VOLATILITY DETECTOR Score: +20/25 β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ€ β
β β Status: β
DETECTED (High Spike) β β
β β β β
β β Findings: β β
β β β’ Week 1-3 Average: 47h/week β β
β β β’ Week 4 Current: 132h/week β β
β β β’ Change: +180% (High spike threshold: 100%) β β
β β β β
β β Weekly Breakdown: β β
β β β’ Week 1: 45h β β
β β β’ Week 2: 42h β β
β β β’ Week 3: 54h β β
β β β’ Week 4: 132h β οΈ β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β π RECOVERY DETECTOR Score: +25/25 β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ€ β
β β Status: β
DETECTED β β
β β β β
β β Findings: β β
β β β’ 18 consecutive high-load days β β
β β β’ Start Date: Jan 22, 2026 β β
β β β’ End Date: Feb 8, 2026 β β
β β β’ Average Daily Score: 16.3 β β
β β β’ Threshold: 7 consecutive days β β
β β β β
β β Last Recovery Day: Jan 21 (17 days ago) β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β π DRIFT DETECTOR Score: +0/20 β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ€ β
β β Status: β NOT DETECTED β β
β β β β
β β Findings: β β
β β β’ Workload increasing (+35% over 6 months) β β
β β β’ Grades stable (82% avg, -2% change) β β
β β β’ Correlation: -0.23 (threshold: -0.5) β β
β β β β
β β Performance is holding despite workload increase β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β
β π RECOMMENDATIONS: β
β β
β π― Immediate Actions (Next 24 hours): β
β 1. Contact your proctor Dr. Smith β
β 2. Reschedule non-critical deadlines if possible β
β 3. Request extension for Feb 6 project β
β β
β π Recovery Plan (This Weekend): β
β 4. Block out Saturday afternoon for complete rest β
β 5. Schedule 8+ hours sleep each night β
β 6. Avoid taking on new commitments β
β β
β π Study Strategy: β
β 7. Focus on Feb 5-7 exams first (highest priority) β
β 8. Use Pomodoro technique (25min work / 5min break) β
β 9. Join study groups to share workload β
β β
β π Support Resources: β
β β’ Counseling Services: counseling@university.edu β
β β’ Time Management Workshop: Feb 10 @ 2 PM β
β β’ Peer Support Hotline: 1-800-STUDENT β
β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β
β π¨ INTERVENTION STATUS: β
β β
β Dr. Smith has been notified of your high-risk status. β
β Expect outreach within 24 hours. β
β β
β [Acknowledge Alert] [Contact Proctor] [View Resources] β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
graph TB
subgraph TW["Task Weighting"]
TW1["Exam: 3.0x"]
TW2["Project: 2.5x"]
TW3["Assignment: 1.5x"]
TW4["Quiz: 1.0x"]
end
subgraph EW["Event Weighting"]
EW1["Institutional Exam: 8.0"]
EW2["Registration: 4.0"]
EW3["General Event: 3.0"]
EW4["Holiday: 0.0"]
end
subgraph CT["Collision Thresholds"]
CT1["Lookback: 14 days"]
CT2["Major Items: >= 3"]
CT3["Hours: >= 50"]
CT4["Score: +30"]
end
subgraph VT["Volatility Thresholds"]
VT1["Lookback: 4 weeks"]
VT2["Moderate: 50-100% = +15"]
VT3["High: 100-200% = +20"]
VT4["Extreme: >200% = +25"]
end
subgraph RT["Recovery Thresholds"]
RT1["Lookback: 30 days"]
RT2["High-Load: >10"]
RT3["Min Streak: >= 7 days"]
RT4["Score: +25"]
end
subgraph DT["Drift Thresholds"]
DT1["Lookback: 6 months"]
DT2["Min Duration: >= 3 months"]
DT3["Correlation: < -0.5"]
DT4["Score: +20"]
end
subgraph RC["Risk Classification"]
RC1["HIGH: 60-100"]
RC2["MEDIUM: 30-59"]
RC3["LOW: 0-29"]
end
style TW fill:#6366f1,stroke:#4f46e5,color:#fff
style EW fill:#8b5cf6,stroke:#7c3aed,color:#fff
style CT fill:#f59e0b,stroke:#d97706,color:#000
style VT fill:#ef4444,stroke:#dc2626,color:#fff
style RT fill:#8b5cf6,stroke:#7c3aed,color:#fff
style DT fill:#ec4899,stroke:#db2777,color:#fff
style RC fill:#10b981,stroke:#059669,color:#fff
pie title Test Coverage by Module
"Burnout Predictor" : 94
"Signal Detectors" : 91
"Workload Calculator" : 96
"API Routes" : 88
"Database Models" : 97
"Middleware" : 85
flowchart LR
START([npm test]) --> UNIT[π§ͺ Unit Tests<br/>ββββββββββ<br/>170 tests<br/>Services<br/>Utilities<br/>Models]
UNIT -->|Pass| INT[π Integration Tests<br/>ββββββββββ<br/>45 tests<br/>API Endpoints<br/>DB Operations<br/>Auth Flow]
INT -->|Pass| E2E[π E2E Tests<br/>ββββββββββ<br/>28 tests<br/>User Journeys<br/>Full Workflows<br/>UI Automation]
E2E -->|Pass| COV[π Coverage Report<br/>ββββββββββ<br/>Generate HTML<br/>Check Thresholds<br/>92% Overall]
COV -->|β₯90%| SUCCESS[β
ALL TESTS PASSED]
COV -->|<90%| FAIL[β Coverage Too Low]
UNIT -->|Fail| FAIL
INT -->|Fail| FAIL
E2E -->|Fail| FAIL
style START fill:#10b981,stroke:#059669,color:#fff
style SUCCESS fill:#10b981,stroke:#059669,color:#fff,stroke-width:3px
style FAIL fill:#ef4444,stroke:#dc2626,color:#fff,stroke-width:3px
graph TB
subgraph "π CDN Layer"
CDN[Cloudflare CDN<br/>ββββββββββ<br/>β’ Static Assets<br/>β’ CSS/JS<br/>β’ Images<br/>β’ DDoS Protection]
end
subgraph "βοΈ Load Balancer"
LB[NGINX Load Balancer<br/>ββββββββββ<br/>β’ Round Robin<br/>β’ Health Checks<br/>β’ SSL Termination]
end
subgraph "π₯οΈ Application Servers"
APP1[Node.js Server 1<br/>ββββββββββ<br/>β’ Express App<br/>β’ PM2 Cluster<br/>β’ 4 workers]
APP2[Node.js Server 2<br/>ββββββββββ<br/>β’ Express App<br/>β’ PM2 Cluster<br/>β’ 4 workers]
APP3[Node.js Server 3<br/>ββββββββββ<br/>β’ Express App<br/>β’ PM2 Cluster<br/>β’ 4 workers]
end
subgraph "πΎ Database Cluster"
PRIMARY[(MongoDB Primary<br/>ββββββββββ<br/>β’ Writes<br/>β’ Reads<br/>β’ Replication)]
SECONDARY1[(MongoDB Secondary 1<br/>ββββββββββ<br/>β’ Read Replica<br/>β’ Failover)]
SECONDARY2[(MongoDB Secondary 2<br/>ββββββββββ<br/>β’ Read Replica<br/>β’ Failover)]
end
subgraph "π° Cache Layer"
REDIS[(Redis<br/>ββββββββββ<br/>β’ Session Store<br/>β’ Query Cache<br/>β’ Rate Limiting)]
end
subgraph "π Monitoring"
PROM[Prometheus<br/>ββββββββββ<br/>β’ Metrics Collection<br/>β’ Time-series DB]
GRAF[Grafana<br/>ββββββββββ<br/>β’ Dashboards<br/>β’ Alerting<br/>β’ Visualization]
SENTRY[Sentry<br/>ββββββββββ<br/>β’ Error Tracking<br/>β’ Performance<br/>β’ Alerts]
end
subgraph "π§ External Services"
SMTP[SendGrid SMTP<br/>ββββββββββ<br/>β’ Email Delivery<br/>β’ Templates<br/>β’ Analytics]
end
CDN --> LB
LB --> APP1
LB --> APP2
LB --> APP3
APP1 --> REDIS
APP2 --> REDIS
APP3 --> REDIS
APP1 --> PRIMARY
APP2 --> PRIMARY
APP3 --> PRIMARY
PRIMARY --> SECONDARY1
PRIMARY --> SECONDARY2
APP1 --> SMTP
APP2 --> SMTP
APP3 --> SMTP
APP1 --> PROM
APP2 --> PROM
APP3 --> PROM
PROM --> GRAF
APP1 --> SENTRY
APP2 --> SENTRY
APP3 --> SENTRY
style CDN fill:#f59e0b,stroke:#d97706,color:#000
style LB fill:#6366f1,stroke:#4f46e5,color:#fff
style PRIMARY fill:#10b981,stroke:#059669,color:#fff,stroke-width:3px
style REDIS fill:#ef4444,stroke:#dc2626,color:#fff
style PROM fill:#8b5cf6,stroke:#7c3aed,color:#fff
flowchart LR
CODE[π» Source Code] --> BUILD{Docker Build}
BUILD --> IMG1[π³ Backend Image<br/>ββββββββββ<br/>node:18-alpine<br/>+ dependencies<br/>+ app code]
BUILD --> IMG2[π³ Frontend Image<br/>ββββββββββ<br/>nginx:alpine<br/>+ static files<br/>+ config]
IMG1 --> REG[π¦ Docker Registry<br/>ββββββββββ<br/>Docker Hub<br/>or Private]
IMG2 --> REG
REG --> DEPLOY{docker-compose up}
DEPLOY --> C1[π¦ MongoDB Container<br/>ββββββββββ<br/>mongo:6.0<br/>Persistent Volume]
DEPLOY --> C2[π¦ Backend Container<br/>ββββββββββ<br/>Port: 3000<br/>Env: Production]
DEPLOY --> C3[π¦ Frontend Container<br/>ββββββββββ<br/>Port: 80<br/>NGINX Server]
DEPLOY --> C4[π¦ Redis Container<br/>ββββββββββ<br/>Port: 6379<br/>Cache Layer]
C1 --> NET[π Docker Network<br/>ββββββββββ<br/>Internal<br/>Communication]
C2 --> NET
C3 --> NET
C4 --> NET
NET --> LIVE[β
Production<br/>System Running]
style CODE fill:#10b981,stroke:#059669,color:#fff
style REG fill:#6366f1,stroke:#4f46e5,color:#fff
style LIVE fill:#10b981,stroke:#059669,color:#fff,stroke-width:3px
|
API Reference Architecture Guide Deployment Guide |
Report Bug Request Feature |
Community Forum Discord Server |
Email Support |
gantt
title Product Roadmap 2026
dateFormat YYYY-MM-DD
section Q2 2026
ML Model Training :2026-04-01, 60d
Email/SMS Notifications :2026-04-15, 45d
Mobile App (React Native) :2026-05-01, 90d
section Q3 2026
Slack/Discord Integration :2026-07-01, 30d
Peer Analytics :2026-07-15, 45d
Gamification Features :2026-08-01, 60d
LMS Integration (Canvas) :2026-08-15, 75d
section Q4 2026
Multi-University Deployment :2026-10-01, 90d
Research Paper Publication :2026-10-15, 75d
Advanced Predictive Models :2026-11-01, 60d
We welcome contributions! See our Contributing Guide for details.
# Fork & clone
git clone https://github.com/YOUR_USERNAME/burnout-prediction-system.git
# Create feature branch
git checkout -b feature/amazing-feature
# Make changes & test
npm test
npm run lint
# Commit with conventional commits
git commit -m "feat: add email notifications"
# Push & create PR
git push origin feature/amazing-featureMIT License - see LICENSE for details.