How harshcodezzz/build-with-ai-hackathon works
JanSeva is a multilingual citizen-feedback platform that turns text or recorded complaints into tracked, analyzed infrastructure issues and policymaker priorities. The main path runs from the citizen portal through the backend and, for voice, transcription; complaints then enter the risk analyzer’s queued analysis, spatial clustering, and risk scoring, with results surfaced in citizen tracking and admin views. README-described integrations are included where source excerpts do not show their wiring; uncertain internal links are omitted.
Main entry points: index.ts Risk service entry · embedding.ts Embedding worker · App.jsx Portal routing · router.ts API router
Components 34
Citizen portal
- Portal routing
frontend-ai-hackathon/src/App.jsx - Citizen auth
frontend-ai-hackathon/src/context/AuthContext.jsx - Complaint submission
frontend-ai-hackathon/src/pages/SubmitComplaint.jsx - Audio recorder
frontend-ai-hackathon/src/hooks/useAudioRecorder.js - Citizen tracking
frontend-ai-hackathon/src/pages/ComplaintsList.jsx - Admin center
frontend-ai-hackathon/src/pages/admin/AdminDashboard.jsx - API client
frontend-ai-hackathon/src/utils/api.js
Backend API
- API entry
backend-ai-hackathon/src/index.ts - API router
backend-ai-hackathon/src/api/router.ts - Auth endpoints
backend-ai-hackathon/src/api/auth.ts - Token checks
backend-ai-hackathon/src/middlewares/auth.ts - Complaint endpoints
backend-ai-hackathon/src/api/complain.ts - Admin endpoints
backend-ai-hackathon/src/api/admin.ts - Audio upload URLs
backend-ai-hackathon/src/api/storage.ts - Audio object storage
backend-ai-hackathon/src/utils/s3.ts
Voice transcription
- Transcript service API
transcript-service/src/index.ts - Transcription jobs
transcript-service/src/services/queue.ts - Speech transcription
transcript-service/src/services/transcribe.ts - Translation
transcript-service/src/services/translate.ts - Transcript job store
transcript-service/db.js
Risk intelligence
- Risk service entry
risk-analyser/src/index.ts - Processing routes
risk-analyser/src/routes/process.ts - Batch orchestration
risk-analyser/src/services/batch.ts - Batch worker
risk-analyser/src/queues/workers/batch.ts - Embedding worker
risk-analyser/src/queues/workers/embedding.ts - Analysis worker
risk-analyser/src/queues/workers/analysis.ts - Risk scoring
risk-analyser/src/math/aiRisk.ts - Issue clustering
risk-analyser/src/services/complainAnalysis.ts - Geo-sharding
risk-analyser/src/services/geoshard.ts - Vector search
risk-analyser/src/services/pinecone.ts - Complaint database
risk-analyser/src/db/postgres.ts - Processing state
risk-analyser/src/db/sqlite.ts - Analysis queues
risk-analyser/src/queues/producers.ts
Other components
- Citizen
Connections 44
- Citizen → Portal routing: uses
README.md - Portal routing → Citizen auth: provides auth
frontend-ai-hackathon/src/App.jsx - Portal routing → Complaint submission: routes to
frontend-ai-hackathon/src/App.jsx - Portal routing → Citizen tracking: routes to
frontend-ai-hackathon/src/App.jsx - Portal routing → Admin center: routes to
frontend-ai-hackathon/src/App.jsx - Complaint submission → Audio recorder: records through
frontend-ai-hackathon/src/pages/SubmitComplaint.jsx - Citizen auth → API client: calls
frontend-ai-hackathon/src/context/AuthContext.jsx - Complaint submission → API client: submits through
frontend-ai-hackathon/src/pages/SubmitComplaint.jsx - API client → API entry: sends requests
README.md - API entry → API router: mounts
backend-ai-hackathon/src/index.ts - API router → Auth endpoints: routes to
backend-ai-hackathon/src/api/router.ts - API router → Complaint endpoints: routes to
backend-ai-hackathon/src/api/router.ts - API router → Admin endpoints: routes to
backend-ai-hackathon/src/api/router.ts - API router → Audio upload URLs: routes to
backend-ai-hackathon/src/api/router.ts - Auth endpoints → Token checks: uses
backend-ai-hackathon/src/api/auth.ts - Audio upload URLs → Token checks: checks tokens
backend-ai-hackathon/src/api/storage.ts - Audio upload URLs → Audio object storage: requests upload URL
backend-ai-hackathon/src/api/storage.ts - API entry → Transcript service API: voice processing integration
README.md - Transcript service API → Transcription jobs: queues jobs
transcript-service/src/index.ts - Transcript service API → Speech transcription: runs transcription
transcript-service/src/index.ts - Transcript service API → Translation: translates text
transcript-service/src/index.ts - Speech transcription → Audio object storage: fetches audio
transcript-service/src/services/transcribe.ts - Speech transcription → Transcript job store: saves transcript
transcript-service/src/services/transcribe.ts - Transcription jobs → Speech transcription: runs jobs
transcript-service/src/services/queue.ts - API entry → Risk service entry: submits complaints
README.md - Risk service entry → Processing routes: mounts routes
risk-analyser/src/index.ts - Risk service entry → Batch worker: starts worker
risk-analyser/src/index.ts - Risk service entry → Embedding worker: starts worker
risk-analyser/src/index.ts - Risk service entry → Analysis worker: starts worker
risk-analyser/src/index.ts - Processing routes → Batch orchestration: invokes
risk-analyser/src/routes/process.ts - Batch orchestration → Analysis queues: enqueues work
risk-analyser/src/services/batch.ts - Batch worker → Embedding worker: dispatches embedding stage
- Embedding worker → Complaint database: reads complaints
risk-analyser/src/queues/workers/embedding.ts - Embedding worker → Geo-sharding: resolves blocks
risk-analyser/src/queues/workers/embedding.ts - Embedding worker → Vector search: upserts vectors
risk-analyser/src/queues/workers/embedding.ts - Embedding worker → Processing state: updates status
risk-analyser/src/queues/workers/embedding.ts - Embedding worker → Analysis worker: queues analysis
risk-analyser/src/queues/workers/embedding.ts - Analysis worker → Risk scoring: scores complaints
- Analysis worker → Issue clustering: clusters issues
- Risk service entry → Vector search: prepares index
risk-analyser/src/index.ts - Risk service entry → Complaint database: connects
risk-analyser/src/index.ts - Risk service entry → Processing state: initializes
risk-analyser/src/index.ts - Risk service entry → Citizen tracking: status tracking
README.md - Risk service entry → Admin center: risk results and leaderboard
README.md