A messenger with no server: how ShutChat gets a message from one phone to another
Description and use
ShutChat is an Android messenger that operates without a central server, using a 24‑character invite code, LAN, Bluetooth/Wi‑Fi Direct, or MQTT for transport, with retry logic and automatic code expiry.
Problem
Build a mobile messenger that operates without a central server, avoiding single points of failure and privacy risks.
Outcome
ShutChat demonstrates that a fully serverless messenger is feasible, providing direct and group chats, media transfer, and standard messaging features while preserving privacy and resilience to server outages.
Workflow
- Generate a 24‑character invite code (15 bytes, Base32 Crockford) that encodes version, expiry, CRC, and rendezvous secret.
- Share the code via QR or text to invite a peer.
- Peer scans QR or enters code to join the conversation.
- App selects transport at runtime: LAN (UDP multicast + TCP), Nearby Connections (Bluetooth/Wi‑Fi Direct), or MQTT over TLS.
- Messages are encrypted with keys derived from the invite secret; room ID travels in clear for relaying but topic is derived from secret to protect privacy.
- If a peer is offline, the sender queues the message and retries with per‑message backoff until acknowledgment or expiry.
- Foreground service keeps the mesh listening when the app is closed.
- Peers can send photos, audio, files in chunks, and use read receipts, typing indicators, presence, etc.
- Invite codes automatically expire and rotate.
Evidence
ShutChat is the result: an Android messenger where messages travel directly between devices. No server, no account, no sign‑up screen.
A conversation starts with a 24‑character invite code, and that code is the entire access model.
Three paths, chosen at runtime: LAN, Nearby Connections, MQTT over TLS.
The relay is the only third party, and it sees neither the message nor who is talking.
A message written for an offline peer went into the queue and was never retried.
The fix was a retry queue with per‑message backoff.
Direct and group chats from a single code; photos, audio and files transferred in chunks; replies, edits, deletes, reactions; read receipts and typing indicators; presence; search, pin, mute, archive, drafts; QR code sharing; automatic expiry and rotation of invite codes.
- Record date: 2026-10-27T20:26:14.018Z