Your database,
now alive.

Listen to every INSERT, UPDATE, DELETE over WebSockets. Broadcast messages, track presence, build collaborative apps — all from your Postgres.

subscribe.ts
import WowSQLClient from '@wowsql/sdk'

const client = new WowSQLClient({
  projectUrl: WOWSQL_URL, // https://<project>.wowsqlconnect.com
  apiKey: WOWSQL_KEY,     // wowsql_anon_... or wowsql_service_...
})

// wss://<project>.wowsqlconnect.com/realtime/v1/websocket?apikey=...
const channel = client.realtime.channel('chat')

channel.on(
  'postgres_changes',
  { event: 'INSERT', schema: 'public', table: 'messages' },
  (payload) => {
    console.log('New message:', payload.new)
    // { id: 42, text: 'Hello!', user_id: '...' }
  }
)

channel.on('broadcast', { event: 'typing' }, ({ payload }) => {
  console.log('typing', payload)
})

channel.subscribe()

// Ephemeral — no Postgres row, no trigger
await channel.send({
  type: 'broadcast',
  event: 'typing',
  payload: { user: 'Alice' },
})
presence.ts
const room = client.realtime.channel('online-users')

room.on('presence', { event: 'sync' }, () => {
  const state = room.presenceState()
  console.log('Online now:', Object.keys(state).length)
})

room.subscribe(async (status) => {
  if (status === 'SUBSCRIBED') {
    await room.track({
      user_id: currentUser.id,
      online_at: new Date().toISOString(),
    })
  }
})

Postgres Change Events

Subscribe to INSERT, UPDATE, DELETE on any table. Enable it first with POST /realtime/v1/enable.

Broadcast

Send low-latency messages between clients. Perfect for typing indicators and cursor sharing.

Presence

Track who's online and sync shared state across all connected clients in real time.

12ms

Sub-100ms Latency

WebSocket connections for instant delivery. No polling, no lag, no compromise.

Auth-Aware

Same anon or service_role key as REST, passed as ?apikey= on the WebSocket. Access still follows your database policies.

Auto Reconnect

Automatic reconnection with exponential backoff. Do not reconnect on close 4003 (invalid key).

Built for what's next

Real-time features for every use case.

Chat & Messaging

Live Dashboards

Multiplayer Games

Push Notifications