Overview
Before deploying the WhatsApp RAG Bot, ensure your environment meets the following requirements. This project is built with PHP and requires several dependencies and extensions.Server Requirements
PHP Version
PHP 7.4 or higher is required. The application is compatible with PHP 8.0+.
composer.json:
PHP Extensions
The following PHP extensions are required:Core Extensions
curl- For API calls to WhatsApp and OpenAIjson- For JSON encoding/decodingpdo_mysql- For MySQL database connectionsmbstring- For multi-byte string handlingopenssl- For encryption and secure connections
File Processing Extensions
zip- For handling ZIP archivesxml- For processing DOCX filesgdorimagick- For image processing (optional)
Web Server
- Apache
- Nginx
- Built-in Server (Development Only)
- Apache 2.4 or higher
mod_rewriteenabled.htaccesssupport enabledmod_headersrecommended (for security headers)
Database Requirements
MySQL
Required MySQL features:- InnoDB storage engine
- UTF-8 (utf8mb4) character set support
- BLOB field support for vector embeddings
- JSON field support (for flow_nodes, calendar_settings)
- Foreign key constraints
- Triggers support
Database Configuration
Recommended MySQL settings:Composer Dependencies
The following PHP packages are required (installed via Composer):HTTP Client
Document Processing
PHPWord - DOCX Processing
PHPWord - DOCX Processing
PDFParser - PDF Processing
PDFParser - PDF Processing
External API Requirements
WhatsApp Business API
Meta Developer Account
- Active Meta Developer account
- WhatsApp Business App created
- Phone number registered for WhatsApp Business
Required Credentials
- Phone Number ID
- Access Token
- Verify Token (custom string you define)
- App Secret (for webhook signature verification)
OpenAI API
An active OpenAI API key with sufficient credits is required.
- GPT models (e.g.,
gpt-3.5-turbo,gpt-4) - Embeddings models (e.g.,
text-embedding-ada-002) - Whisper API (for audio transcription)
Google Calendar (Optional)
If using calendar scheduling features:- Google Cloud Project
- Calendar API enabled
- OAuth 2.0 credentials configured
File System Requirements
Directory Permissions
Disk Space
- Minimum: 100 MB for application files
- Recommended: 1 GB+ for logs, uploaded documents, and audio files
- Vector embeddings stored as BLOBs in MySQL (ensure adequate database storage)
PHP Configuration
Required php.ini Settings
Network Requirements
Outbound Connections
The server must be able to make HTTPS requests to:graph.facebook.com(WhatsApp API)api.openai.com(OpenAI API)www.googleapis.com(Google Calendar API, if enabled)
Inbound Connections
- Port 443 (HTTPS) must be open for webhook callbacks
- Valid SSL/TLS certificate required (Meta requirement)
Development vs Production
- Development
- Production
Quick Requirements Check
Verify your server meets requirements:Next Steps
Ready to install?
Proceed to Local Development setup guide