
I built a real-time inbox with Supabase Realtime to replace Slack for agencies
I spent a year building Kobin — an agency operating system that replaces Slack, Notion, HubSpot, Linear, and Buffer. The inbox was the hardest part to build. Here’s how it works technically. The architecture The inbox uses Supabase Realtime WebSocket channels. Each room (project room, group chat, DM) gets its own channel subscription. Switching rooms tears down the old channel and creates a new one — this keeps memory clean and avoids stale message states. Messages load the last 20 first. Older messages load on scroll-up demand with no flash to top. An animated skeleton UI shows while rooms are loading. The features that were harder than expected Replies — storing the quoted message as a nested reference without blowing up query complexity. We denormalize the preview text at write time. Unread badges — tracked via last_read_at timestamp per user per room. Simple in theory, surprisingly tricky when you have real-time updates coming in while the user is actively reading. @ai mentions — w
Continue reading on Dev.to Webdev
Opens in a new tab



