How joeltkvaidyan/shramsetu works
ShramSetu is a multilingual migrant-worker welfare platform: workers register and use welfare services, while officials review jurisdiction-scoped cases and alerts. The React client calls the Node API for identity, records, and business rules; the Node service persists domain data in MongoDB and proxies AI requests to the Python service. The AI service provides scheme retrieval and voice capabilities. Several feature modules were not sampled, so their presence and broad responsibilities come from the README and tree; edges are limited to documented or excerpted relationships.
Main entry points: app.js API route dispatch · App.tsx Web application · main.py AI service API · db.js MongoDB
Components 25
Worker and official client
- Web application
frontend/src/App.tsx - Worker registration
frontend/src/pages/WorkerRegisterPage.tsx - Worker dashboard
frontend/src/pages/WorkerDashboardPage.tsx - Document wallet
frontend/src/pages/DocumentWalletPage.tsx - Grievance filing and tracking
frontend/src/pages/GrievanceFormPage.tsx - Government dashboard
frontend/src/pages/GovernmentDashboardPage.tsx - API client
frontend/src/api/client.ts
Welfare API
- API route dispatch
server/src/app.js - Authentication and RBAC
server/src/middleware/auth.js - Grievance service
server/src/routes/grievances.js - Encrypted document wallet
server/src/routes/documents.js - Government operations
server/src/routes/government.js - AI chat proxy
server/src/routes/chat.js - Wage diary and SOS
server/src/routes
Welfare records
- MongoDB
server/src/db.js - Domain models
server/src/models
AI and voice
- AI service API
ai-service/main.py - Grounded scheme answers
ai-service/app/services/rag_service.py - Speech recognition and synthesis
ai-service/app/services - Indic query translation
ai-service/app/services/translation_service.py - Model readiness
ai-service/app/core/warmup.py
Scheme knowledge
- Scheme document ingestion
ai-service/rag/ingest.py - Hybrid retrieval and embeddings
ai-service/rag
Other components
- Worker
- Government official
Connections 27
- Worker → Web application: uses
README.md - Government official → Web application: uses
README.md - Web application → Worker registration: routes to
frontend/src/App.tsx - Web application → Worker dashboard: routes to
frontend/src/App.tsx - Web application → Document wallet: routes to
frontend/src/App.tsx - Web application → Grievance filing and tracking: routes to
frontend/src/App.tsx - Web application → Government dashboard: routes to
frontend/src/App.tsx - Worker registration → API client: calls
frontend/src/pages/WorkerRegisterPage.tsx - Worker dashboard → API client: calls
frontend/src/pages/WorkerDashboardPage.tsx - API client → API route dispatch: REST requests
README.md - API route dispatch → Authentication and RBAC: protects routes
server/src/middleware/auth.js - API route dispatch → Grievance service: dispatches
server/src/app.js - API route dispatch → Encrypted document wallet: dispatches
server/src/app.js - API route dispatch → Government operations: dispatches
server/src/app.js - API route dispatch → AI chat proxy: dispatches
server/src/app.js - API route dispatch → Wage diary and SOS: dispatches
server/src/app.js - Grievance service → MongoDB: persists records
README.md - Encrypted document wallet → MongoDB: stores wallet data
README.md - Government operations → MongoDB: reads records
README.md - Domain models → MongoDB: models data in
README.md - AI chat proxy → AI service API: proxies requests
README.md - AI service API → Grounded scheme answers: routes questions
ai-service/main.py - AI service API → Speech recognition and synthesis: routes voice
ai-service/main.py - Grounded scheme answers → Indic query translation: translates query
ai-service/app/services/rag_service.py - Grounded scheme answers → Hybrid retrieval and embeddings: retrieves evidence
ai-service/app/services/rag_service.py - Scheme document ingestion → Hybrid retrieval and embeddings: builds index
ai-service/rag/ingest.py - AI service API → Model readiness: reports readiness
ai-service/main.py