Skip to content

musa-mudesir/AfyaBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🩺 AfyaBot — AI-Powered WhatsApp Healthcare Assistant

AfyaBot is an empathetic, multilingual AI healthcare assistant that runs directly on WhatsApp.
It provides basic health guidance, medicine availability checks, and local translation support — all through natural, conversational AI.


🌍 Try It Yourself (Twilio Sandbox)

You can test AfyaBot right now on WhatsApp through Twilio Sandbox.

Option 1 — Use the QR Code

📱 Scan this QR code using WhatsApp:

(Insert your Twilio Sandbox QR image here)
Example:

Twilio WhatsApp QR

Option 2 — Join via Text Code

  1. Send this message on WhatsApp to the Twilio Sandbox number:
    📞 +1 415 523 8886

  2. In the message box, type:

    join fun-book

  3. Once joined, simply message:

Hi AfyaBot and start chatting!


💬 Example Conversations

User: “I feel dizzy and tired.”
AfyaBot: “That sounds uncomfortable 😟 Have you eaten recently or been drinking enough water?”

User: “Is paracetamol available?”
AfyaBot: “Yes ✅ Paracetamol is currently in stock at nearby pharmacies.”

User: “Can you translate this to Amharic?”
AfyaBot: “መልካም ቀን ይሁንልዎ! (Have a good day!)”


🧠 Core Features

  • 🤖 AI Chat — Empathetic, context-aware conversations powered by OpenAI GPT-4o-mini
  • 🌐 Language Support — English ↔ Amharic ↔ Tigrinya translation
  • 💊 Medicine Checker — Find out if common medicines are available locally
  • 💬 WhatsApp Integration — Works directly inside WhatsApp via Twilio
  • 🧍‍♂️ Per-User Memory — Each user’s conversation history is tracked via their phone number

🧩 Project Structure

.
├── index.js
├── services/
│   ├── ai.js              # OpenAI integration + chat logic
│   ├── translate.js       # Language detection + translation
│   ├── medicine.js        # Medicine availability service
│   └── whatsapp.js        # (Future) Twilio-related helpers
├── medicineData.json         # Sample medicine data
├── .env                   # API keys (OpenAI, Twilio)
└── README.md              # Project documentation

⚙️ Setup & Run Locally

git clone https://github.com/musa-mudesir/AfyaBot.git
cd AfyaBot
npm install
node index.js

About

AI powered WhatsApp chat bot for basic healthcare guidance

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors