How rehaan98/stressapplication works
Psychological Stress AI is a full-stack stress-assessment and self-awareness platform. Users submit questionnaire, physiological, lifestyle, voice, or facial inputs; the platform analyzes stress, presents predictions and explanations, and can offer tailored coping interventions. Other documented capabilities include conversation support, analytics and CSV export, authentication/RBAC, and administration. The map distinguishes the web experience, API, backend services and data, and ML capabilities. Some endpoint-to-service and browser-to-API links are not shown in sampled source; those links are dashed rather than asserted as verified calls.
Main entry points: api.py Versioned routes · predict.py Stress prediction · app Web pages · model_trainer.py Model training
Components 24
Web experience
- Web pages
frontend/src/app - Interactive panels
frontend/src/components - Browser API client
frontend/src/lib/api.ts
API and access
- FastAPI application
backend/app/main.py - Versioned routes
backend/app/api/v1/api.py
Assessment services
- Authentication
backend/app/services/auth_service.py - Conversation support
backend/app/services/conversation/manager.py - Voice analysis
backend/app/services/voice_service.py - Voice language analysis
backend/app/services/voice_language.py - Stress modality fusion
backend/app/services/stress_engine.py - Facial emotion analysis
backend/app/services/facial_service.py - Multimodal assessment
backend/app/services/multimodal.py - Analytics and reports
backend/app/services/analytics_service.py
ML and interventions
- Stress prediction
ml_engine/predict.py - Feature engineering
ml_engine/src/feature_engineering.py - Data preprocessing
ml_engine/src/data_preprocessing.py - Model training
ml_engine/src/model_trainer.py - SHAP and LIME
ml_engine/src/explainable_ai.py - Coping interventions
backend/app/services/rag_service.py - Intervention retrieval
ml_engine/src/rag_engine.py - Synthetic training data
ml_engine/data/generate_synthetic_stress_dataset.py
Persistence
- Database sessions
backend/app/core/database.py - Assessment records
backend/app/models
Other components
- Platform user
Connections 28
- Platform user → Web pages: uses
README.md - Web pages → Interactive panels: renders
- Web pages → Browser API client: requests data
- Browser API client → Versioned routes: sends requests
- FastAPI application → Versioned routes: mounts routes
backend/app/main.py - Versioned routes → Authentication: routes auth
- Versioned routes → Conversation support: routes conversation
- Versioned routes → Voice analysis: routes voice
- Versioned routes → Facial emotion analysis: routes facial
- Versioned routes → Multimodal assessment: routes assessment
- Versioned routes → Analytics and reports: routes analytics
- Voice analysis → Voice language analysis: uses analysis
backend/app/services/voice_service.py - Stress modality fusion → Voice analysis: analyzes audio
backend/app/services/stress_engine.py - Stress modality fusion → Facial emotion analysis: wraps visual result
- Multimodal assessment → Stress modality fusion: combines modalities
- Stress prediction → Feature engineering: engineers inputs
ml_engine/predict.py - Stress prediction → Data preprocessing: preprocesses inputs
ml_engine/predict.py - Stress prediction → SHAP and LIME: explains prediction
ml_engine/predict.py - Stress prediction → Intervention retrieval: retrieves interventions
ml_engine/predict.py - Coping interventions → Intervention retrieval: retrieves interventions
backend/app/services/rag_service.py - Coping interventions → Assessment records: reads and logs
backend/app/services/rag_service.py - FastAPI application → Database sessions: initializes tables
backend/app/main.py - Database sessions → Assessment records: provides ORM base
backend/app/core/database.py - Synthetic training data → Model training: supplies training data
ml_engine/src/train_pipeline.py - Model training → Feature engineering: engineers training features
ml_engine/src/train_pipeline.py - Model training → Data preprocessing: preprocesses training data
ml_engine/src/train_pipeline.py - Platform user → Stress prediction: receives stress results
- Platform user → Coping interventions: requests coping guidance