A smart WhatsApp-based service matching system for ECLA students built with Python FastAPI and natural conversation handling.
- WhatsApp Integration: Students can request/offer services via WhatsApp
- Smart Matching: Automatically matches seekers with available helpers
- Google Sheets Database: Stores all user data and requests
- Real-time Notifications: Instant WhatsApp notifications for matches
- Learning System: Improves matching based on usage patterns
WhatsApp → FastAPI → SQLite Database → Smart Matching → Notifications
- Python 3.8+
- WhatsApp Business API (optional for testing)
- OpenAI API (optional for enhanced features)
-
Clone and setup:
python setup.py
-
Test the bot:
python test_bot.py
-
Start the server:
python main.py
-
Access web interface:
- Open http://localhost:8000
- View real-time stats and activity
| Name | Services | Location | Phone | Created |
|---|---|---|---|---|
| Alex | IT, computer help | Room 305 | +33... | 2024-01-15 |
| Name | Service | Time | Location | Status | Matched Helper |
|---|---|---|---|---|---|
| Sarah | Laundry | Today 5pm | Laundry Room | Pending | - |
WHATSAPP_API_KEY: Your WhatsApp Business API keyOPENAI_API_KEY: (Optional) For enhanced AI featuresDATABASE_URL: SQLite database path
- Send "help" to WhatsApp
- Bot asks: Name, Services, Availability, Location
- Data stored in Google Sheets
- Notified when requests match
- Send request to WhatsApp
- Bot asks: Service needed, Time, Location, Name
- Bot searches for matches
- Both parties notified
- Natural Conversation: Handles any user message intelligently
- Context Awareness: Remembers conversation state
- Smart Matching: Finds best helpers based on service and location
- Service Extraction: Automatically identifies service types from messages
- Time & Location Parsing: Extracts timing and location from natural language
- All data stored in Google Sheets (your control)
- No sensitive data collected
- User consent for data usage
- GDPR compliant for EU students
- Add more service categories
- Implement payment integration
- Add admin dashboard
- Expand to other student residences
- Python dependencies: Run
pip install -r requirements.txt - Database errors: Check file permissions for
ecla_bot.db - WhatsApp webhook errors: Verify webhook URL in WhatsApp Business console
- Bot not responding: Check conversation state in
bot_logic.py
For issues or questions:
- Check the troubleshooting section
- Review n8n logs
- Verify all API credentials