How ahmed252832/civic_app works
CivicPulse Dhaka is a role-based complaint-management app for a Dhaka pilot area, offered as a hosted site and separate local web and Electron apps. Citizens register, submit and track reports; administrators verify, reject, identify duplicates, assign work and review analytics; assigned staff record progress; citizens can follow updates and provide feedback. The React client supports paged/searchable lists, case details and public maps. Backend variants share report and account logic, with distinct local-file and hosted Durable Object persistence. Major documented capabilities include administration, audit, encrypted backups and CSV export. Some feature wiring is documented in the README but absent from the sampled excerpts.
Main entry points: store.cjs Domain store · api.ts API client · App.tsx App interface · database.cjs Local SQLite adapter
Components 20
CivicPulse client
- App interface
src/App.tsx - Maps and picker
src/MapViews.tsx - API client
src/api.ts - Encrypted backup
src/backup.ts
Local runtime
- Local web server
server/web.cjs - Desktop IPC
electron/main.cjs - Local SQLite adapter
electron/database.cjs - Local database file
Hosted runtime
- Worker and API
cloudflare/worker.mjs - Dhaka Durable Object
cloudflare/worker.mjs
Complaint services
- Domain store
shared/store.cjs - Report lifecycle
shared/store.cjs - Accounts and access
shared/store.cjs - Lists and analytics
shared/store.cjs - Administration and audit
shared/store.cjs - Backup and export
shared/store.cjs
Other components
- Citizens
- Administrators
- Department staff
- OpenStreetMap tiles
Connections 22
- Citizens → App interface: report and follow
- Administrators → App interface: verify and assign
- Department staff → App interface: record progress
- App interface → API client: requests
- App interface → Maps and picker: renders locations
- Maps and picker → OpenStreetMap tiles: loads tiles
- API client → Local web server: sends requests
- API client → Desktop IPC: dispatches IPC
- API client → Worker and API: sends requests
- Encrypted backup → API client: pages and closes
- Local web server → Local SQLite adapter: creates database
- Desktop IPC → Local SQLite adapter: creates database
- Local SQLite adapter → Domain store: provides SQL operations
- Local SQLite adapter → Local database file: persists
- Worker and API → Dhaka Durable Object: dispatches API
- Dhaka Durable Object → Domain store: creates store
- Domain store → Report lifecycle: handles reports
- Domain store → Accounts and access: handles accounts
- Domain store → Lists and analytics: queries cases
- Domain store → Administration and audit: manages access and audit
- Domain store → Backup and export: serves backup and export
- Encrypted backup → Backup and export: collects pages