How sheetalchaurasia13-max/civicproofai works
CivicProof AI is a civic-issue reporting and risk-awareness application. Citizens capture evidence, run image triage, and submit complaints; reports can be queued offline and later synced, then shown on a risk map. Separate API routes cover verification, image OCR, geocoding, places, chat, comparison, analysis, and safer routing. The excerpts support the complaint, map, local-AI, offline-sync, and routing links; other route behavior is represented from filenames only, so no unverified connections are asserted.
Main entry points: civic-proof-app.tsx CivicProof app · complaints/route.ts Complaint API · route/route.ts Safer routing · page.tsx Home entry
Components 21
Citizen experience
- Home entry
app/page.tsx - Screen entry
app/[screen]/page.tsx - CivicProof app
components/civic-proof-app.tsx - Risk map
components/civic-risk-map.tsx - Button UI
components/ui/button.tsx
Reports and routing
- Offline queue
lib/offline-queue.ts - Complaint API
app/api/complaints/route.ts - Safer routing
app/api/route/route.ts - Complaints store
- Route cache
AI and integrations
- Local image triage
lib/local-civic-ai.ts - Analysis API
app/api/analyze/route.ts - AI chat API
app/api/chat/route.ts - Comparison API
app/api/compare/route.ts - Verification API
app/api/verify/route.ts - OCR API
app/api/ocr/route.ts - Geocoding API
app/api/geocode/route.ts - Places API
app/api/places/route.ts - Image storage client
lib/supabase.ts
Other components
- Citizen
- OSRM routing
Connections 14
- Citizen → Home entry: opens
app/page.tsx - Citizen → Screen entry: opens
app/[screen]/page.tsx - Home entry → CivicProof app: renders
app/page.tsx - Screen entry → CivicProof app: renders
app/[screen]/page.tsx - CivicProof app → Local image triage: analyzes image
components/civic-proof-app.tsx - CivicProof app → Offline queue: queues and syncs
components/civic-proof-app.tsx - Offline queue → Complaint API: posts reports
lib/offline-queue.ts - Risk map → Complaint API: fetches and upvotes
components/civic-risk-map.tsx - Complaint API → Complaints store: reads and writes
app/api/complaints/route.ts - Complaint API → Image storage client: uploads evidence
app/api/complaints/route.ts - Image storage client → Complaints store: stores images
lib/supabase.ts - Safer routing → Complaints store: reads hazards
app/api/route/route.ts - Safer routing → OSRM routing: requests routes
app/api/route/route.ts - Safer routing → Route cache: caches result
app/api/route/route.ts