Ultimate Solution Logo

WhatsApp Commander

System active. Deployment endpoints and live health status are detailed below.

?? Webhook

Gateway POSTs here. Configure in your gateway admin UI.

https://wa.em-24.com.pk/webhook.php

Ensure: HMAC secret in env, timestamp fresh, Content-Type: application/json.

🗄️ Dashboard & API

Authenticate via the dashboard login page with the credentials printed once to app container logs on first boot.

https://wa.em-24.com.pk/dashboard/login.php

If lost, reset via MySQL: UPDATE users SET password_hash = password_hash('NewStrongPass!', PASSWORD_DEFAULT) WHERE username = 'admin';

🧵 Worker Daemon

Processes the message queue via cron every 15s inside the app container.

docker exec wa-cmd-app php cron_worker.php --daemon --interval=15
(already running via baked dcron inside image)

🧪 Diagnostics

Health, version, and connectivity summary:

System Health

MySQL   : ? Connected
MSSQL   : ? Available
Secret  : ? Configured
API Key : ? Configured
Logs    : /var/www/app/logs
  

Setup Instructions

  1. Execute database schema script: php/schema/001_init.sql against your MySQL database.
  2. Duplicate .env.example to .env and populate required credentials.
  3. Validate outbound routing: php test_send.php YOUR_NUMBER 'Test Message'
  4. Simulate incoming webhook: php test_webhook.php message.received YOUR_NUMBER '!status'
  5. Run queue processing manually once: php cron_worker.php
  6. Configure Webhook in Gateway Admin UI with target: https://wa.em-24.com.pk/webhook.php
  7. Enable system daemon or set up the cron schedule below.

Crontab Configuration

* * * * * cd '/var/www/app' && php cron_worker.php >> logs/cron.log 2>&1
* * * * * sleep 15; cd '/var/www/app' && php cron_worker.php >> logs/cron.log 2>&1
* * * * * sleep 30; cd '/var/www/app' && php cron_worker.php >> logs/cron.log 2>&1
* * * * * sleep 45; cd '/var/www/app' && php cron_worker.php >> logs/cron.log 2>&1

Static Dashboard Compilation

  1. Build SPA: cd .. && npm install && npm run build
  2. Move build artifacts: mkdir -p php/public && cp -R client/dist/* php/public/
  3. Access application dashboard at root path: https://wa.em-24.com.pk/