How shreevathsa05/statathon-narad works
NARAD is a multi-channel survey platform: administrators design and publish surveys, respondents complete them through web, messaging, telephone, or field channels, and the core API stores responses for operational use and analytics. The AI service supports context-grounded questionnaire generation and multilingual speech workflows; the IVR service transcribes recorded answers and submits them to the core API. WhatsApp session persistence and mobile offline synchronization are supported by sampled source. Some README-described services are represented by their enclosing directories because their implementation was not sampled.
Main entry points: src/app.js Core API · ai/app.js AI Survey Engine · callController.js IVR Service · whatsapp.controller.js WhatsApp Survey Flow
Components 24
Survey Design
- Survey Admin
frontend/admin/src/App.jsx - AI Builder
frontend/admin/src/pages/sdrd/AIPromptBuilder.jsx
Core Data API
- Core API
backend/main2/src/app.js - Survey Management
backend/main2/src/controllers/surveyController.js - Response Management
backend/main2/src/controllers/responseController.js - Authentication
backend/main2/src/controllers/authController.js - Analytics Dashboard
frontend/admin/src/pages/AnalyticsDashboard.jsx
Collection Channels
- Citizen Web App
frontend/citizen/src/pages/SurveyPage.jsx - Mobile App
frontend/mobile-app/src/app/(tabs)/active.tsx - WhatsApp Bot
backend/whatsapp_delivery_bot/app.js - WhatsApp Survey Flow
backend/whatsapp_delivery_bot/controllers/whatsapp.controller.js - IVR Service
backend/exotel/src/controllers/callController.js - Telegram Delivery
backend/delivery_bot
AI Services
- AI Survey Engine
backend/ai/app.js - Question Generation
backend/ai/src/router/question_generation_route.js - Agent Pipeline
backend/ai/src/models/agents.js - Speech Processing
backend/ai/src/router/speech_conversion.js - Media Storage
backend/ai/src/utils/minio/client.js
Survey State
- Survey Store
backend/main2/src/models/surveySchema.js - Response Store
backend/main2/src/models/responsesSchema.js - Offline Survey State
frontend/mobile-app/src/utils/filestorage.js - WhatsApp Sessions
backend/whatsapp_delivery_bot/services/session.service.js
Other components
- MoSPI MCP
- Twilio / Exotel
Connections 26
- Survey Admin → AI Builder: configures
- AI Builder → AI Survey Engine: requests generation
- AI Survey Engine → Question Generation: routes requests
- Question Generation → Agent Pipeline: runs pipeline
- Agent Pipeline → MoSPI MCP: retrieves context
- Question Generation → Survey Store: saves generated survey
- Survey Admin → Core API: manages surveys
- Core API → Survey Management: routes survey requests
- Core API → Response Management: routes response requests
- Core API → Authentication: routes authentication
- Survey Management → Survey Store: reads and writes
- Response Management → Response Store: reads and writes
- Citizen Web App → Core API: fetches surveys and submits
- Mobile App → Core API: fetches and syncs
- Mobile App → Offline Survey State: stores offline surveys
- Offline Survey State → Core API: syncs pending responses
- WhatsApp Bot → WhatsApp Survey Flow: dispatches webhooks
- WhatsApp Survey Flow → WhatsApp Sessions: stores session and answers
- WhatsApp Survey Flow → Response Store: records responses
- IVR Service → Twilio / Exotel: starts calls and handles webhooks
- IVR Service → Core API: fetches survey and submits responses
- IVR Service → AI Survey Engine: requests transcription and audio
- AI Survey Engine → Speech Processing: routes speech requests
- Speech Processing → Media Storage: accesses generated media
- Telegram Delivery → Survey Store: delivers surveys
- Analytics Dashboard → Core API: retrieves survey data