How pasupulasaiteja/mindguardai works
MindGuardAI is a higher-education mental-wellness platform for students, counselors, and campus administrators. The main journey runs from student check-ins and passive device telemetry through clinical/ML assessment and longitudinal analysis to student-facing support and counselor triage; administrators also receive cohort analytics. The graph preserves documented privacy, consent, notifications, appointments, and screening capabilities. Several API and service implementations were not sampled, so their internal call relationships are not asserted.
Main entry points: main.py FastAPI gateway · App.tsx Client routing · session.py SQL database · StudentDashboard.tsx Student wellness UI
Components 29
User experience
- Client routing
frontend/src/App.tsx - Student wellness UI
frontend/src/pages/student/StudentDashboard.tsx - Screen-time UI
frontend/src/pages/student/ScreenTimePage.tsx - Chat UI
frontend/src/pages/student/StudentChatbot.tsx - Counselor triage UI
frontend/src/pages/counselor/CounselorDashboard.tsx - Student case file
frontend/src/pages/counselor/StudentCaseFile.tsx - Campus analytics UI
frontend/src/pages/admin/AdminDashboard.tsx - REST client
frontend/src/services/api.ts
API and privacy
- FastAPI gateway
backend/app/main.py - Authentication
backend/app/api/v1/auth.py - Consent and audit
backend/app/middleware/consent_enforcement.py
Wellness and AI
- Device phenotyping
backend/app/services/behavioral_service.py - Risk and emotion inference
backend/app/ml/inference.py - Crisis safety
backend/app/ml/safety_engine.py - Chat response orchestration
backend/app/ml/response_orchestrator.py - Wellness trends
backend/app/services/trend_service.py - Clinical screenings
backend/app/api/v1/surveys.py - Desktop telemetry agent
desktop_agent/mindguard_pc_agent.py
Records and intervention
- Consultation scheduling
backend/app/api/v1/appointments.py - Alerts and notifications
backend/app/api/v1/notifications.py - Email delivery
backend/app/services/email_service.py - SQL database
backend/app/db/session.py - Accounts and roles
backend/app/models/users.py - Risk assessments
backend/app/models/assessments.py - Counselor alerts
backend/app/models/alerts.py - Mood history
backend/app/models/mood_logs.py
Other components
- Student
- Counselor
- Administrator
Connections 32
- Student → Client routing: uses
- Counselor → Client routing: uses
- Administrator → Client routing: uses
- Client routing → Student wellness UI: routes to
frontend/src/App.tsx - Client routing → Counselor triage UI: routes to
frontend/src/App.tsx - Client routing → Campus analytics UI: routes to
frontend/src/App.tsx - Student wellness UI → Screen-time UI: offers
- Student wellness UI → Chat UI: offers
- Counselor triage UI → Student case file: opens
- Client routing → REST client: uses
- REST client → FastAPI gateway: REST requests
- FastAPI gateway → Authentication: mounts routes
backend/app/main.py - FastAPI gateway → SQL database: initializes schema
backend/app/main.py - FastAPI gateway → Consent and audit: enforces consent
- FastAPI gateway → Risk and emotion inference: inference hooks
backend/app/main.py - FastAPI gateway → Device phenotyping: routes telemetry
- FastAPI gateway → Clinical screenings: mounts surveys
backend/app/main.py - FastAPI gateway → Consultation scheduling: mounts routes
backend/app/main.py - FastAPI gateway → Alerts and notifications: mounts routes
backend/app/main.py - Chat UI → Chat response orchestration: sends chat
- Chat response orchestration → Crisis safety: crisis override
- Device phenotyping → Desktop telemetry agent: reads telemetry
- Wellness trends → SQL database: reads history
backend/app/services/trend_service.py - SQL database → Mood history: stores
backend/app/models/mood_logs.py - SQL database → Risk assessments: stores
backend/app/models/assessments.py - SQL database → Counselor alerts: stores
backend/app/models/alerts.py - SQL database → Accounts and roles: stores
backend/app/models/users.py - Risk and emotion inference → Risk assessments: produces risk
- Risk assessments → Counselor alerts: triggers alert
backend/app/models/alerts.py - Alerts and notifications → Email delivery: dispatches email
- Counselor triage UI → Alerts and notifications: reviews alerts
- Campus analytics UI → FastAPI gateway: requests cohort analytics