Back to Selected Work Archive01 // THE BUSINESS PROBLEM & SITUATION 02 // SYSTEM ARCHITECTURE & SOLUTION 03 // ENGINEERING CONTRIBUTION & FEATURES 04 // EXECUTION PIPELINE 05 // ENGINEERING LESSONS & OUTCOMES
AutomationSTATUS: Open Source 1 0
ThreadHarbor WhatsApp Hub
Centralized WhatsApp Business API orchestrator with NLP intent classification
ThreadHarbor enables businesses to automate customer messaging at scale. Built with FastAPI and Redis, it parses incoming WhatsApp webhooks, classifies conversational intent, executes automated inquiry flows, and provides fallback routing to human support agents.
Operational Context
Service businesses relying on WhatsApp as a primary customer channel suffer from response delays and lost leads during peak message hours.
CLIENT / ENVIRONMENT: Developed for service businesses managing high-volume client communications on WhatsApp.
What Was Built
Engineered a scalable webhook orchestrator combining NLP intent classification with Redis state machines for real-time conversation management.
THREADHARBOR // WHATSAPP_APISession State Machine
WEBHOOK
WhatsApp API
NLP
FastAPI Classifier
CACHE
Redis Session
ESCALATION
Human Support
SYSTEMS_ARCHITECTURE_EXPLODER // LAYERED_STACKFULL-STACK SYSTEM DECOUPLING
Frontend Layer
Next.js 16 App Router, React 19, Tailwind CSS, TypeScriptAPI & Middleware
FastAPI, Pydantic Schema Validation, Rate LimitersOrchestration
LangGraph Multi-Agent Supervisor & State MachinesModel Providers
OpenAI GPT-4o, Anthropic Claude 3.5, Vision AIData Stores
PostgreSQL (Prisma), Qdrant Vector Store, Redis CachingObservability
LangSmith traces, Pydantic audit logs, Error retriesExact Contribution
- Developed high-throughput FastAPI webhook listener for WhatsApp Business API
- Implemented intent classification module with fast fallback routing
- Built Redis session state machine maintaining context across async webhooks
- Designed seamless human-agent takeover protocols
Key Capabilities Built
✓ Real-Time WhatsApp Webhook Ingestion
✓ Intent-Driven Automated Response Routing
✓ Redis Session Context Caching
✓ Human-Agent Live Handoff Protocol
✓ Rich Interactive Message Template Support
DATA_PROVENANCE_TIMELINE // AUDIT_TRACETRACE_ID: #TR-992041
14:22:01.002Source Ingestion
Received webhook payloadOK
14:22:01.045Schema Validation
Pydantic structured field checkOK
14:22:01.210LangGraph Reasoning
Evaluated criteria rulesOK
14:22:01.350Human Audit Check
Confidence threshold evaluationPASSED
14:22:01.480Database Commit
Created audit record in PostgreSQLCOMMITTED
*Illustrative system trace — demonstration data, not a client result.
Step-by-Step Workflow
STEP 01Customer sends message to business WhatsApp account.
STEP 02FastAPI listener validates signature and parses payload.
STEP 03NLP module classifies customer intent and entities.
STEP 04Redis session state machine retrieves conversational context.
STEP 05System sends automated response or alerts human team if escalation is needed.
Technical Challenges Overcome
- • Handling out-of-order webhook delivery during sporadic mobile network conditions.
- • Managing WhatsApp 24-hour customer service session window constraints.
Measurable Outcomes
→ Automated tier-1 FAQ responses with sub-second response times in testing.
→ Standardized conversational session persistence across distributed worker instances.
Lessons & Engineering Rules
- "Stateless webhook handlers require explicit Redis caching layers for reliable conversation continuity."
- "Clear fallback paths must be triggered whenever intent classification confidence drops below 75%."
NEXT RELATED CASE STUDY
View Study RivalTrace Competitor Monitor
PROJECT METADATA
ARSLAN'S ROLEBackend Automation Engineer
YEAR & STATUS2025 // Open Source
CATEGORYAutomation
TECHNOLOGY STACK
PythonWhatsApp Business APIFastAPIRedisNLPDocker
GITHUB METRICS
Stars: 1
Forks: 0
Verified GitHub Update: 8/27/2026
Need a similar solution?
If your business faces similar data, automation, or software bottlenecks, let's discuss your requirements.
Start a Conversation