How aaryankumar70/mindpulseai works
MindPulse is a student well-being assessment app: users authenticate, submit habit and lifestyle data, receive a model-estimated score with interpretation, then review history and use personalized activities and plans. The frontend calls a FastAPI service; MongoDB-backed records support accounts, predictions, and tasks. README also documents Supabase history and an AI companion, but the Supabase client is absent from the supplied tree and the sampled backend excerpt does not show the companion’s dispatch, so those links are limited to documented or directly visible evidence.
Main entry points: App.tsx App shell · main.py FastAPI service · TasksSection.tsx Personalized tasks · tasks.ts Task API client
Components 21
Frontend experience
- App shell
frontend/src/App.tsx - Sign-in UI
frontend/src/components/AuthPage.tsx
Assessment workflow
- Assessment form
frontend/src/components/PredictionForm.tsx - Prediction client
frontend/src/prediction.ts - Score and insights
frontend/src/components/ResultCard.tsx - Prediction history
frontend/src/components/HistorySection.tsx
Well-being follow-up
- Personalized tasks
frontend/src/components/TasksSection.tsx - Task API client
frontend/src/tasks.ts - Guided activities
frontend/src/components/ActivityPage.tsx - Breathing session
frontend/src/components/activities/BreathingActivity.tsx - Mobile plan
frontend/src/components/MobilePlanPage.tsx - AI companion UI
frontend/src/components/Chatbot.tsx
Backend services
- Auth endpoints
backend/main.py - Token and passwords
backend/auth.py - FastAPI service
backend/main.py - Trained model
backend/Mental_Health_Model.pkl - Supabase history
- Database access
backend/database.py - MongoDB
Other components
- Student
- Groq service
Connections 25
- Student → App shell: opens
- App shell → Sign-in UI: shows
- Sign-in UI → Auth endpoints: registers or logs in
- Auth endpoints → Token and passwords: uses
- Auth endpoints → Database access: reads and writes users
- Database access → MongoDB: connects
- App shell → Assessment form: shows
- Assessment form → Prediction client: submits inputs
- Prediction client → FastAPI service: requests prediction
- FastAPI service → Trained model: predicts with
- FastAPI service → Database access: stores prediction
- Prediction client → Score and insights: formats response for
- App shell → Prediction history: shows
- Prediction history → Supabase history: reads history
- App shell → Personalized tasks: shows
- Personalized tasks → Task API client: loads tasks and plan
- Task API client → FastAPI service: calls task endpoints
- FastAPI service → Database access: reads and updates tasks
- Personalized tasks → Guided activities: starts selected task
- Guided activities → Task API client: loads and completes task
- Guided activities → Breathing session: renders breathing session
- Personalized tasks → Mobile plan: opens tokenized plan
- App shell → AI companion UI: shows
- AI companion UI → Task API client: sends chat request
- FastAPI service → Groq service: imports client for