Quantum CodeQuantum Code
Back to Portfolio
Backend Infrastructure / CommunicationsProduction • August – September 2026

BM Forex Hub

Production-grade, enterprise-scale Email Notification & Bulk Broadcast Infrastructure for BM Forex Hub. It handles real-time email communications, rate-limited OTP verification, multi-provider abstraction, and asynchronous queue workers.

01 • Problem Statement

High-volume transactional OTP emails and bulk community broadcasts fail or trigger provider throttling when sent synchronously from web request threads.

02 • Deployment & Runtime

Production backend infrastructure deployed at bmforexhub.exchange.

Integrations: Multi-Provider Email APIs • SMTP Relays • Asynchronous Job Queues

System Architecture Pipeline

Layer 01 • API Gateway
Broadcast & OTP Ingestion Endpoints

Request validation, rate limiting, and payload sanitization

Layer 02 • Queue Layer
Priority-Segregated Job Queues

High-priority OTP lane vs. throttled bulk campaign worker lane

Layer 03 • Worker Engine
Asynchronous Dispatch Workers

Exponential backoff, retry management, and idempotency checks

Layer 04 • Provider Abstraction
Multi-Provider Email Router

Unified delivery interface across transactional email providers

Architecture & Core Features

Architectural Layers
  • •Asynchronous Queue Workers
  • •Multi-provider Abstraction
  • •Rate-limiting Service
Core Product Capabilities
  • •Real-time Communications
  • •OTP Verification
  • •Campaign Scheduling
  • •Draft Management

Engineering Challenges & Solutions

Key Technical Challenges
  • •Preventing bulk broadcast campaigns from delaying time-sensitive OTP verification codes
  • •Enforcing provider rate limits and retry backoff across thousands of recipients
  • •Ensuring idempotent delivery so retries never send duplicate emails to the same user
Implemented Solutions
  • Engineered priority-segregated asynchronous queue workers separating OTP traffic from bulk campaigns
  • Built a multi-provider email abstraction layer with token-bucket rate limiting
  • Added campaign state tracking, draft management, and per-recipient delivery audit logs

Requirements & Technical Governance

System Requirements
  • • Deliver time-critical OTP verification emails with minimal latency
  • • Support scheduled bulk email broadcasts with draft management and delivery tracking
  • • Protect sender reputation through strict rate-limiting and retry controls
Security, Performance & Observability
  • • Rate-limited OTP generation and verification endpoints mitigating brute-force abuse
  • • Server-side credential isolation for all email provider API keys
  • • Non-blocking request handling via background queue offloading
  • • Controlled concurrency and batching for bulk broadcast throughput
  • • Per-campaign delivery status tracking, bounce/error logging, and queue depth monitoring

Verified Outcomes & Technology Stack

  • →Reliable real-time OTP delivery alongside scheduled bulk broadcast campaigns at bmforexhub.exchange
  • →Isolating transactional authentication queues from bulk broadcast queues is mandatory for predictable OTP SLA
Node.jsPHPEmail APIsQueues