How alok-codes21/civicsync works
CivicSync is an API-only civic complaint tracking and escalation backend. Citizens submit and track complaints, while authenticated users and officials can add timeline events or change status; deadline sweeps escalate unresolved cases. The API, authentication, complaint handling, and persistence are implemented together in one server file, with sample records and department mappings in a separate seed module. The excerpts omit several routes, so their documented capabilities are shown without assuming internal call relationships.
Main entry points: index.cjs REST API · seed.cjs Sample data and rules
Components 14
API and access
- REST API
server/index.cjs - Authentication
server/index.cjs - Login rate limits
server/index.cjs
Complaint workflow
- Complaint intake
server/index.cjs - Department assignment
server/index.cjs - Status updates
server/index.cjs - Complaint timeline
server/index.cjs - Auto-escalation
server/index.cjs - Complaint tracking
server/index.cjs - Public dashboard stats
server/index.cjs
Data and persistence
- Sample data and rules
server/seed.cjs - SQLite database
server/index.cjs
Other components
- Citizen
- Official
Connections 21
- Citizen → REST API: uses API
README.md - Official → REST API: uses API
README.md - REST API → Authentication: routes login
server/index.cjs - REST API → Login rate limits: limits attempts
server/index.cjs - REST API → Complaint intake: accepts reports
README.md - Complaint intake → Department assignment: auto-assigns
README.md - Complaint intake → SQLite database: writes complaint
server/index.cjs - Complaint intake → Complaint timeline: writes events
server/index.cjs - REST API → Status updates: routes changes
server/index.cjs - Status updates → Authentication: checks user
server/index.cjs - Status updates → SQLite database: updates status
server/index.cjs - Status updates → Complaint timeline: writes event
server/index.cjs - REST API → Complaint tracking: serves lookup
README.md - REST API → Public dashboard stats: serves counts
README.md - REST API → Auto-escalation: sweeps on reads
README.md - Auto-escalation → SQLite database: updates complaints
server/index.cjs - Auto-escalation → Complaint timeline: records escalation
server/index.cjs - REST API → Sample data and rules: imports rules
server/index.cjs - Sample data and rules → SQLite database: seeds records
server/index.cjs - Complaint tracking → SQLite database: reads complaints
server/index.cjs - Public dashboard stats → SQLite database: aggregates counts
server/index.cjs