MuftiPortfolio← All projects
Case study · Internal system

Affiliate WhatsApp Inbox

A shared web inbox that brings six affiliate team WhatsApp numbers into one screen, so unanswered chats never slip through.

Node.jsBaileys (WhatsApp multi-device)MySQLWebSocketUbuntu · Apache
RoleFull Stack Developer (built and maintain)
Scope6 team WhatsApp numbers
AccessOwner only, behind login
UsersAffiliate team lead
Inbox — accounts sidebar, unanswered counters and chat list (names, numbers and messages blurred).
Inbox — accounts sidebar, unanswered counters and chat list (names, numbers and messages blurred).

01Problem

The affiliate team handled hundreds of conversations on six phones. Nobody could see which chats were still waiting, how long replies took, or what had been said on another number.

The goal: one screen for all six numbers while the team keeps using WhatsApp on their phones as usual.

02Architecture

Team phonesWhatsApp stays on the phone
Linked deviceBaileys session per number, full history sync
Node.js serviceMessage events, contact & name mapping, audit log
MySQLChats, messages, edits/deletes, contacts
Web inboxLive updates over WebSocket

Each number is linked like WhatsApp Web, so no phone or number has to be migrated to a business API.

03My contribution

04Technical challenges

Contacts showing as long hidden IDs

Many chats appeared as anonymous IDs instead of names or phone numbers.

Mapped hidden IDs to phone numbers from WhatsApp’s own sync data, then fell back to profile names; applied to all existing chats.

Labels flickering while typing

The page auto-refreshes status every few seconds and kept resetting the label being edited.

Refresh skips fields that are focused, saves on Enter or blur with a debounce, and uses stable keys so cards do not re-mount.

Sessions logged out from the phone

When a phone removed the linked device, the slot looked connected but was not.

Detect logout, show a disconnected state, keep history readable and offer a one-click re-scan.

05Results

06Evidence

Internal company system. Source code is private; screenshots are blurred to hide business figures and personal data. Happy to walk through the code and architecture in an interview.