Passive mental health risk detection and supportive intervention planning from wearable + message logs.
- 🌐 Live Demo: mymoodlens.vercel.app
- 🎨 Design Specs: Figma Board
- 📖 Technical Docs: Documentation
- 📺 Video Walkthrough: YouTube Demo
MoodLens is an AI-assisted prevention and support application that identifies mental health risk patterns early using passive digital biomarkers and conversational signals. By fusing biometric telemetry with linguistic analysis, it bridges the "critical middle ground" in mental healthcare—reaching users in the weeks before a crisis occurs.
MoodLens is designed for early support, not diagnosis.
- Multimodal Ingestion: Syncs passive signals (HRV, sleep, steps) via Google Health Connect and monitors linguistic sentiment.
- Ensemble Inference: Scores risk patterns using XGBoost (Biometrics) and multiMentalRoBERTa (NLP) hosted on Databricks Serving Endpoints.
- Tiered Safety Logic: Applies a clinical PHQ-9 aligned framework with hard safety overrides for suicidal ideation.
- Adaptive Intervention: Routes users to one of four ElevenLabs agents (Companion, Coach, or Responder) based on real-time risk tiers.
Primary app routes:
| Route | Purpose |
|---|---|
/ |
Daily check-in and quick actions |
/chat |
Voice/text support conversation with adaptive risk signals |
/safety |
Safety protocol and escalation resources |
/stats |
Trend and explainability-oriented story view |
/plan |
Adaptive check-in and personalized care plan |
Additional internal routes include /data, /impact, /viz-lab, and /dev.
MoodLens follows an explainability-first decision pipeline:
- Collect: Passive smartwatch signals + conversational message data.
- Score: Parallel inference through Databricks-hosted NLP + PHQ models.
- Analyze: Ensemble decision logic applies safety-first escalation overrides.
- Intervene: Real-time generation of intervention plans and agent routing.
- Explain: Sphinx-generated summaries provide context for clinical contributors.
- Adaptive screening engine (
src/screening/adaptiveEngine.js). - Tiered risk logic with critical safety override handling.
- Explainability summaries for key risk contributors.
- Personal care plan generation from dominant burden categories.
- Exportable structured snapshots for analysis and submission workflows.
- Optional voice conversation via ElevenLabs with risk-tier-aware agent routing.
- Frontend: React 19, React Router, Vite.
- Visualisation: Sphinx.
- ML/Ops: Databricks (Model Serving), XGBoost, multiMentalRoBERTa.
- Voice AI: ElevenLabs (Conversational Agents + TTS + RAG).
- Node.js 20+ (recommended).
- npm 10+.
npm installCreate a .env file in the project root:
VITE_DATABRICKS_TOKEN=...
VITE_ELEVENLABS_API_KEY=...
VITE_ELEVENLABS_VOICE_ID=...
VITE_ELEVENLABS_COMPANION_AGENT_ID=...
VITE_ELEVENLABS_TEXTCOMPANION_AGENT_ID=...
VITE_ELEVENLABS_COACH_AGENT_ID=...
VITE_ELEVENLABS_RESPONDER_AGENT_ID=...npm run devOpen the local Vite URL shown in your terminal.
npm run dev # Start development server
npm run build # Production build
npm run preview # Preview production build locally
npm run lint # Run ESLint
npm run docs:sphinx # Generate Sphinx-oriented docs
npm run submission:generate # Build submission kit assetsmain/
├── docs/ # Submission + technical documentation
├── images/ # Brand and architecture assets
├── ml/ # Databricks Notebooks + synthetic dataset
├── public/ # Static public assets
├── scripts/ # Automation scripts for docs/submission
├── src/
│ ├── components/ # Shared UI components
│ ├── pages/ # Route-level pages
│ ├── screening/ # Adaptive screening engine
│ ├── growth/ # Engagement logic
│ └── vectorai/ # Vector payload utilities
├── REQUIREMENTS.md
└── README.md
- Prevention, Not Diagnosis: MoodLens acts as a support assistant, not a clinical diagnostic tool.
- Privacy First: Responders see context (PHQ trends) rather than raw message content to preserve user dignity.
- Hard Overrides: Suicidal ideation markers bypass the aggregate score to trigger immediate Tier 2 protocols.
- Human-in-the-loop support is part of the operating model.
- Product requirements:
REQUIREMENTS.md - Feature roadmap:
docs/IMPORTANT_FEATURES.md - Submission resources:
docs/submission/ - Integration notes:
docs/VECTORAI_INTEGRATION.md,docs/DATABRICKS_UN_PLAYBOOK.md,docs/SPHINX_EXPLAINABILITY.md
MoodLens does not replace licensed mental-health professionals or emergency services. If you are in immediate danger, contact local emergency services or a crisis hotline (e.g., 988 in the US) right away.

