How nikhi20-900/calmspace works
Calmspace is a privacy-conscious student wellbeing companion. Students arrive through the landing page, submit a guided check-in, receive a backend-determined safety route and appropriate guidance or human-support contacts, then can review patterns, plan study breaks, manage support resources, and adjust privacy settings. The map preserves those product areas and the backend’s safety, guidance, directory, and persistence layers. Some page and service implementations were not sampled, so their internal connections are included only where the README or indexed source relationships support them.
Main entry points: checkin.py Check-in endpoint · App.tsx App shell · api.ts API client · main.py FastAPI app
Components 25
Frontend features
- Landing experience
frontend/src/pages/LandingPage.tsx - App shell
frontend/src/App.tsx - Check-in form
frontend/src/pages/CheckInPage.tsx - Check-in result
frontend/src/pages/CheckInResultPage.tsx - Wellbeing insights
frontend/src/pages/InsightsPage.tsx - Student overview
frontend/src/pages/OverviewPage.tsx - Study-life planner
frontend/src/pages/PlannerPage.tsx - Breather timer
frontend/src/components/planner/BreatherTimer.tsx - Support network
frontend/src/pages/SupportNetworkPage.tsx - Privacy settings
frontend/src/pages/SettingsPage.tsx - API client
frontend/src/services/api.ts
Backend services
- FastAPI app
backend/app/main.py - Check-in endpoint
backend/app/routers/checkin.py - Insights endpoint
backend/app/routers/insights.py - Planner endpoint
backend/app/routers/planner.py - Support and settings
backend/app/routers/support_and_settings.py - API schemas
backend/app/models/schemas.py - Wellbeing analytics
backend/app/services/analytics.py
Safety and guidance
- Safety evaluator
backend/app/services/safety_evaluator.py - Supportive guidance
backend/app/services/ai_guidance.py - AI provider adapters
backend/app/services/ai_providers
Persistence and support
- Session storage
backend/app/services/storage.py - Support directory
backend/app/services/support_directory.py
Other components
- Student
- Human support
Connections 39
- Student → Landing experience: visits
- Student → Check-in form: submits check-in
- Student → Wellbeing insights: reviews patterns
- Student → Study-life planner: plans routines
- Student → Support network: seeks support
- App shell → Landing experience: routes to
frontend/src/App.tsx - App shell → Student overview: routes to
frontend/src/App.tsx - App shell → Check-in form: routes to
frontend/src/App.tsx - App shell → Check-in result: routes to
frontend/src/App.tsx - App shell → Wellbeing insights: routes to
frontend/src/App.tsx - App shell → Study-life planner: routes to
frontend/src/App.tsx - App shell → Support network: routes to
frontend/src/App.tsx - App shell → Privacy settings: routes to
frontend/src/App.tsx - Check-in form → API client: submits data
- Check-in result → API client: loads result
frontend/src/pages/CheckInResultPage.tsx - Wellbeing insights → API client: requests insights
frontend/src/pages/InsightsPage.tsx - Study-life planner → API client: manages tasks
frontend/src/pages/PlannerPage.tsx - Study-life planner → Breather timer: renders
frontend/src/pages/PlannerPage.tsx - API client → Check-in endpoint: POST check-in
frontend/src/services/api.ts - API client → Insights endpoint: requests insights
frontend/src/services/api.ts - API client → Planner endpoint: manages tasks
frontend/src/services/api.ts - API client → Support and settings: manages settings
frontend/src/services/api.ts - FastAPI app → Check-in endpoint: registers route
backend/app/main.py - FastAPI app → Insights endpoint: registers route
backend/app/main.py - FastAPI app → Planner endpoint: registers route
backend/app/main.py - FastAPI app → Support and settings: registers routes
backend/app/main.py - Check-in endpoint → API schemas: validates payload
backend/app/routers/checkin.py - Check-in endpoint → Session storage: reads history
backend/app/routers/checkin.py - Check-in endpoint → Safety evaluator: evaluates risk
backend/app/routers/checkin.py - Check-in endpoint → Session storage: writes metrics
backend/app/routers/checkin.py - Check-in endpoint → Supportive guidance: requests guidance
backend/app/routers/checkin.py - Check-in endpoint → Support directory: fetches contacts
backend/app/routers/checkin.py - Safety evaluator → Supportive guidance: permits eligible routes
backend/app/routers/checkin.py - Check-in endpoint → Human support: returns escalation contacts
- Supportive guidance → AI provider adapters: selects provider
backend/app/services/ai_guidance.py - Insights endpoint → Wellbeing analytics: computes summaries
backend/app/routers/insights.py - Planner endpoint → Session storage: reads and writes tasks
backend/app/routers/planner.py - Support and settings → Session storage: reads and writes settings
backend/app/routers/support_and_settings.py - Support and settings → Support directory: serves contacts
backend/app/routers/support_and_settings.py