Live, and private.
Listen to database changes, track who is online and broadcast messages over WebSockets. Every change, deletes included, reaches only the users allowed to read that row.
const sub = supatype.from("comment").subscribe( (change) => { if (change.eventType === "INSERT") addComment(change.new) if (change.eventType === "DELETE") removeComment(change.old?.id) }, { event: "*", filter: `post_id=eq.${postId}` }, )
Changes, checked per subscriber.
Table changes
Subscribe to inserts, updates and deletes on any table, from the API, Studio or plain SQL. Filter by column values on the server. Payloads are typed from your schema.
Access aware
Your read rules apply to realtime too. Users only receive changes to rows they may read, and fields they may not see arrive as null.
Presence
Track who is in a channel and share cursors, typing indicators or any state you like. A client leaves when its socket closes.
Broadcast
Send messages to everyone else on a channel without touching the database. Broadcast and presence have no access rules, so keep private data out of them.
Filters, channels, framework hooks and limits are in the Realtime docs.
Live data, same rules.
Cloud starts with 2 projects, 500 MB database and 1 GB storage, free and with no card.