Welcome to the WhatsApp Bot v1.0 project! This bot automates the process of validating residents' information and generating official documents via WhatsApp.
- Navigate to the project directory:
cd /path/to/your/project
- Install dependencies:
npm install npm update
- Start the bot:
node index.js
- NIK Validation:
- Users will be prompted to enter their NIK (National Identity Number) for validation.
- Service Selection:
- Upon successful validation, users will select the desired service from a menu.
- Submission:
- After selecting a service, users proceed with the application process.
- Additional Options or Logout:
- Once the submission is completed, users can choose additional options or log out.
- Notification:
- The admin (Ketua RT) receives a notification when a user submits an application.
- Approval:
- The admin approves the application, triggering the generation of a letter with a unique letter number.
data_warga.csv
:- Contains resident data in CSV format.
- Created manually with attributes like NAMA, NIK, JENIS KELAMIN, etc.
sessions.json
:- Stores login data for residents validated by NIK.
- Generated automatically by the system.
submissions.json
:- Tracks service requests to prevent spam (limited to 3 requests per day).
- Generated automatically by the system.
submissions/
:- Contains completed letters generated from
template.docx
. - Generated automatically by the system.
- Contains completed letters generated from
template.docx
:- The letter template used for generating official documents.
- Created manually following the specified format.
- Data Preparation:
- Ensure that
data_warga.csv
is correctly populated with the required attributes.
- Ensure that
- Automatic Generation:
- The system automatically generates
sessions.json
andsubmissions.json
.
- The system automatically generates
- Document Storage:
- Generated letters are saved in the
submissions
folder, following the format specified intemplate.docx
.
- Generated letters are saved in the