How prashant272/whatapp-offical-prime works
WhatsApp Official Prime is a multi-account customer-engagement CRM: staff manage leads and conversations, send messages or campaigns, and automate replies and follow-ups. The web dashboard and mobile chat client use a Node/Express backend; MongoDB holds business state, while Meta provides WhatsApp messaging and webhooks. The graph preserves major documented capabilities, but several UI-to-controller and controller-to-model links are inferred only at the subsystem level because their implementations were not sampled.
Main entry points: server.js HTTP and socket server · api.js API client · whatsappService.js WhatsApp API service · Contact.js CRM records
Components 25
Staff clients
- Web dashboard
frontend/src/App.jsx - Mobile chat app
mobile/App.js - Lead management
frontend/src/components/ContactManager/ContactManagerMain.jsx - Chat dashboard
frontend/src/components/ChatModule.jsx - Campaign manager
frontend/src/components/CampaignManager.jsx - Reply automation
frontend/src/components/AutoReplyManager.jsx - Email manager
frontend/src/components/EmailManager.jsx - Activity reporting
frontend/src/components/ActivityLog/ActivityManager.jsx - API client
frontend/src/api.js - Mobile API client
mobile/src/api.js
Backend API
- HTTP and socket server
backend/server.js - Conversation handling
backend/controllers/chatController.js - Contact handling
backend/controllers/contactController.js - Inbound webhook
backend/controllers/webhookController.js - Campaign handling
backend/controllers/campaignController.js - Automation rules
backend/controllers/followUpController.js
Messaging automation
- WhatsApp API service
backend/services/whatsappService.js - Follow-up worker
backend/utils/automationCron.js - Realtime events
backend/utils/socket.js - Email delivery
backend/services/emailService.js
Data and integrations
- MongoDB
backend/config/db.js - CRM records
backend/models/Contact.js - Meta WhatsApp Cloud API
- Email provider
Other components
- Staff user
Connections 37
- Staff user → Web dashboard: uses
- Staff user → Mobile chat app: uses
- Web dashboard → API client: requests
- Lead management → API client: fetches leads
- Chat dashboard → API client: sends chat requests
- Campaign manager → API client: manages campaigns
- Reply automation → API client: configures replies
- Email manager → API client: manages email
- Activity reporting → API client: loads reports
- Mobile chat app → Mobile API client: requests
- API client → HTTP and socket server: calls API
- Mobile API client → HTTP and socket server: calls API
- HTTP and socket server → MongoDB: connects
- HTTP and socket server → Realtime events: initializes
- HTTP and socket server → Follow-up worker: starts worker
- HTTP and socket server → Conversation handling: routes chat requests
- HTTP and socket server → Contact handling: routes contact requests
- HTTP and socket server → Campaign handling: routes campaign requests
- HTTP and socket server → Automation rules: routes automation requests
- HTTP and socket server → Inbound webhook: routes webhook requests
- Conversation handling → WhatsApp API service: sends messages
- Contact handling → WhatsApp API service: verifies and blocks
- Inbound webhook → WhatsApp API service: sends auto-replies
- Campaign handling → WhatsApp API service: sends campaign messages
- Follow-up worker → WhatsApp API service: sends follow-ups
- WhatsApp API service → Meta WhatsApp Cloud API: sends WhatsApp traffic
- Meta WhatsApp Cloud API → HTTP and socket server: posts inbound events
- Conversation handling → Realtime events: emits chat events
- Realtime events → Web dashboard: notifies live clients
- Conversation handling → CRM records: updates conversations
- Contact handling → CRM records: manages contacts
- Campaign handling → CRM records: records campaigns
- Automation rules → CRM records: stores follow-up rules
- Follow-up worker → CRM records: scans due rules
- CRM records → MongoDB: persists records
- Email manager → Email delivery: configures delivery
- Email delivery → Email provider: delivers email