How muthugopi/sahakar-sathi works
Sahakar Sathi is a multilingual cooperative-support web application with an Express API. Members browse verified guidance and schemes, ask grounded questions with voice support, and submit or track grievances; administrators manage knowledge, schemes, and grievance status. The graph combines sampled call/import evidence with README-documented capabilities. Several API routes, services, and web pages were not sampled, so their documented connections are cited to the README rather than presented as inspected call paths.
Main entry points: App.tsx Web application · prisma.ts PostgreSQL and pgvector · chat.service.ts Chat orchestration · admin Admin services
Components 20
Member experience
- Web application
apps/web/src/App.tsx - Assistant experience
apps/web/src/pages/AssistantPage.tsx - Voice input and playback
apps/web/src/lib/speech.ts - Schemes and topics
apps/web/src/pages/SchemesPage.tsx - Grievance pages
apps/web/src/pages/GrievancePage.tsx - Admin pages
apps/web/src/pages/admin
API and workflows
- API application
apps/api/src/app.ts - Authentication
apps/api/src/services/auth.service.ts - Chat orchestration
apps/api/src/services/chat.service.ts - Grievance workflow
apps/api/src/services/grievance.service.ts - Content services
apps/api/src/services/content.service.ts
Knowledge and answers
- Verified retrieval
apps/api/src/services/retrieval.service.ts - Text embeddings
apps/api/src/ai/embeddings.ts - Question routing
apps/api/src/ai/classify.ts - Answer generation
apps/api/src/ai/llm.ts - Web search
apps/api/src/services/websearch.service.ts
Administration
- Admin services
apps/api/src/services/admin
Shared platform
- PostgreSQL and pgvector
apps/api/src/config/prisma.ts - Shared contracts
packages/shared/src/schemas.ts
Other components
- Members
Connections 26
- Members → Web application: use
apps/web/src/App.tsx - Web application → Assistant experience: routes to
apps/web/src/App.tsx - Web application → Schemes and topics: routes to
apps/web/src/App.tsx - Web application → Grievance pages: routes to
apps/web/src/App.tsx - Web application → Admin pages: routes to
apps/web/src/App.tsx - Assistant experience → Voice input and playback: uses
- Assistant experience → Chat orchestration: asks
- Schemes and topics → Content services: fetches
- Grievance pages → Grievance workflow: submits and tracks
- Admin pages → Admin services: manages
- API application → PostgreSQL and pgvector: connects through
apps/api/src/config/prisma.ts - Chat orchestration → Question routing: routes questions
- Chat orchestration → Verified retrieval: retrieves evidence
- Verified retrieval → Text embeddings: embeds query
apps/api/src/services/retrieval.service.ts - Verified retrieval → PostgreSQL and pgvector: queries vectors
apps/api/src/services/retrieval.service.ts - Chat orchestration → Answer generation: generates answer
- Chat orchestration → Web search: searches current topics
- Web search → PostgreSQL and pgvector: uses configuration
- Grievance workflow → PostgreSQL and pgvector: persists workflow
- Content services → PostgreSQL and pgvector: reads content
- Admin services → PostgreSQL and pgvector: manages records
apps/api/src/services/admin/scheme-admin.service.ts - Admin services → Grievance workflow: updates status
apps/api/src/services/admin/grievance-admin.service.ts - Admin services → Verified retrieval: maintains knowledge
apps/api/src/services/admin/knowledge-admin.service.ts - Authentication → PostgreSQL and pgvector: stores accounts
apps/api/src/services/auth.service.ts - Web application → Shared contracts: uses contracts
- Admin services → Shared contracts: validates contracts