How pragatheesvar-a/civitrace_ai works
CiviTrace AI is a civic-issue reporting and resolution platform. Citizens submit multilingual reports with location and optional photos; the backend verifies and prioritizes them, groups nearby duplicates, and exposes issues to a community feed and authority triage workflow. The React application also provides maps, issue details, emergency access, payments, and a civic assistant. The README documents several capabilities whose implementation was not sampled; those subsystems are represented at their supported source paths, with uncertain connections omitted. Some relationships are documented by the README rather than visible in the excerpts.
Main entry points: main.py FastAPI Service · App.jsx Web Application · verify.py Report Verification · api.jsx API Client
Components 26
Citizen and Authority UI
- Web Application
web/src/App.jsx - Report Submission
web/src/pages/Report.jsx - Authority Hub
web/src/pages/Authority.jsx - Community Views
web/src/pages/IssueDetail.jsx - API Client
web/src/api.jsx - Camera and Photos
web/src/camera.jsx
Civic Issue Workflow
- FastAPI Service
backend/main.py - Issue and User Data
backend/models.py - Issue Deduplication
backend/ai/dedup.py - Priority Scoring
backend/ai/priority.py - Evidence Review
backend/ai/evidence.py - Authority Analytics
backend/analytics.py - Ward Fairness
backend/ai/wards.py - Rainfall Signals
backend/ai/weather.py
AI and Guidance
- Report Verification
backend/ai/verify.py - Scene Relevance
backend/ai/scene_gate.py - Pothole Detection
backend/ai/detector.py - Text Classification
backend/ai/text_classifier.py - Authenticity Assessment
backend/ai/authenticity.py - Civic Assistant
backend/ai/assistant.py - Civic Guidance Retrieval
backend/ai/rag.py
Identity and Community
- Authentication
backend/auth.py - Phone OTP
backend/phone_auth.py - Payments
backend/payments.py
Other components
- Citizens
- Authority Staff
Connections 27
- Citizens → Web Application: use
README.md - Authority Staff → Web Application: use
README.md - Web Application → Report Submission: routes to
web/src/App.jsx - Web Application → Authority Hub: routes to
web/src/App.jsx - Web Application → Community Views: routes to
web/src/App.jsx - Report Submission → Camera and Photos: uses
web/src/pages/Report.jsx - Report Submission → API Client: submits through
web/src/pages/Report.jsx - Authority Hub → API Client: requests data
web/src/pages/Authority.jsx - Community Views → API Client: requests data
web/src/pages/IssueDetail.jsx - API Client → FastAPI Service: calls API
README.md - FastAPI Service → Issue and User Data: persists issues
backend/main.py - FastAPI Service → Report Verification: runs verification
backend/main.py - Report Verification → Scene Relevance: checks scene
backend/ai/verify.py - Report Verification → Pothole Detection: detects defects
backend/ai/verify.py - Report Verification → Text Classification: classifies text
backend/ai/verify.py - FastAPI Service → Issue Deduplication: deduplicates reports
backend/main.py - FastAPI Service → Priority Scoring: scores priority
backend/main.py - FastAPI Service → Authenticity Assessment: assesses authenticity
backend/main.py - FastAPI Service → Evidence Review: handles evidence
backend/main.py - FastAPI Service → Civic Assistant: serves assistant
backend/main.py - Civic Assistant → Civic Guidance Retrieval: retrieves guidance
backend/ai/assistant.py - FastAPI Service → Authority Analytics: serves analytics
README.md - FastAPI Service → Ward Fairness: serves fairness data
README.md - FastAPI Service → Rainfall Signals: uses rainfall signals
backend/main.py - FastAPI Service → Authentication: authenticates users
backend/main.py - FastAPI Service → Phone OTP: supports phone OTP
README.md - FastAPI Service → Payments: serves payments
README.md