{"id":30365308,"url":"https://github.com/shawshank725/whatsapp-bot","last_synced_at":"2026-04-10T13:32:11.815Z","repository":{"id":309101870,"uuid":"1035170462","full_name":"shawshank725/whatsapp-bot","owner":"shawshank725","description":"This project is a WhatsApp chatbot built with Java and Spring Boot, available in two versions: one using MySQL for relational data storage, and another using Firebase for real-time NoSQL storage.   It supports doctor appointment booking and medicine ordering, integrates with the Meta WhatsApp Cloud API, and can be tested locally using ngrok.","archived":false,"fork":false,"pushed_at":"2025-08-09T20:23:05.000Z","size":76,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-19T21:12:27.885Z","etag":null,"topics":["firebase","firebase-database","java","mysql","mysql-database","ngrok","spring-boot","springboot","whatsapp-api","whatsapp-bot"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shawshank725.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-09T20:01:53.000Z","updated_at":"2025-08-09T20:26:21.000Z","dependencies_parsed_at":"2025-08-09T22:14:55.498Z","dependency_job_id":null,"html_url":"https://github.com/shawshank725/whatsapp-bot","commit_stats":null,"previous_names":["shawshank725/whatsapp-bot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shawshank725/whatsapp-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shawshank725%2Fwhatsapp-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shawshank725%2Fwhatsapp-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shawshank725%2Fwhatsapp-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shawshank725%2Fwhatsapp-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shawshank725","download_url":"https://codeload.github.com/shawshank725/whatsapp-bot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shawshank725%2Fwhatsapp-bot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31645284,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-10T07:40:12.752Z","status":"ssl_error","status_checked_at":"2026-04-10T07:40:11.664Z","response_time":98,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["firebase","firebase-database","java","mysql","mysql-database","ngrok","spring-boot","springboot","whatsapp-api","whatsapp-bot"],"created_at":"2025-08-19T21:01:05.458Z","updated_at":"2026-04-10T13:32:11.808Z","avatar_url":"https://github.com/shawshank725.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WhatsApp Bot\n\nThis is a **WhatsApp Bot** built using **Java** and **Spring Boot**, with two separate implementations:\n- **MySQL** (Relational Database)\n- **Firebase** (NoSQL Database)\n\nBoth implementations offer the same functionalities but differ in the database management system used.\n\n---\n\n## 📌 Features\n- Doctor appointment booking bot.\n- Medicine ordering bot.\n- Built using the **Meta for Developers** WhatsApp Cloud API.\n- Two backend options:\n  - **MySQL** for relational data storage.\n  - **Firebase** for real-time NoSQL data storage.\n- Tested locally using **ngrok** for webhook tunneling.\n\n---\n\n## ⚙️ Tech Stack\n- **Java** (Spring Boot)\n- **MySQL**\n- **Firebase**\n- **Meta WhatsApp Cloud API**\n- **ngrok**\n\n---\n\n## 🔒 Sensitive Information\nAll personal credentials (phone number ID, access token, service account JSON for Firebase, etc.) have been **removed** from this repository.  \nTo run this project, you will need to provide:\n- Your own **phone number ID** and **access token** from the Meta developer portal.\n- Your own **Firebase service account JSON** file (for Firebase version).\n\n---\n## 🚀 Running the Project\n\n1. **Clone the repository**\n   ```bash\n   git clone https://github.com/your-username/whatsapp-bot.git\n   cd whatsapp-bot\n   ```\n\n2. **Choose your implementation**\n   - **MySQL version** → Located in the MySQL project folder.\n   - **Firebase version** → Located in the Firebase project folder.\n\n3. **Set up the database**\n   - **MySQL**:  \n     Run the SQL scripts included in the MySQL project to create the required database and tables.\n   - **Firebase**:  \n     Create a new Firebase project in the [Firebase Console](https://console.firebase.google.com/), obtain your **Service Account JSON**, and set up the required collections.\n\n4. **Obtain WhatsApp Cloud API credentials**\n   - Go to the [Meta for Developers](https://developers.facebook.com/) dashboard.\n   - Create or open your **WhatsApp Business App**.\n   - Retrieve:\n     - **Phone Number ID**\n     - **Permanent Access Token**\n     - **Verify Token** (you choose this; must match in code and Meta dashboard)\n   - Note the **API endpoint** for sending messages.\n\n5. **Configure your application**\n   - Add your credentials (Phone Number ID, Access Token, Verify Token, etc.) to the `application.properties` or environment variables for your chosen project.\n   - For Firebase: also add the path to your **Service Account JSON**.\n\n6. **Set up ngrok for local testing**\n   - [Download ngrok](https://ngrok.com/download) and install it.\n   - Run ngrok to expose your Spring Boot port (default is 8080):\n     ```bash\n     ngrok http 8080\n     ```\n   - Copy the generated HTTPS URL.\n\n7. **Configure webhook in Meta dashboard**\n   - In your WhatsApp app settings, set the **Callback URL** to the ngrok URL + your webhook path (e.g., `https://\u003cngrok-id\u003e.ngrok.io/webhook`).\n   - Enter your **Verify Token** and click **Verify and Save**.\n\n8. **Run the application**\n   ```bash\n   ./mvnw spring-boot:run\n   ```\n   Or build and run the JAR:\n   ```bash\n   ./mvnw clean package\n   java -jar target/whatsapp-bot.jar\n   ```\n\n9. **Test the bot**\n   - Send a WhatsApp message to the phone number provided in your Meta developer dashboard.\n   - The bot should respond according to the appointment booking or medicine ordering flow.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshawshank725%2Fwhatsapp-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshawshank725%2Fwhatsapp-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshawshank725%2Fwhatsapp-bot/lists"}