An AI-powered WhatsApp bot for real-time fact-checking, specifically designed for West Africa. This system automatically analyzes the veracity of shared content and returns a clear verdict (true, false, or unverifiable) supported by reliable sources.
# FactCheck WhatsApp Bot
## 🌍 Overview
An AI-powered WhatsApp bot for real-time fact-checking, specifically designed for West Africa. This system automatically analyzes the veracity of shared content and returns a clear verdict (true, false, or unverifiable) supported by reliable sources.
## 🏗️ Architecture
User WhatsApp → Bot → AI Server:
- Text extraction from links (scraper or LLM)
- Text classification (Real vs False)
- Fact verification:
- Search in databases (AFP, AfricaCheck...)
- Semantic similarity with intelligent search engines (Bing Search API + BERT)
- Response generation:
- Summary + Verdict + Sources + Confidence (%)
For more detailed documentation, see docs/architecture.md.
## 🔧 Technical Stack
- **AI/NLP**: HuggingFace Transformers (multilingual BERT or CamemBERT)
- **Backend**: FastAPI
- **WhatsApp Bot**: Twilio API
- **Fact-checking**: Bing Search API + semantic analysis, BeautifulSoup
- **Content extraction**: newspaper3k, BeautifulSoup
- **Semantic similarity**: sentence-transformers + cosine distance
- **User response**: Template + NLP / potentially LLM
- **Database**: MongoDB
- **Deployment**: Docker, AWS Lightsail
## 🚀 Quick Start
### Prerequisites
- Python 3.8+
- Docker and Docker Compose
- Twilio account for WhatsApp integration
- Bing Search API key
- MongoDB instance
### Installation
1. Clone the repository:
```bash
git clone
github.com
cd factcheck-whatsapp
```
2. Build and run with Docker:
```bash
docker-compose up -d
```
3. Or set up the development environment:
**On Linux/macOS:**
```bash
chmod +x setup.sh
./setup.sh
```
**On Windows:**
```bash
setup.bat
```
4. Configure environment variables:
```bash
# The setup script has already copied .env.example to .env
# Modify .env with your API keys and configuration
```
5. Run the API:
```bash
uvicorn app.main:app --reload
```
## 📖 Documentation
- API Documentation: Available at `
localhost` locally
- Detailed …