How niraj-kumbhar-18/psychhealth works
PsychHealth is a student wellness web app for stress assessment, habit tracking, and guided behavior experiments. A student enters through the browser UI, completes profile and assessment screens, and receives a scored PSS result, contributing factors, and tailored recommendations. The app also supports viewing progress, logging habits, running experiments, and exploring hypothetical changes with a what-if simulator. The frontend maintains client state and can sync with a lightweight HTTP server backed by SQLite. Relationships are limited to those shown in excerpts; other capabilities are represented without inferred wiring.
Main entry points: state.js Student state · api.js API service · app.js App controller · screens.js Screen rendering
Components 14
Student experience
- App controller
frontend/js/app.js - Screen rendering
frontend/js/screens.js - Student state
frontend/js/state.js - API service
frontend/js/api.js
Assessment and guidance
- Questionnaire definitions
frontend/js/data.js - PSS scoring
frontend/js/pss.js - Wellness recommendations
frontend/js/recommendations.js
Progress and behavior
- Progress visualizations
frontend/js/charts.js - What-if simulator
frontend/js/simulator.js - Habit tracking
frontend/js/tracking.js
Backend and persistence
- HTTP API server
backend/server.py - Student records
backend/database.py - SQLite database
backend/psychhealth.db
Other components
- Student
Connections 15
- Student → App controller: uses
- App controller → Screen rendering: renders
- App controller → Student state: updates
frontend/js/app.js - Screen rendering → Student state: reads
- Screen rendering → Questionnaire definitions: uses
frontend/js/screens.js - API service → Student state: updates
frontend/js/api.js - API service → PSS scoring: scores
frontend/js/api.js - API service → Wellness recommendations: generates
frontend/js/api.js - Student state → HTTP API server: syncs
frontend/js/state.js - HTTP API server → Student records: calls
backend/server.py - HTTP API server → Student: serves data
- Student records → SQLite database: reads and writes
- Progress visualizations → Student state: reads progress
- What-if simulator → PSS scoring: gets stress level
frontend/js/simulator.js - Habit tracking → Student state: logs habits