Public Complaints WhatsApp Bot
A WhatsApp bot for public complaints with an integrated management system.
Tech Stack :

The WhatsApp bot "Purwakarta Istimewa" is part of PISA, an integrated public service information system designed to make citizen interaction with local government faster, more accessible, and more transparent. This system enables citizens to submit and track reports, engage in real-time consultations, and receive official responses—all directly through WhatsApp.
Built with AdonisJS v5 using Node.js and TypeScript, the backend connects to a MySQL database and features a frontend rendered using Edge (AdonisJS’s templating engine) styled with Bootstrap. For direct communication, the platform integrates Socket.IO to power real-time chat between citizens and admin officers. The system is officially connected to the WhatsApp Business API, and I developed and open-sourced a custom AdonisJS v5 package to support this integration, available on my GitHub.
Data security is a top priority. Sensitive citizen data—including personal identities and conversation logs—is fully encrypted in the database to maintain confidentiality and compliance with data protection standards.
Here’s how it works: if a citizen is not yet registered in the system, the bot will first request essential information such as full name, national ID (NIK), and area of residence. Once registered, citizens can choose to submit a report, chat directly with the public complaint officer, or view and track their previous submissions.
For report submission, users are prompted to enter details such as the report type (complaint, information request, or aspiration), a title, a full description, and optional attachments like images or shared location data. Once submitted, the report is assigned to a relevant department or agency (OPD) by the complaint admin. OPD admins receive WhatsApp notifications and must follow up through the PISA web interface, where they can respond with comments, attach supporting files, and mark reports as resolved once completed.
The system also includes a reporting feature that allows exporting all reports within a selected date range to Excel, and exporting individual reports to PDF. To ensure lightweight PDF generation, I used PHP and DomPDF via a system-level interpreter, avoiding the overhead of Puppeteer in Node.js environments.
If you're planning to build a similar public-facing chatbot or integrate real-time government services over WhatsApp, feel free to reach out via the contact page.