Secure Business MessagingCase Study

Doc Chat

WhatsApp-simple messaging for clinics — owned infrastructure, end-to-end encryption, real voice & video.

Doc Chat is a production Flutter messenger for clinics and small businesses. It feels like a familiar chat app on the surface — phone login, threads, status, calls, tasks — but runs on a self-hosted Matrix Synapse homeserver with LiveKit for 1:1 calls, an identity service for OTP + contacts, and business tools (hours, greeting, auto-reply) that consumer apps don't ship.

Platform
iOS · Android
Realtime
Matrix + LiveKit
Role
End-to-End
Surfaces
Chats · Calls · Tasks · Business
Overview

A business messenger you actually own

Doc Chat rebrands and extends a Matrix client into a clinic-ready product: phone-number onboarding instead of Matrix IDs, unread/unanswered/favourites filters on the chat list, status updates, a Calls tab, chat-linked Tasks, and Business tools for profile, hours, greeting, and away messages. Under the hood it's Flutter talking to Synapse, a custom identity service for OTP and contact sync, and MatrixRTC + LiveKit for voice and video — including CallKit / VoIP push paths for incoming calls.

The Problem

Clinics need WhatsApp UX without WhatsApp risk

Small clinics and service businesses live in WhatsApp — patients expect phone-number chat, status, and quick calls. But consumer messengers mean no ownership of the server, weak business tooling, and compliance risk around patient or client conversations. Building a credible alternative means matching that UX while controlling the homeserver, encryption, and call stack.

  • Patients and clients expect phone OTP login — not @user:homeserver Matrix IDs
  • Consumer apps don't give you business hours, greeting, or away auto-replies
  • Voice/video has to work in background and killed states (CallKit / VoIP push), not only while the app is open
  • Tasks that fall out of chat get lost unless they're linked back to the conversation
The Solution

Familiar chat UX on owned Matrix + LiveKit infrastructure

I shipped Doc Chat as a full product stack: Flutter client with teal brand theming and WhatsApp-like navigation (Chats, Updates, Calls, Tasks), a Synapse homeserver with JWT login, an identity service for SMS OTP and contact discovery, and LiveKit wired through MatrixRTC for 1:1 calls. Business profile, hours, greeting/away policies, and chat-linked tasks sit on top of Matrix so the product feels like a business messenger — not a raw protocol client.

Key Features

Everything a clinic messaging app needs day one

  • Phone OTP login via a dedicated identity service — no Matrix ID friction for end users
  • E2EE 1:1 and group chats on Matrix with familiar thread UI, search, and unread/unanswered/favourites filters
  • Voice & video calls on MatrixRTC + LiveKit, with mute/speaker controls and native incoming-call paths
  • Status / Updates tab for ephemeral broadcast-style posts
  • Tasks linked to chats — Open / Today / Upcoming / Overdue filters and Inbox / Work / Personal lists
  • Business tools — public profile, category, hours, greeting message, and away / auto-reply policies
  • Contact sync so people find each other by phone number on the same homeserver
  • Self-hosted stack: Synapse, LiveKit SFU, JWT service, and identity — runnable locally with Docker Compose
Product Tour

See it in action

Mobile App

Phone number login screen with country picker and OTP verification flow
Chats list with search and All / Unread / Unanswered / Favourites filters
Chat thread with teal message bubbles, voice and video call actions in the header
Outgoing voice call screen with mute, video, speaker, and end controls
Calls tab showing recent voice and video call history
Tasks screen with Open / Today filters and a chat-linked meeting task
Updates tab for status-style posts and notifications
Status composer with teal background and send action
My Process

From open-source Matrix client to clinic-ready product

  1. 01

    Product framing & brand

    Scoped the app around clinic / small-business messaging, replaced the default FluffyChat brand with Doc Chat teal branding (icon, feature graphic, Material color seed #00A884), and aligned copy toward secure business chat.

  2. 02

    Identity & phone onboarding

    Built phone login + OTP verification against a custom identity service, with country picker and JWT-backed Synapse login so users never see a homeserver address.

  3. 03

    Core messenger surfaces

    Shaped Chats (filters, search, FAB), thread UI, Updates/status, and Calls into a four-tab shell that feels like the messengers people already use.

  4. 04

    Realtime calls

    Integrated MatrixRTC signaling with LiveKit for media, plus CallKit / VoIP push and killed-state call actions so incoming calls survive backgrounding.

  5. 05

    Business & task workflows

    Added business profile events on Matrix, greeting/away auto-reply policies, and a task store that can attach work items back to a chat contact.

  6. 06

    Local & store-ready packaging

    Documented a Docker Compose stack (Synapse, LiveKit, JWT, identity) for local smoke tests, then produced Play Console assets — phone/tablet screenshots, 512 icon, and feature graphic.

Technical Implementation

Owned realtime stack, not a BaaS chat SDK

Doc Chat is built natively on Android using a focused, modern stack chosen for performance, maintainability, and a clean user experience.

FlutterDartMatrix (matrix-dart-sdk)SynapseLiveKitMatrixRTCFirebase (FCM / project)CallKit / PushKitOTP Identity ServiceDocker ComposeE2EE (Vodozemac)
Challenges & How I Solved Them

The decisions that shaped the product

Hiding Matrix without losing Matrix

End users get phone OTP and contact sync; operators still get a real Synapse homeserver, federation-capable protocol, and E2EE. The identity service bridges those worlds so the UX never leaks @localpart:server.

Calls that work when the app is killed

Foreground LiveKit sessions aren't enough for a messenger. I wired MatrixRTC member signaling, VoIP push registration, and native incoming-call UI so a ringing call can surface through CallKit / system notifications.

Business features as first-class Matrix state

Profile, hours, products, and labels live as custom Matrix events rather than a parallel CRUD API — so business tooling stays on the same sync engine as chat.

Tasks that don't orphan from conversation

Tasks can reference a chat contact and surface in filters (Today, Overdue, lists), so operational follow-ups stay next to the thread that created them.

Outcome

Why this project matters

Doc Chat shows LogicsBeat can take a hard realtime problem — secure messaging + VoIP on owned infrastructure — and ship it as a polished, WhatsApp-familiar product for clinics and small businesses. It's not a chat SDK demo: it's Flutter, Synapse, LiveKit, identity, business tools, and store-ready branding working as one system founders can actually deploy.

Have a mobile product idea?

I'm available for client work in Android, mobile product development, and end-to-end app delivery. Let's talk about what you're building.

Chat with us