Supabase is an open-source Firebase alternative built on PostgreSQL, launched in 2020 by Paul Copplestone and Ant Wilson. It provides a suite of backend services — database, authentication, storage, edge functions, and real-time communication — behind a developer-friendly API. Supabase raised a $80 million Series B in 2022 and serves over 1 million developers, making it one of the fastest-growing backend platforms in the developer tools space. Its Realtime feature — which enables WebSocket-based communication for presence, broadcast, and database change notifications — is particularly relevant for anonymous chat applications.
Supabase Realtime Channels
Supabase Realtime is built on the Phoenix Framework's Channels concept, providing three core primitives. Broadcast: send a message from one client to all others subscribed to a channel — ideal for chat messages. Presence: track who is connected to a channel, with each client announcing its presence and receiving a live map of all connected clients — ideal for "X people online" counts and active session indicators. Postgres Changes: receive real-time notifications when rows in the PostgreSQL database change — useful for server-triggered events like match completion.
Presence for Online Counts
The presence feature is technically elegant: each client calls channel.track({ userId, username }) to announce their presence, and Supabase Realtime maintains a CRDT (Conflict-free Replicated Data Type)-based state across all connected clients. When any client connects or disconnects, all other clients receive an updated presence map within milliseconds. This enables accurate real-time online user counts without polling or database queries — the count is maintained in memory by the Realtime server and pushed to all clients on change.
Anonymous Chat Architecture with Supabase
For anonymous chat platforms, Supabase Realtime handles the matchmaking and session coordination layer while keeping message content out of the database. Clients subscribe to ephemeral channels for their session; messages are broadcast through the channel without being stored; and presence tracks queue membership for matching. The PostgreSQL database is used only for persistent data that genuinely needs persistence (session metadata for reconnection, moderation records) — not message content. This hybrid approach uses Supabase's strengths (real-time coordination, edge functions, row-level security) while maintaining genuine message ephemerality.