How ridhigolchha/inner-circle works
Inner Circle is a mental-wellbeing app for personal check-ins, self-guided support, assessments, and connections to professional or community resources. A user enters through registration, then the client routes them into wellbeing features; browser state supports personal data, while API-backed features are handled by the server. The server also provides authentication, chat, check-in and risk analysis, forums, appointments, and resources. The excerpts support several key calls, but many feature pages and server routes were not sampled, so their internal links are omitted rather than inferred.
Main entry points: App.jsx Route shell · app.ts API application · store.ts Domain store · checkins.routes.ts Check-in route
Components 34
Client experience
- Route shell
inner-circle/client/src/App.jsx - App state
inner-circle/client/src/context/AppContext.jsx - Browser storage
inner-circle/client/src/lib/storage.js - Registration
inner-circle/client/src/pages/Register.jsx - Home
inner-circle/client/src/pages/Home.jsx - Settings
inner-circle/client/src/pages/Settings.jsx
Self-guided wellbeing
- Mood journey
inner-circle/client/src/pages/MoodJourney.jsx - Assessments
inner-circle/client/src/pages/Assessments.jsx - Assessment runner
inner-circle/client/src/pages/AssessmentRunner.jsx - Assessment results
inner-circle/client/src/pages/AssessmentResult.jsx - Companion chat
inner-circle/client/src/pages/Companion.jsx - Breathing exercises
inner-circle/client/src/pages/Breathe.jsx - Relaxation games
inner-circle/client/src/pages/PlayRelax.jsx - Puzzles
inner-circle/client/src/pages/Puzzles.jsx - Professional support
inner-circle/client/src/pages/Professional.jsx - Support insights
inner-circle/client/src/pages/SupportInsights.jsx
API and safety
- API application
inner-circle/server/src/app.ts - Chat route
inner-circle/server/src/routes/chat.routes.ts - Chat pipeline
inner-circle/server/src/ai/chatPipeline.ts - LLM provider
inner-circle/server/src/ai/providers/llm.ts - Check-in route
inner-circle/server/src/routes/checkins.routes.ts - Risk route
inner-circle/server/src/routes/risk.routes.ts - Fuzzy assessment
inner-circle/server/src/fuzzy/engine.ts - Sentiment analysis
inner-circle/server/src/nlp/sentiment.ts - Community forum
inner-circle/server/src/routes/forum.routes.ts - Appointments
inner-circle/server/src/routes/appointments.routes.ts - Support resources
inner-circle/server/src/routes/resources.routes.ts
Accounts and domain data
- Authentication routes
inner-circle/server/src/modules/auth/routes.ts - Token middleware
inner-circle/server/src/middleware/auth.ts - Account store
inner-circle/server/src/modules/auth/store.ts - Domain store
inner-circle/server/src/modules/store.ts - Persistence sync
inner-circle/server/src/modules/domainPersistence.ts - Demo data seed
inner-circle/server/src/seed/demo.ts
Other components
- User
Connections 41
- User → Route shell: uses
inner-circle/client/src/App.jsx - Route shell → Registration: routes
inner-circle/client/src/App.jsx - Route shell → Home: routes
inner-circle/client/src/App.jsx - Route shell → Mood journey: routes
inner-circle/client/src/App.jsx - Route shell → Assessments: routes
inner-circle/client/src/App.jsx - Route shell → Assessment runner: routes
inner-circle/client/src/App.jsx - Route shell → Assessment results: routes
inner-circle/client/src/App.jsx - Route shell → Companion chat: routes
inner-circle/client/src/App.jsx - Route shell → Breathing exercises: routes
inner-circle/client/src/App.jsx - Route shell → Relaxation games: routes
inner-circle/client/src/App.jsx - Route shell → Puzzles: routes
inner-circle/client/src/App.jsx - Route shell → Professional support: routes
inner-circle/client/src/App.jsx - Route shell → Support insights: routes
inner-circle/client/src/App.jsx - Route shell → Settings: routes
inner-circle/client/src/App.jsx - App state → Browser storage: reads/writes
inner-circle/client/src/context/AppContext.jsx - Route shell → App state: checks profile
inner-circle/client/src/App.jsx - User → API application: API requests
- API application → Authentication routes: mounts
inner-circle/server/src/app.ts - API application → Chat route: mounts
inner-circle/server/src/app.ts - API application → Check-in route: mounts
inner-circle/server/src/app.ts - API application → Risk route: mounts
inner-circle/server/src/app.ts - API application → Community forum: mounts
inner-circle/server/src/app.ts - API application → Appointments: mounts
inner-circle/server/src/app.ts - API application → Support resources: mounts
inner-circle/server/src/app.ts - Authentication routes → Token middleware: uses
inner-circle/server/src/modules/auth/routes.ts - Authentication routes → Account store: reads/writes
inner-circle/server/src/modules/auth/routes.ts - Token middleware → Account store: looks up user
inner-circle/server/src/middleware/auth.ts - Chat route → Chat pipeline: calls
inner-circle/server/src/routes/chat.routes.ts - Chat pipeline → LLM provider: tries provider
inner-circle/server/src/ai/chatPipeline.ts - Check-in route → Fuzzy assessment: evaluates
inner-circle/server/src/routes/checkins.routes.ts - Check-in route → Sentiment analysis: analyzes
inner-circle/server/src/routes/checkins.routes.ts - Risk route → Fuzzy assessment: evaluates
inner-circle/server/src/routes/risk.routes.ts - Community forum → Chat pipeline: checks crisis
inner-circle/server/src/routes/forum.routes.ts - Chat route → Domain store: reads/writes
inner-circle/server/src/routes/chat.routes.ts - Check-in route → Domain store: reads/writes
inner-circle/server/src/routes/checkins.routes.ts - Risk route → Domain store: reads/writes
inner-circle/server/src/routes/risk.routes.ts - Community forum → Domain store: reads/writes
inner-circle/server/src/routes/forum.routes.ts - Appointments → Domain store: reads/writes
inner-circle/server/src/routes/appointments.routes.ts - API application → Persistence sync: hydrates/persists
inner-circle/server/src/app.ts - API application → Domain store: exports state
inner-circle/server/src/app.ts - API application → Demo data seed: seeds data
inner-circle/server/src/app.ts