How guna-meda/egov-monorepo works
eGOV is a grievance-management monorepo: citizens submit complaints and view them on maps, while staff browse complaints and ward analytics. The intended enrichment stages classify complaint text and detect recurrence, but the README describes their connection through ingestion as planned; the enrichment function is currently a stub. The map and upload routes are visible in frontend source, and API/controller ownership is visible in sampled service files. Internal service, persistence, and API-client wiring not shown in the excerpts is represented only where documented; uncertain links are omitted.
Main entry points: routes.ts Web routes · pipeline.py Enrichment pipeline · complaintApi.ts Complaint API client · complaint.service.ts Complaint operations
Components 28
Web application
- Web routes
frontend/src/routes.ts - Submission action
frontend/src/actions/grievanceUploadAction.ts - Map loader
frontend/src/loaders/mapLoader.ts - Complaint API client
frontend/src/api/complaintApi.ts - Media API client
frontend/src/api/mediaApi.ts
Complaint service
- Complaint routes
complaint-service/src/routes/complaint.routes.ts - Complaint controller
complaint-service/src/controllers/complaint.controller.ts - Complaint operations
complaint-service/src/services/complaint.service.ts - Complaint repository
complaint-service/src/repositories/complaint.repository.ts - Complaint database
packages/shared/src/db/schema/complaint.schema.ts - Media routes
complaint-service/src/routes/media.routes.ts - Media operations
complaint-service/src/services/media.service.ts
GIS service
- GIS routes
gis-service/src/routes/gis.routes.ts - GIS controller
gis-service/src/controllers/gis.controller.ts - GIS operations
gis-service/src/services/gis.service.ts - GIS repository
gis-service/src/repositories/gis.repository.ts - Boundary database
gis-service/src/db/schema/boundary_layers.schema.ts
Complaint analysis
- Classification API
classification-service/src/api/routes.py - Category predictor
classification-service/src/classification/predictor.py - Recurrence API
recurrence-service/app/api/v1/recurrence.py - Recurrence detection
recurrence-service/app/services/recurrence_service.py
Planned enrichment
- Kafka consumer
ingestion-service/app/consumer/kafka_consumer.py - Enrichment pipeline
ingestion-service/app/enrichment/pipeline.py - Enrichment records
packages/shared/src/db/schema/ai_enrichment.schema.ts
Other components
- Citizen
- Staff
- Cloudinary
- Kafka
Connections 28
- Citizen → Web routes: uses
- Staff → Web routes: uses
- Web routes → Submission action: dispatches
- Submission action → Complaint API client: submits through
- Web routes → Map loader: loads map
- Web routes → Complaint API client: requests complaints
- Complaint API client → Complaint routes: HTTP requests
- Complaint routes → Complaint controller: dispatches
- Complaint controller → Complaint operations: calls
- Complaint operations → Complaint repository: uses
- Complaint repository → Complaint database: reads and writes
- Media API client → Media routes: HTTP requests
- Media routes → Media operations: dispatches
- Media operations → Cloudinary: stores media
- Map loader → GIS routes: requests boundaries
- GIS routes → GIS controller: dispatches
- GIS controller → GIS operations: calls
- GIS operations → GIS repository: uses
- GIS repository → Boundary database: reads and writes
- Kafka → Kafka consumer: delivers events
- Complaint operations → Kafka: publishes created event
- Kafka consumer → Enrichment pipeline: passes payload
- Enrichment pipeline → Classification API: requests classification
- Enrichment pipeline → Recurrence API: requests recurrence
- Classification API → Category predictor: calls
- Recurrence API → Recurrence detection: calls
- Enrichment pipeline → Enrichment records: writes results
- Complaint API client → Enrichment records: reads results