WhatsApp management and broadcast automation
Junada WhatsApp Suite
WhatsApp broadcast and template automation for an e-commerce operator, with a direct Meta Cloud API integration and a queue that respects per-customer limits.
- Year
- 2025
- Role
- Back end, message queue and admin interface
- Category
- WhatsApp management and broadcast automation

The challenge
An e-commerce operator wanted to broadcast order updates and promotional messages to its customers over WhatsApp without paying a middleman platform fee on every message indefinitely.
The approach
A direct integration with the Meta Cloud API, a Node.js queue that respects per-customer sending limits, and a template-management interface that mirrors WhatsApp's own approval flow so admins know up front whether a draft will be accepted.
The outcome
A broadcast system that talks to Meta directly with no intermediary messaging provider, a rate-limited queue and a dashboard for delivery status.
Under the hood
- Field
- E-commerce · CRM · Marketing automation
- Type
- WhatsApp broadcast platform + template lifecycle CMS
- Team
- backend engineer + DevOps + admin-UI engineer
01
The real problem
WhatsApp messaging at scale forces a choice: pay Twilio/MessageBird/360dialog per-message middleware fees on top of Meta's conversation pricing, going to a middleman that adds queue management + dashboards but holds your business hostage to their pricing. Or integrate Meta Cloud API directly, which means building the queue, the template-approval lifecycle, the delivery-receipt webhook handling, the rate-limit-tier compliance, and the dashboards yourself. The operator chose direct integration after running the math past Year 1.
02
Who did what
Backend + queue + admin UI + Meta API integration. No SaaS layer (Twilio, MessageBird, 360dialog) sitting between the operator and Meta. Direct relationship with Meta Cloud API means margin retained, full template control, and no per-message middleman fees.
- Backend engineer
- Node.js 20 + Fastify. Direct Meta Cloud API client, webhook handler for delivery receipts, template-status sync.
- Queue + rate-limit engineer
- BullMQ on Redis. Per-customer rate-limit buckets respecting WhatsApp's tier system (250/1k/10k/100k msg/day depending on quality score).
- Admin UI engineer
- Template builder mirroring Meta's approval form, broadcast scheduler, recipient list manager, delivery-rate dashboard with real-time updates.
- DevOps + observability
- PM2, MongoDB Atlas, Sentry for error tracking, Grafana dashboards for delivery rate + queue depth.
03
Architecture
01 — Edge
Edge tier
Cloudflare
CDN · WAF
Protects admin panel; webhook endpoint allowlisted to Meta IPs
Nginx
Reverse proxy · TLS
Routes /api → Fastify, /webhooks/meta → dedicated webhook worker
02 — App
Application tier (Node.js)
Admin API
Fastify + JWT
Operator-facing CRUD: templates, broadcasts, recipients, dashboards
Meta client
Custom SDK · undici
Direct Cloud API integration; retry-with-backoff; tier-aware throttling
Webhook receiver
Fastify · signature verify
HMAC-SHA256 signature check before any DB write
Cost calculator
Pricing matrix + Intl.NumberFormat
Pre-send estimate accurate to ±2% of actual Meta invoice
03 — Async
Async + queue tier
BullMQ
Redis-backed queue
Per-WABA queue; tier-aware rate limit; auto-retry with backoff
Broadcast worker
BullMQ consumer · 4 procs
Pops jobs, calls Meta, records ack, fires webhook update
Webhook processor
BullMQ consumer · idempotent
Delivery receipts → MongoDB update → real-time admin push
04 — Data
Data tier
MongoDB Atlas
Templates · broadcasts · recipients
Schemaless suits per-template variability; indexes on (waba_id, status)
Redis 7
Queue · cache · rate-limit
Single Redis for queue + token-bucket counters + session cache
04
Challenges
- 01
WhatsApp rate-limit tier system (250 → 1k → 10k → 100k → unlimited messages/day depending on quality score) requires per-customer token bucket that respects the current tier AND auto-throttles when quality score dips.
- 02
Template approval lifecycle: drafts → submitted → in_review → approved/rejected. Admin UI must mirror Meta's rejection reasons exactly so operators iterate fast without submitting bad drafts.
- 03
Must process all of them within 2 seconds to keep the dashboard live.
- 04
Recipient list management: WhatsApp requires opt-in confirmation per phone number; the platform must track consent status + per-phone delivery history to avoid silent quality-score damage from sending to unresponsive numbers.
- 05
Cost transparency: operators want per-broadcast cost in their currency BEFORE pressing send. Meta's pricing varies by recipient country + conversation category (utility, marketing, authentication, service). Calculator must match Meta's billing within ±2%.
05
Hard problems
Per-customer rate-limit bucket
Token bucket per WhatsApp Business Account (WABA), refilled at the rate matching the current tier. When tier downgrades (quality score drop), bucket immediately resets to new limit. No queue overflow.
Template approval-aware admin UI
Admin UI runs Meta's rejection-reason regex set CLIENT-SIDE before submit. Operators see warnings (e.g. "Marketing templates cannot contain phone numbers in the body") and edit before burning a submission slot.
Webhook idempotency
Meta retries failed webhook deliveries up to 24h. Same delivery receipt may arrive 5+ times. Idempotency key on (waba_id + message_id + status) prevents double-counting.
Cost-prediction engine
Pre-fetched Meta pricing matrix, refreshed daily. Per-recipient country lookup, conversation-category classification, currency conversion against operator base currency.
06
Why these technologies
Node.js + Fastify (backend)
- Event-driven runtime is the natural fit for high-throughput webhook + queue I/O — 40k receipts/day with single-digit CPU.
- Fastify outperforms Express by 2-3x on JSON throughput at the small request sizes WhatsApp webhooks produce.
- Native async/await + Promise.all patterns make per-broadcast fan-out trivial.
BullMQ + Redis (queue)
- Per-WABA queue names give natural per-customer isolation without separate Redis instances.
- Built-in retry-with-backoff handles Meta's 429s without custom code.
- Job priorities let urgent transactional messages cut in line ahead of bulk marketing broadcasts.
MongoDB (templates + broadcasts)
- Templates have wildly varying structure (header media types, button counts, language overrides) — JSON-native storage avoids 5+ migrations per template feature.
- Aggregation pipelines power the delivery-rate dashboard without an OLAP sidecar.
Direct Meta Cloud API (no middleware SaaS)
- Full control over template lifecycle, tier upgrades, and quality-score recovery — no SaaS layer hiding the levers.
- Direct WABA ownership stays with the operator; switching providers later means swapping queue + dashboard, not migrating account state.
07
What I learned
- 01
Per-message middleware fees compound. At any meaningful volume, owning the broker pays for itself within a year.
- 02
WhatsApp's rate-limit tier system rewards good actors — but it punishes mistakes hard. Quality-score recovery takes weeks. Build the admin UI to prevent bad drafts before they ship, not just to react to rejections.
- 03
Webhook idempotency is not optional. Meta WILL retry. Plan for it from day one.
Stack
- Node.js
- Fastify
- BullMQ
- Redis
- MongoDB
- Meta Cloud API
Questions about Junada WhatsApp Suite
Who built Junada WhatsApp Suite?
Junada WhatsApp Suite was delivered by Ali Haitham Yosef, founder of a software company in Damascus that carries his name. His role on the project: Back end, message queue and admin interface.
What is Junada WhatsApp Suite?
WhatsApp broadcast and template automation for an e-commerce operator, with a direct Meta Cloud API integration and a queue that respects per-customer limits.
What technology does Junada WhatsApp Suite use?
Node.js, Fastify, BullMQ, Redis, MongoDB, Meta Cloud API.
When was Junada WhatsApp Suite built?
It was built during 2025.
Can you build a system like Junada WhatsApp Suite for my business?
Yes. The company builds ERP systems, point-of-sale systems, mobile apps and websites for clients in Syria, Lebanon, Jordan, Iraq, Turkey and the Gulf states, working remotely. Contact: info@aliyosef.online.














