How rohan45create/ashaai-v2 works
AshaAI digitizes frontline ASHA health work and supervisor/NGO coordination. The principal flow is worker data capture (including voice, register OCR, and health forms), optional offline queuing, backend processing and persistence, then risk and review workflows for supervisors. The React PWA, Spring Boot API, and FastAPI AI service form the documented runtime. The graph preserves the README’s major capabilities; several subsystem connections are documented rather than verified from sampled implementation, so those edges cite the README and optional AI providers are dashed.
Main entry points: backend Spring Boot API · api.js API client · App.jsx Worker and admin PWA · admin Supervisor portal
Components 21
ASHA Field App
- Worker and admin PWA
frontend/src/App.jsx - Authentication state
frontend/src/stores/authStore.js - API client
frontend/src/utils/api.js - Offline queue
frontend/src/hooks/useOfflineQueue.js - Health registers
frontend/src/routes/asha/modules - Voice and register capture
frontend/src/hooks/useVoiceRecorder.js - Supervisor portal
frontend/src/routes/admin
Backend Health Platform
- Spring Boot API
backend/src/main/java/com/ashaai/backend - Health records
backend/src/main/java/com/ashaai/backend/entity - Survey processing
backend/src/main/java/com/ashaai/backend/service/SurveyProcessorService.java - Risk scoring
backend/src/main/java/com/ashaai/backend/service/RiskEngineService.java
AI Assistance
- AI service API
ai-service/main.py - Conversational agent
ai-service/routers/agent.py - AI health workflows
ai-service/routers - AI provider chain
ai-service/services/provider_client.py
Oversight and NGO
- Pending review
backend/src/main/java/com/ashaai/backend/controller/PendingReviewController.java - NGO coordination
backend/src/main/java/com/ashaai/backend/controller/NgoController.java
Other components
- ASHA worker
- Supabase PostgreSQL
- NGO registration form
- External AI providers
Connections 25
- ASHA worker → Worker and admin PWA: uses
README.md - Worker and admin PWA → Authentication state: resolves identity
frontend/src/App.jsx - Worker and admin PWA → Health registers: routes to
frontend/src/App.jsx - Health registers → API client: submits data
- Voice and register capture → API client: sends capture
frontend/src/hooks/useVoiceRecorder.js - API client → Offline queue: queues requests
- Worker and admin PWA → Supervisor portal: routes to
frontend/src/App.jsx - Supervisor portal → API client: requests data
frontend/src/routes/admin/WorkerActivity.jsx - API client → Spring Boot API: HTTP requests
README.md - Spring Boot API → Supabase PostgreSQL: reads and writes
README.md - Spring Boot API → AI service API: calls AI service
README.md - AI service API → AI health workflows: registers routes
ai-service/main.py - AI service API → Conversational agent: registers route
ai-service/main.py - Conversational agent → AI health workflows: uses tools
ai-service/routers/agent.py - Conversational agent → AI provider chain: uses model service
- AI provider chain → External AI providers: queries providers
README.md - Spring Boot API → Survey processing: processes submissions
backend/src/main/java/com/ashaai/backend/service/SurveyProcessorService.java - Survey processing → Health records: persists records
backend/src/main/java/com/ashaai/backend/service/SurveyProcessorService.java - Spring Boot API → Risk scoring: scores health risk
backend/src/main/java/com/ashaai/backend/service/PriorityListService.java - Risk scoring → Health records: updates child risk
backend/src/main/java/com/ashaai/backend/service/RiskEngineService.java - Supervisor portal → Pending review: reviews cases
- Pending review → Health records: updates review status
backend/src/main/java/com/ashaai/backend/controller/PendingReviewController.java - NGO registration form → Spring Boot API: submits registration
README.md - Spring Boot API → NGO coordination: routes NGO requests
backend/src/main/java/com/ashaai/backend/controller/NgoController.java - Supervisor portal → NGO coordination: coordinates visits