How lohith5911/mental-health-speech-app works
MindTrace AI is an authenticated speech-based check-in application for emotional self-monitoring, not a diagnostic tool. Users register or log in, record and preview a voice check-in, submit it for analysis, and review results, history, and trends. The backend handles authenticated requests and persistence; its audio-processing flow calls the V4 predictor, acoustic-feature extraction, and signal-quality assessment. The README documents these major capabilities, while some implementation details and UI-page internals were not sampled.
Main entry points: App.tsx Routes and access · main.py API and check-in flow · index.ts API client · DailyCheckIn.tsx Daily check-in page
Components 21
Browser application
- Routes and access
frontend/src/App.tsx - Session and auth
frontend/src/context/AuthContext.tsx - Auth context hook
frontend/src/context/useAuth.ts - Daily check-in page
frontend/src/pages/DailyCheckIn.tsx - Microphone recording
frontend/src/hooks/useRecording.ts - Recording controls
frontend/src/components/check-in/RecordingCard.tsx - API client
frontend/src/services/index.ts - Dashboard
frontend/src/pages/Dashboard.tsx - Results view
frontend/src/pages/Results.tsx - History and trends
frontend/src/pages/History.tsx - Profile and resources
frontend/src/pages/Profile.tsx - Professional resources
frontend/src/pages/Resources.tsx
API and persistence
- API and check-in flow
backend/app/main.py - Token authentication
backend/app/auth.py - SQLite records
backend/app/main.py - Signal quality
backend/app/services/quality.py - Trend insights
backend/app/services/trend_engine.py
Speech analysis
- V4 emotion predictor
ml/src/models/v4_emotion_model.py - Acoustic features
ml/src/features/acoustic_features.py - Audio preprocessing
ml/src/preprocessing/audio.py
Other components
- User
Connections 25
- User → Routes and access: uses
README.md - Routes and access → Session and auth: provides session
frontend/src/main.tsx - Routes and access → Daily check-in page: routes to
frontend/src/App.tsx - Routes and access → Dashboard: routes to
frontend/src/App.tsx - Routes and access → Results view: routes to
frontend/src/App.tsx - Routes and access → History and trends: routes to
frontend/src/App.tsx - Routes and access → Profile and resources: routes to
frontend/src/App.tsx - Routes and access → Professional resources: routes to
frontend/src/App.tsx - Session and auth → API client: calls
frontend/src/context/AuthContext.tsx - Routes and access → Auth context hook: checks session
frontend/src/App.tsx - Daily check-in page → Microphone recording: uses
frontend/src/pages/DailyCheckIn.tsx - Daily check-in page → Recording controls: renders
frontend/src/pages/DailyCheckIn.tsx - Microphone recording → API client: submits audio
frontend/src/hooks/useRecording.ts - API client → API and check-in flow: sends requests
README.md - API and check-in flow → Token authentication: validates identity
backend/app/main.py - API and check-in flow → V4 emotion predictor: runs inference
backend/app/main.py - API and check-in flow → Acoustic features: extracts features
backend/app/main.py - API and check-in flow → Signal quality: assesses signal
backend/app/main.py - API and check-in flow → SQLite records: reads and writes
backend/app/main.py - API and check-in flow → Trend insights: builds insights
backend/app/main.py - V4 emotion predictor → Audio preprocessing: loads audio
ml/src/models/v4_emotion_model.py - Acoustic features → Audio preprocessing: uses
ml/src/features/acoustic_features.py - Dashboard → API client: fetches data
frontend/src/pages/Dashboard.tsx - History and trends → API client: fetches history
frontend/src/pages/History.tsx - Results view → API client: fetches results
frontend/src/pages/Results.tsx