TellWang
Dashboard

Realtime

Subscribe to changes in your Wok and your app sees them as they happen. Useful for dashboards, chat, live order tracking, collaborative editing. Backed by the standard Supabase Realtime service — every Wok ships it.

Click Realtime on any Wok card in the dashboard to manage the supabase_realtime publication — add a table with one click and your supabase-js client starts receiving postgres_changes events on INSERT/UPDATE/DELETE.

React to data changes (shipped)

Subscribe to a table and get notified when rows are added, changed, or removed. Two steps: (1) add the table to the supabase_realtime publication (one click in the dashboard, or PUT /v1/woks/{id}/realtime/tables/{schema}/{name}), then (2) open a channel from your client:

live.ts
const channel = tw.channel("orders-feed")
  .on(
    "postgres_changes",
    { event: "*", schema: "public", table: "orders" },
    (payload) => {
      if (payload.eventType === "INSERT") addToScreen(payload.new);
      if (payload.eventType === "UPDATE") updateOnScreen(payload.new);
      if (payload.eventType === "DELETE") removeFromScreen(payload.old);
    }
  )
  .subscribe();

Each Wok ships wal_level=logical + a single replication slot the Realtime container reads off, with row-level security enforced on what each subscriber sees (a viewer with no select grant on the table sees no events).

Broadcast (shipped)

Push transient messages between connected clients — typing indicators, cursors, ephemeral chat. Messages don't hit your database; they fan out through Realtime's in-memory broker. Cross-client p50 latency on the Standard tier is ~4ms host-local (G3 gate).

cursor.ts
const room = tw.channel("design-board");
room
  .on("broadcast", { event: "cursor" }, (msg) => drawCursor(msg.payload))
  .subscribe(async (status) => {
    if (status === "SUBSCRIBED") {
      await room.send({ type: "broadcast", event: "cursor", payload: { x, y, user } });
    }
  });

Presence (shipped)

Track who's currently connected to a channel without storing it. Useful for "online now" badges + collaborative awareness:

presence.ts
const room = tw.channel("design-board", { config: { presence: { key: user.id } } });
room
  .on("presence", { event: "sync" }, () => render(room.presenceState()))
  .subscribe(async (status) => {
    if (status === "SUBSCRIBED") {
      await room.track({ user_id: user.id, name: user.name });
    }
  });

API reference

The publication-management surface ships as PUT/GET/DELETE /v1/woks/{id}/realtime/tables[/{schema}/{name}] for adding/removing tables, plus GET .../realtime/status for slot + wal_level health. Bearer-of-owning-org auth on all four.