Add real-time updates
Make your app feel alive. Live updates, collaboration, and instant notifications built in.
Tools that power the Add real-time updates stack
Supabase Realtime — Database change subscriptions
Subscribe to Postgres table changes and broadcast them to connected clients instantly
Pusher — Hosted WebSocket service
Managed WebSocket infrastructure that handles connections, scaling, and presence
Ably — Pub/sub messaging platform
Reliable pub/sub with guaranteed message ordering and offline catch-up
Socket.io — Real-time JavaScript library
Full-featured WebSocket library with automatic fallback and room-based messaging
Setup guide
- Supabase Realtime: Choose the realtime service that fits your backend. For Supabase Postgres Changes, enable the table in the Realtime publication and configure RLS so users can select only authorized rows. Subscribe with channel().on("postgres_changes", theTableFilter, callback).subscribe(), handle connection errors, and remove the channel on cleanup. Test permitted updates and cross-user denial with two accounts. (Open Supabase Realtime instructions)
- Pusher: Use Pusher Channels as an alternative hosted service. Publish events from your server with server-only credentials. For private data, use private or presence channels and an authorization endpoint that checks membership before allowing the client subscription. Test an unauthorized subscription attempt as well as a permitted event. (Read official instructions)
- Ably: For Ably, keep the API key on your server and issue short-lived, scoped tokens through an authenticated endpoint for browser clients. Configure authUrl or authCallback in the client, then publish and subscribe to the authorized channel. Configure replay/history explicitly for your retention needs and test reconnection; do not promise unlimited offline catch-up. (Read official instructions)
- Socket.io: For Socket.io, attach a server instance to your HTTP server and connect with the client library. Authenticate connections and authorize room membership on the server before joining any user-specific room; never trust an arbitrary client-supplied user ID. Emit events to authorized rooms and test reconnection, missed-event recovery and long-polling fallback. (Read official instructions)
Check: Two permitted clients see the intended event; an unauthorized account cannot join its private channel, and reconnect behavior matches the documented recovery limits.