How ayas-kumar-das/ayumitra works
AyuMitra is a multilingual Indian health-assistance website with two assistants: AyuTann for physical health and medicines, and AyuMann for emotional support. A user opens chat, chooses an assistant and profile, then sends text or voice; browser chat controls call a temporary or hosted API, where conversation handling applies safety and context before returning a response. Medicine search, profiles/accounts, document retrieval, and speech/voice are meaningful supporting capabilities. The graph reflects documented and indexed dependencies; unsampled routes and implementations are not assumed to have direct call relationships.
Main entry points: server.js Backend server · preview-api.js Preview API · conversation-manager.js Turn orchestration · api.ts API client
Components 28
Web experience
- App shell
frontend/src/app/App.tsx - Chat controls
frontend/src/features/chat/ChatDialog.tsx - Conversation state
frontend/src/features/chat/useConversation.ts - API client
frontend/src/services/api.ts - Temporary chat client
frontend/src/services/temporaryChatClient.ts - Profile screens
frontend/src/features/profile/ProfileEditor.tsx - Medicine explorer
frontend/src/features/MedicinesPage.tsx
Conversation services
- Backend server
backend/src/server.js - Preview API
backend/src/preview/preview-api.js - Account and chat routes
backend/src/routes/account-and-chat-api.js - Turn orchestration
backend/src/conversations/conversation-manager.js - Safety checks
backend/src/conversations/safety-checks.js - Profile context
backend/src/conversations/user-profile-context.js - Model generation
backend/src/development/development-model.js
Health knowledge
- Document retrieval
backend/src/knowledge/reference-note-search.js - Clinical search
backend/src/knowledge/neon-knowledge-search.js - Coping guides
backend/src/knowledge/mann-coping-guides.js - Patient medicine search
backend/src/medicines/patient-medicine-search.js - Medicine guides
backend/src/medicines/medicine-guides.js
Accounts and speech
- Dictation service
backend/src/speech/dictation.js - Live voice routes
backend/src/routes/voice-live.js - Account store
backend/src/accounts/account-store.js - Neon services
backend/src/accounts/neon-services.js - Browser authentication
frontend/src/services/auth.ts
Other components
- Health seeker
- Neon PostgreSQL
- Speech provider
- Model provider
Connections 36
- Health seeker → App shell: uses
README.md - App shell → Chat controls: opens
frontend/src/app/App.tsx - App shell → Profile screens: shows
frontend/src/app/App.tsx - App shell → Medicine explorer: shows
frontend/src/app/App.tsx - Chat controls → Conversation state: controls
frontend/src/app/App.tsx - Conversation state → API client: requests
frontend/src/features/chat/useConversation.ts - Conversation state → Temporary chat client: requests
frontend/src/features/chat/useConversation.ts - API client → Backend server: calls API
README.md - Temporary chat client → Backend server: calls temporary API
frontend/src/services/temporaryChatClient.ts - Backend server → Preview API: routes preview
- Backend server → Account and chat routes: dispatches
backend/src/server.js - Preview API → Turn orchestration: runs turns
backend/src/preview/preview-api.js - Account and chat routes → Turn orchestration: handles chat
- Turn orchestration → Safety checks: checks safety
backend/src/conversations/conversation-manager.js - Turn orchestration → Profile context: adds context
backend/src/conversations/conversation-manager.js - Turn orchestration → Coping guides: gets guidance
backend/src/conversations/conversation-manager.js - Turn orchestration → Patient medicine search: looks up medicines
backend/src/conversations/conversation-manager.js - Preview API → Model generation: configures
backend/src/preview/preview-api.js - Model generation → Model provider: generates text
- Preview API → Document retrieval: retrieves notes
backend/src/preview/preview-api.js - Preview API → Clinical search: creates search
backend/src/preview/preview-api.js - Patient medicine search → Medicine guides: joins guides
backend/src/medicines/patient-medicine-search.js - Backend server → Patient medicine search: searches catalog
backend/src/server.js - Medicine explorer → API client: searches API
- Preview API → Dictation service: transcribes
backend/src/preview/preview-api.js - Dictation service → Speech provider: uses provider
- Backend server → Live voice routes: routes voice
backend/src/server.js - Preview API → Live voice routes: creates voice routes
backend/src/preview/preview-api.js - Profile screens → API client: updates account
frontend/src/features/profile/ProfilePage.tsx - Profile screens → Browser authentication: signs in
- API client → Browser authentication: gets token
frontend/src/services/api.ts - Backend server → Account store: creates store
backend/src/server.js - Backend server → Neon services: connects database
backend/src/server.js - Account store → Neon PostgreSQL: reads and writes
- Neon services → Neon PostgreSQL: queries
- Browser authentication → Neon PostgreSQL: auth service