How hamza92ra/repliq works
RepliQ is a WhatsApp customer-support and lead-management bot. Its main workflow receives a Meta webhook, handles incoming text or voice messages, uses AI to draft a reply, records the conversation, and sends the response through WhatsApp. Separate dashboard and signup flows support human takeover, business prompt configuration, order tracking, and lead follow-up. The sampled webhook excerpt omits some processing, so links for order creation and AI replies reflect the documented and imported responsibilities; other uncertain wiring is not shown.
Main entry points: webhook.js Message webhook · db.js Conversation store · lead.js Lead intake · whatsapp.js WhatsApp client
Components 18
WhatsApp messaging
- Message webhook
api/webhook.js - WhatsApp client
lib/whatsapp.js - AI and audio
lib/ai.js
Conversation operations
- Conversation API
api/conversation.js - Conversation store
lib/db.js - Operations dashboard
dashboard.html - Dashboard API
api/dashboard.js - Business config API
api/business-config.js
Lead and orders
- Signup form
formulaire.html - Lead intake
api/lead.js - Team notification
lib/notify.js - Orders API
api/orders.js - Order store
lib/orders.js
External services
- Meta WhatsApp
- Groq AI
- Upstash Redis
- Resend email
Other components
- Customer
Connections 27
- Customer → Meta WhatsApp: sends message
- Meta WhatsApp → Message webhook: posts event
- Message webhook → WhatsApp client: handles media
- Message webhook → AI and audio: requests reply or transcription
- Message webhook → Conversation store: reads and records
- Message webhook → Order store: creates order
- AI and audio → Groq AI: requests inference
- WhatsApp client → Meta WhatsApp: sends and retrieves
- Message webhook → WhatsApp client: sends reply
- Message webhook → Customer: replies via WhatsApp
- Operations dashboard → Dashboard API: loads conversations
- Operations dashboard → Conversation API: manages conversations
- Operations dashboard → Orders API: views and updates orders
- Operations dashboard → Business config API: configures business
- Dashboard API → Conversation store: lists conversations
- Conversation API → Conversation store: reads and updates
- Conversation API → WhatsApp client: sends agent reply
- Business config API → Conversation store: reads and saves config
- Signup form → Lead intake: submits signup
- Lead intake → Conversation store: records lead
- Lead intake → WhatsApp client: sends confirmation
- Lead intake → Team notification: requests alert
- Team notification → Resend email: sends email
- Lead intake → Customer: confirms via WhatsApp
- Orders API → Order store: lists and updates
- Conversation store → Upstash Redis: reads and writes
- Order store → Upstash Redis: reads and writes