How aspathak2705/rupeetrace works
RupeeTrace is a civic road-repair accountability platform. Citizens and municipal officers use the web app to inspect roads, complaints, repairs and evidence, or submit observations and clarifications; municipal users can also review audits and contractor performance and prioritize repair funding. The backend loads provenance-bearing civic records, links them into relationships, computes financial and accountability insights, and persists shared civic workflows in SQLite. The graph keeps major documented capabilities even where their implementation was not sampled; dashed, uncited links mark wiring that the excerpts do not establish.
Main entry points: routes REST route handlers · App.tsx App navigation · client.ts API client · relationship_service.py Relationship index
Components 25
Web application
- App navigation
frontend/src/App.tsx - Session context
frontend/src/context/AuthContext.tsx - API client
frontend/src/api/client.ts - Road passport
frontend/src/views/RoadPassportView.tsx - Money trace graph
frontend/src/views/VisualMoneyTraceGraphView.tsx - Audit investigation
frontend/src/views/AuditsInvestigationView.tsx - Accountability views
frontend/src/views/FairAccountabilityView.tsx - Next Rupee planner
frontend/src/views/NextRupeePlannerView.tsx - AI assistant drawer
frontend/src/components/AIAssistantDrawer.tsx - Citizen-officer cases
frontend/src/views/CitizenOfficerCasesView.tsx
API and access
- REST route handlers
rupeetrace/api/routes - Role authorization
rupeetrace/core/auth.py
Civic data
- Dataset ingestion
rupeetrace/data/data_loader.py - Domain entities
rupeetrace/models/entities.py - Relationship index
rupeetrace/services/relationship_service.py - Civic SQLite store
rupeetrace/data/civic_db.py
Financial intelligence
- Money trail analysis
rupeetrace/services/money_trail_service.py - Repair auditor
rupeetrace/services/audit_service.py - Contractor accountability
rupeetrace/services/accountability_service.py - Budget allocation
rupeetrace/services/next_rupee_service.py - Graph construction
rupeetrace/services/graph_service.py - Evidence-grounded assistant
rupeetrace/services/assistant_service.py
Citizen workflows
- Citizen proposals
rupeetrace/services/janmat_service.py - Case workflow
rupeetrace/services/case_service.py
Other components
- Citizen or officer
Connections 36
- Citizen or officer → App navigation: uses
README.md - App navigation → Session context: provides session
frontend/src/App.tsx - Session context → API client: logs in
frontend/src/context/AuthContext.tsx - App navigation → Road passport: routes to
- App navigation → Money trace graph: routes to
- App navigation → Audit investigation: routes to
- App navigation → Accountability views: routes to
- App navigation → Next Rupee planner: routes to
frontend/src/App.tsx - App navigation → AI assistant drawer: renders
frontend/src/App.tsx - App navigation → Citizen-officer cases: routes to
- Road passport → API client: requests data
- Money trace graph → API client: requests graph
- Audit investigation → API client: requests findings
- Next Rupee planner → API client: requests plans
frontend/src/views/NextRupeePlannerView.tsx - AI assistant drawer → API client: asks questions
frontend/src/components/AIAssistantDrawer.tsx - Citizen-officer cases → API client: submits cases
- API client → REST route handlers: HTTP requests
frontend/src/api/client.ts - REST route handlers → Role authorization: checks roles
rupeetrace/api/routes/auth.py - REST route handlers → Money trail analysis: dispatches
- REST route handlers → Repair auditor: dispatches
- REST route handlers → Contractor accountability: dispatches
- REST route handlers → Budget allocation: dispatches
- REST route handlers → Graph construction: dispatches
- REST route handlers → Evidence-grounded assistant: dispatches
- REST route handlers → Citizen proposals: dispatches
- REST route handlers → Case workflow: dispatches
- Dataset ingestion → Domain entities: constructs
rupeetrace/data/data_loader.py - Relationship index → Dataset ingestion: indexes records
rupeetrace/services/relationship_service.py - Money trail analysis → Relationship index: reads relationships
- Repair auditor → Relationship index: reads relationships
rupeetrace/services/audit_service.py - Graph construction → Relationship index: builds graph from
rupeetrace/services/graph_service.py - Evidence-grounded assistant → Relationship index: retrieves evidence
rupeetrace/services/assistant_service.py - Citizen proposals → Relationship index: uses road context
rupeetrace/services/janmat_service.py - Citizen proposals → Civic SQLite store: persists proposals
rupeetrace/services/janmat_service.py - Case workflow → Civic SQLite store: persists cases
- Evidence-grounded assistant → Citizen or officer: optional AI service