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 interactions between citizens and local government faster, more accessible, and more transparent. Through this system, citizens can submit and track reports, engage in real time consultations, and receive official responses directly through WhatsApp without needing to access a separate website.
The backend is built with AdonisJS v5 using Node.js and TypeScript and connects to a MySQL database. The frontend uses Edge, the templating engine provided by AdonisJS, and is styled with Bootstrap. For direct communication, the platform integrates Socket.IO, allowing real time chat between citizens and administrative officers. The system is officially connected to the WhatsApp Business API, and I created and open sourced a custom AdonisJS v5 package to support this integration, which is available on my GitHub.
Data security is a key priority throughout the system. Sensitive information, including personal identities and conversation histories, is fully encrypted within the database to ensure confidentiality and compliance with data protection requirements.
When a citizen interacts with the bot for the first time, the system requests essential information such as full name, national identification number, and area of residence. Once registered, users can submit a new report, chat directly with the public complaint officer, or review their previous submissions. When submitting a report, users provide details such as the type of report, the title, a full description, and optional attachments like images or shared location data. After submission, the complaint admin assigns the report to the appropriate department or government agency. OPD administrators receive notifications via WhatsApp and must follow up through the PISA web interface, where they can add comments, upload supporting files, and mark the report as resolved once the issue has been addressed.
The system also offers a reporting feature that allows exporting all reports within a specific date range to Excel, along with PDF export for individual reports. To ensure lightweight and efficient PDF generation, I used PHP and DomPDF through a system level interpreter, avoiding the performance overhead commonly found in Puppeteer based solutions within Node.js environments.
If you are looking to build a similar public facing chatbot or want to integrate real time government services through WhatsApp, feel free to reach out through the contact page.
