WhatsFlow is a professional-grade, locally hosted WhatsApp bulk messaging desktop application. It enables businesses to securely send template-based messages to thousands of contacts with dynamic media attachments, utilizing the official Meta WhatsApp Business API.
By combining the convenience of a desktop application with the power of a modern web stack, WhatsFlow offers real-time analytics, automated background queuing, and reliable delivery mechanisms including automatic email fallbacks.
- Bulk Template Messaging: Utilize Meta-approved WhatsApp templates to send customized bulk campaigns.
- Dynamic Media Attachments: Attach campaign-specific images (JPG, PNG) or videos (MP4) up to 16MB.
- Background Queue Processing: A dedicated background worker (
worker.js) reliably processes messages, enforces rate limits (TPS), and handles automatic retries. - Smart Email Fallback: Automatically switches to SMTP email delivery if WhatsApp delivery fails after maximum retry attempts.
- Real-time Analytics Dashboard: Monitor message delivery statuses, read receipts, and campaign trends visually using Recharts with full dark/light mode support.
- Live Webhook Integration: Integrates
localtunnelto receive secure, real-time status updates (Sent, Delivered, Read, Failed) directly from Meta's webhooks, even while running on localhost. - Excel Contact Import: Import contacts from Excel/CSV using a standardised 5-column format (
phone,email,name,amount,date). One sheet covers all 8 supported template types — consistent variable convention ({{1}}=name,{{2}}=amount/table,{{3}}=date) means no column remapping between campaigns. - Blacklist Management: Block specific phone numbers from receiving future campaigns. Unblock via a React confirmation modal (no native browser dialogs).
- Enterprise-Grade Security: Utilizes AES-256 encryption for sensitive API credentials and HMAC-SHA256 for webhook signature validation.
- Modern UI: A responsive React 19 frontend built with Vite and Tailwind CSS, featuring full Dark/Light mode support with theme-aware charts.
WhatsFlow employs a hybrid process model, bundling a complete Client-Server architecture within an Electron shell.
- Main Process: Manages the app lifecycle (
electron/main.js), starts the Express backend, and renders the Chromium frontend window. - Security:
contextIsolation,sandbox, nonodeIntegrationfor the renderer.
- RESTful API: Core engine (
backend/server.js) handling campaigns, contacts, media, and settings. - WebSockets (Socket.io): Pushes real-time updates (campaign progress, webhook events) to the React frontend.
- Background Worker (
backend/worker.js): Polls for queued messages, enforces TPS rate limits, manages email fallback. - Tunnel Manager (
backend/tunnelManager.js): Provisions public URLs using LocalTunnel for Meta webhooks.
- Framework: React 19 powered by Vite with HMR.
- Styling: Tailwind CSS — responsive, dark/light mode aware.
- Real-time:
socket.io-clientfor live dashboard updates. - Charts:
RechartswithuseTheme()integration for dark/light adaptive colors.
- WAL Mode: Write-Ahead Logging for high concurrent read/write performance.
- Encryption: AES-256-GCM (per-installation key) for all sensitive config values stored in the database.
whatsflow/
├── backend/ # Node.js Express API & Background Services
│ ├── __tests__/ # Backend unit & integration tests
│ ├── middleware/ # Auth, Error Handling, Validators
│ ├── routes/ # API endpoint definitions
│ ├── services/ # WhatsApp API, Email SMTP, Crypto
│ ├── utils/ # Winston logger
│ ├── cron.js # Scheduled tasks
│ ├── database.js # SQLite initialization & schema
│ ├── server.js # Express & Socket.IO entry point
│ ├── tunnelManager.js # LocalTunnel webhook management
│ └── worker.js # Background message queue processor
├── electron/ # Desktop Application Shell
│ ├── main.js # Electron main process
│ └── preload.js # Secure context bridge
├── frontend/ # React UI Application
│ ├── src/
│ │ ├── components/ # Layout, Toast, Charts, Campaign wizard
│ │ ├── contexts/ # ThemeContext, SocketContext
│ │ ├── pages/ # Dashboard, NewCampaign, History, Blacklist, Settings
│ │ ├── services/ # Axios API client (api.ts)
│ │ └── utils/ # Excel parser, contact processor
│ └── vite.config.js # Bundler + dev proxy configuration
├── docs/ # Extended documentation
├── tests/ # E2E tests (Playwright)
├── .env.template # Environment variable template
└── .gitignore # Comprehensive exclusion rules
- Node.js: v18.x or higher
- Meta Business Account: Active WhatsApp API access and verified phone number.
- OS: Windows 10/11
- Download
WhatsFlow Setup 1.0.1.exefrom thedist/folder. - Run the installer — it creates a desktop shortcut and Start Menu entry.
- Launch WhatsFlow and configure credentials in Settings.
# 1. Install dependencies
npm install
cd frontend && npm install && cd ..
# 2. Configure environment (optional)
copy .env.template .env
# 3. Start in development mode
npm run dev# Single command — builds frontend then packages Electron exe
npm run build
# Output in dist/:
# WhatsFlow 1.0.1.exe (portable)
# WhatsFlow Setup 1.0.1.exe (installer)- Open the app and navigate to Settings -> WhatsApp API.
- Enter your Meta credentials:
Access Token,Phone Number ID,WABA ID,App Secret,Verify Token. - Save — green checkmarks confirm each field is configured.
- (Optional) Configure Email Fallback (SMTP) for failed message handling.
| Script | Description |
|---|---|
npm run dev |
Full development mode (backend + frontend + Electron) |
npm run server |
Backend only (port 3000) |
npm run frontend |
Vite dev server only (port 5173) |
npm run start:prod |
Production Electron app (no tunnel) |
npm run start:tunnel |
Production + LocalTunnel webhook URL |
npm run build |
Build frontend + package Electron exe |
npm run build:frontend |
Build React frontend to frontend/dist/ |
npm test |
Jest test suite with coverage |
npm run test:unit |
Backend unit tests only |
- Encryption at Rest: All sensitive API tokens and SMTP passwords encrypted using AES-256-GCM (per-installation key, stored in user data directory) before SQLite storage.
- Webhook Integrity: Incoming Meta webhooks verified via HMAC-SHA256 signatures against the configured App Secret.
- API Authentication: Session-based X-API-Key required for all
/api/*routes (issued by/auth/token). - Input Validation: All inputs validated via
express-validatormiddleware to prevent injection attacks. - Electron Hardening:
contextIsolation: true,sandbox: true,nodeIntegration: false.
- Application Logs: Check
backend/logs/combined.logandbackend/logs/error.log. - Port Conflicts: If port 3000 is in use, the app logs the error and exits (
process.exit(1)) — close other instances then relaunch. - Database Locks: Ensure no external SQLite viewers are locking
database.sqlitewhile the worker is running. - Webhook Failures: Verify your
TUNNEL_SUBDOMAINis unique and not claimed by another user.
For deeper architectural insights, refer to docs/ARCHITECTURE.md.
Author: Udhaya Chandra SA Version: 1.0.1 Last Updated: March 2026