Playground · SSE
Server-sent events, live.
This is a working preview of the kind of real-time event stream that powers InstaEscrow. Phase 2 connects the widget below to a real Phoenix backend at live.erick.africa — open DevTools → Network and you'll see actual EventSource frames, automatic reconnect, and replay via Last-Event-ID. Phase 1 simulates events client-side so the page is fast and offline-safe.
- 11:09:12instaescroworder.createdBuyer placed order #IE-4486 — KES 850
- 11:09:12autopaypayment.authorizedM-Pesa STK push confirmed — KES 1,250
- 11:09:12instaescrowescrow.heldFunds held in escrow #ESC-5104
- 11:09:12logisticsdelivery.dispatchedOrder #IE-0941 dispatched to courier
- 11:09:12instaescrowdelivery.confirmedBuyer confirmed receipt — auto-release in 24h
- 11:09:12autopaypayment.releasedReleased KES 18,000 to seller wallet
- 11:09:12autopaywallet.payoutSeller withdrew KES 32,500 via Paystack transfer
- 11:09:12arbiterdispute.openedDispute #DSP-7195 opened — buyer claims item not received
- 11:09:12arbiterdispute.resolvedDispute #DSP-9027 resolved in buyer's favor
- 11:09:12iamkyc.verifiedVendor KYC document verified — unlocked withdrawals
- 11:09:12beaconsession.connectedSSE client #4486 connected — XREAD BLOCK active
- 11:09:12beaconsession.replayedReplayed 12 events from last-event-id for reconnecting client
Architecture
Redis Streams + per-user XREAD BLOCK
Each connected client is a Phoenix process that holds an XREAD BLOCK against its personal stream. Server fan-out is XADD to the right key. Persistence and replay come for free.
Reconnect semantics
Last-Event-ID replay
Reconnecting clients send the last event ID they saw; the server replays everything missed during the gap, then resumes live. Mobile apps roaming networks never miss an event.
Presence
TTL-based heartbeats
Every client refreshes its presence key in Redis with a 30s TTL. Disconnects expire naturally without server-side cleanup hooks.
Capacity
Per-user connection caps
One device, two browser tabs, three Flutter app instances — limits per user prevent connection exhaustion from runaway clients.