July 8, 2026
Chat App Multiapps.
Backend ยท FrontendAn omnichannel customer-support chat system that unifies WhatsApp, Telegram, Instagram and more into one real-time dashboard, built on Fastify, Next.js, Prisma, and Socket.IO.


Description
Chat App Multiapps (Chatku) is an omnichannel customer-support chat system for medium businesses running a team of 6โ20 agents. Messages from many channels โ WhatsApp, Telegram, Web Chat, Instagram, Facebook Messenger, LINE, Slack, and X โ all land in one shared dashboard, where agents can see and reply to every conversation in real time.
Background
Medium support teams often juggle customer messages across a dozen separate apps and inboxes, which leads to missed replies and two agents answering the same person. Chatku centralizes every channel into a single inbox with real-time updates and built-in double-reply prevention, so a small team can cover many platforms without stepping on each other.
Goal
Provide one dashboard for all channels: agents reply from a single place, supervisors monitor conversations and override assignments, and admins manage users, teams, inboxes, and channel integrations โ all delivered in real time and protected against double replies.
Features
- Unified inbox across Telegram, Web Chat (embeddable widget), WhatsApp (Meta Cloud API + a legacy
whatsapp-web.jspath), Instagram DM, Facebook Messenger, LINE, Slack, and X/Twitter โ with Email on the roadmap. - Real-time messaging over Socket.IO with live conversation updates.
- Double-reply prevention via typing indicators and an active-conversation lock backed by Redis.
- Role-based access โ
admin,supervisor, andagent, each with a distinct capability set. - Multi-tenancy โ multiple businesses/tenants isolated within one deployment.
- Embeddable web widget โ
widget.jsserved natively for any business website. - Per-channel pipeline โ a webhook โ worker (BullMQ) โ shared-helper flow so every channel behaves consistently.
Technologies
- Backend: Fastify (Node.js / TypeScript), Socket.IO, BullMQ workers, Prisma ORM over MySQL, and Redis (ioredis).
- Frontend: Next.js (App Router) dashboard.
- Infrastructure: a single-public-port design (the backend proxies the internal Next.js server), Docker Compose, and PM2 (
ecosystem.config.js).
How to Run
npm install
cp .env.example .env # configure MySQL, Redis, and channel tokens
npx prisma migrate dev
npm run dev # runs backend + frontend together
# open http://localhost:3000
By default the backend (:3000) is the only public port: it serves the REST API at /api, Socket.IO, channel webhooks, and widget.js, and proxies everything else to the internal Next.js server (:3001). A Docker Compose setup is also provided for a containerized run.
Technical Decisions
- Single public port. One URL and one command run the whole app โ the Fastify backend serves the API, real-time layer, webhooks, and widget, and proxies the Next.js dashboard behind it.
- Channel-agnostic pipeline. Every channel follows the same
webhook โ BullMQ worker โ shared helpersflow, so adding a platform is a new adapter rather than new architecture. AChannelTypeenum models all channels uniformly. - Real-time coordination with Redis. Presence, typing indicators, and active-conversation locks run on Redis + Socket.IO to guarantee that two agents never reply to the same conversation.
- Official vs unofficial APIs. The Meta Cloud API is the supported WhatsApp path;
whatsapp-web.jsis kept as an internal/legacy option only (it violates WhatsApp’s ToS and is not offered commercially).
What I Learned
- Designing a channel-agnostic message pipeline that scales to many platforms without special-casing each one.
- Coordinating real-time state (presence, typing, locks) with Redis and Socket.IO.
- Running a decoupled Fastify + Next.js application behind a single port and URL.
- Weighing the trade-offs between official and unofficial messaging APIs.
Notes
Private repository. Image and live preview will be added later. WhatsApp Web (whatsapp-web.js) is internal/legacy only and not part of any commercial offering, and the Email channel is still on the roadmap.

Hey! I’m Fanny, the software engineer tending to this digital garden. You can read more about me, or subscribe by email.