How ranuramadan/uas-gen-ai works
SIGAP Kota is a citizen-reporting chatbot and staff dashboard. Residents chat to supply five required complaint details; Gemini classifies a complete report and returns a confirmation summary, which the resident can submit. Residents can look up report status by phone, while staff use the demo admin dashboard to review reports and change their status. Evidence is limited to the README and sampled files; frontend-to-API links are shown where fetch calls are excerpted, while admin detail navigation is not mapped because its implementation was not sampled.
Main entry points: progressRoutes.js Progress endpoints · firebase.js Report operations · app.js Complaint chat · gemini.js Complaint analysis
Components 13
Resident reporting
- Complaint chat
Frontend/js/app.js - Summary and submission
Frontend/js/app.js - Resident history lookup
Frontend/js/app.js
API and AI
- Chat endpoint
Backend/routes/chatRoutes.js - Complaint analysis
Backend/gemini.js
Report management
- Progress endpoints
Backend/routes/progressRoutes.js - Report operations
Backend/firebase.js - SQLite reports
Backend/db.js
Staff dashboard
- Admin dashboard
Frontend/js/admin.js - Admin report detail
Frontend/hasil.html
Other components
- Resident
- Gemini API
- Staff
Connections 17
- Resident → Complaint chat: submits details
README.md - Complaint chat → Chat endpoint: sends chat
Frontend/js/app.js - Chat endpoint → Complaint analysis: dispatches to
Backend/routes/chatRoutes.js - Complaint analysis → Gemini API: analyzes with
Backend/gemini.js - Complaint analysis → Chat endpoint: returns analysis
Backend/gemini.js - Complaint chat → Summary and submission: renders summary
Frontend/js/app.js - Resident → Summary and submission: confirms report
README.md - Summary and submission → Progress endpoints: submits report
Frontend/js/app.js - Progress endpoints → Report operations: creates report
Backend/routes/progressRoutes.js - Progress endpoints → Report operations: lists reports
Backend/routes/progressRoutes.js - Progress endpoints → Report operations: updates status
Backend/routes/progressRoutes.js - Report operations → SQLite reports: reads and writes
Backend/firebase.js - Resident → Resident history lookup: looks up status
README.md - Resident history lookup → Progress endpoints: requests by phone
Frontend/js/app.js - Staff → Admin dashboard: reviews reports
README.md - Admin dashboard → Progress endpoints: loads and updates
README.md - Admin dashboard → Admin report detail: opens details
Frontend/js/admin.js