Text edition · micro-app
ChatApp
Real-time across browser tabs
What it is
A real-time chat you can actually test: open this demo in a second browser tab and the two clients discover each other over a BroadcastChannel room — presence heartbeats, typing signals, messages and delivery acks, all observable live. History persists locally; a clearly-labelled demo bot (nova) answers when you are the only tab.
- Flutter
- BroadcastChannel
- Protocol design
Under the hood
- No backend: same-origin tabs discover each other over a BroadcastChannel room with presence heartbeats and typing signals.
- Optimistic sends, id-based dedupe, ✓/✓✓ delivery states, unread badges, and history persisted in shared_preferences.
- Bot intents use word-boundary matching (so "hire" never fires "hi"); 21 assertions cover the protocol and bot logic.
Honest notes
- Real-time works across tabs on this origin only; solo visitors talk to a clearly labelled demo bot.