Multi-tenant WhatsApp survey system for conflict analysis and peacebuilding consultations
Status: β Production Ready (Syria LIVE) Last Updated: October 20, 2025
This platform runs 3 independent WhatsApp surveys simultaneously for UN GIM consultations in:
| Survey | Status | Phone Number | Language | Heroku App |
|---|---|---|---|---|
| Syria | β LIVE (v46) | +358454903164 | Arabic | un-gim-survey-bot |
| Armenia | π Ready to deploy | +358454901787 | English | un-gim-survey-bot-armenia |
| Guinea-Bissau | π Ready to deploy | (Purchase number) | Portuguese | un-gim-survey-bot-guinea |
View Syria Data: https://un-gim-survey-bot-fe9d751698ce.herokuapp.com/list-survey-data?event_id=syria_survey_2025
AI Consultation Tool/
β
βββ README.md β YOU ARE HERE
β
βββ documentation/ β General setup guides & architecture
β βββ QUICK_START.md β Start here for orientation
β βββ NEW_SURVEY_SETUP_GUIDE.md β How to add new surveys
β βββ FINAL_CONFIGURATION_OCT19_2025.md
β βββ DEPLOYMENT_READY_SUMMARY.md
β βββ MULTI_TENANT_IMPLEMENTATION_PLAN.md
β βββ archive/ β Historical docs
β
βββ syria-survey/ β Syria WhatsApp bot (LIVE)
β βββ app/main.py β Main webhook handler
β βββ core/config.py β Configuration
β βββ services/ β Survey + export logic
β βββ [Syria-specific docs]
β
βββ armenia-survey/ β Armenia WhatsApp bot (Ready to deploy)
β βββ [To be created - duplicated from Syria]
β
βββ guinea-bissau-survey/ β Guinea-Bissau WhatsApp bot (Ready to deploy)
β βββ [To be created - duplicated from Syria]
β
βββ sensemaking-tool/ β AI analysis tool (post-survey)
β βββ [Data analysis codebase]
β
βββ delete_test_user.py β Shared testing utility
- Read:
documentation/QUICK_START.md - Understand:
documentation/FINAL_CONFIGURATION_OCT19_2025.md - Set up new survey:
documentation/NEW_SURVEY_SETUP_GUIDE.md
Test Syria Survey:
python3 delete_test_user.py
# Send "Hello" to +358454903164 on WhatsApp
# View: https://un-gim-survey-bot-fe9d751698ce.herokuapp.com/list-survey-data?event_id=syria_survey_2025Monitor Logs:
cd syria-survey
heroku logs --tailDeploy Changes:
cd syria-survey
git add -A && git commit -m "message" && git push heroku main- Each survey = Separate Heroku app
- Each survey = Own codebase (duplicated, then customized)
- Complete isolation (changes to one don't affect others)
- Firebase Project: yemeni-youth-engagement
- Twilio Account: Same account, different phone numbers
- AI Services: OpenAI (Whisper) + Anthropic (Claude)
Firebase Collections:
βββ syria_users β syria-survey app only
βββ syria_responses β syria-survey app only
βββ armenia_users β armenia-survey app only
βββ armenia_responses β armenia-survey app only
βββ guinea_bissau_users β guinea-bissau-survey app only
βββ guinea_bissau_responses β guinea-bissau-survey app only
Platform: Heroku (3 separate apps) Framework: FastAPI + Python 3.12 Database: Firebase Firestore Storage: Firebase Storage (voice messages) Messaging: Twilio WhatsApp API AI Models:
- OpenAI Whisper-1 (audio transcription + translation)
- Anthropic Claude Sonnet 4.5 (text translation)
- App: https://un-gim-survey-bot-fe9d751698ce.herokuapp.com
- Phone: +358454903164
- Version: v46
- Status: β Production ready
- Data: https://un-gim-survey-bot-fe9d751698ce.herokuapp.com/list-survey-data?event_id=syria_survey_2025
- App: To be created
- Phone: +358454901787 (already purchased)
- Status: π Ready to configure (~2-3 hours)
- App: To be created
- Phone: To be purchased
- Status: π Ready to configure (~3-4 hours)
-
Different survey structures:
- Syria: 3 demographics + 6 questions
- Armenia: 0 demographics + 5 questions
- Guinea-Bissau: 10 demographics + 8 questions
-
Zero risk:
- Changes to Armenia won't break Syria
- Each survey isolated and independent
-
Simpler maintenance:
- Clear which code controls which survey
- Easier for future developers/AI agents
-
Faster deployment:
- No complex conditional logic
- Straightforward customization
- Firebase project (different collections)
- Twilio account (different numbers)
- API keys (OpenAI, Anthropic)
- Architecture patterns
- Documentation
- System architecture
- Setup guides
- Troubleshooting
- Multi-tenant design patterns
- Deployment details
- Template IDs
- Event configuration
- Version history
- Firebase Console: https://console.firebase.google.com/project/yemeni-youth-engagement/firestore
- Twilio Console: https://console.twilio.com
- Heroku Dashboard: https://dashboard.heroku.com/apps/un-gim-survey-bot
- Syria Live Survey: Text +358454903164 on WhatsApp
For Setup Questions:
- Read
documentation/QUICK_START.md - Follow
documentation/NEW_SURVEY_SETUP_GUIDE.md - Check survey-specific README in each folder
For Issues:
- Check
heroku logs --tailin relevant survey folder - Review
documentation/TROUBLESHOOTING.md - Verify Firestore configuration
Created: October 20, 2025 Syria Survey: Fully operational β Next Steps: Deploy Armenia & Guinea-Bissau surveys