Back to 🛠️ Integrations & Setup

Setup Supabase Realtime

Real-timeSupabaseWebSocket
---
description: Real-time data sync
---

1. **Enable Realtime**:
- Go to Database → Replication in Supabase.

2. **Subscribe to Changes**:
const channel = supabase
.channel('messages')
.on('postgres_changes', { event: '*', schema: 'public', table: 'messages' }, (payload) => {
if (payload.eventType === 'INSERT') {
setMessages((prev) => [...prev, payload.new]);
}
})
.subscribe();


3. **Implement Presence**:
await channel.track({ user: 'John', online_at: new Date() });


4. **Pro Tips**:
- Use RLS for security.
- Combine with React Query.
By Antigravity Team

How to Use This Workflow

Option A: Project-Specific (Recommended)

  1. Click "Download" above
  2. In your project, create the directory: .agent/workflows/
  3. Save the file as setup-supabase-realtime-subscriptions-websocket.md
  4. In Antigravity, type /setup_supabase_realtime_subscriptions_websocket or just describe what you want to do

Learn more about workflows →

Related Workflows

Recommended Rules

View more rules →

Recommended MCP Servers

View more MCP servers →

Take It Further

Maximize your productivity with these powerful resources

📋

Define Your Standards

Set up coding standards to ensure this workflow produces consistent, high-quality results.

Browse Rules Library
📖

Master Workflows

Learn how to create custom workflows, use Turbo Mode, and build your automation library.

Complete Guide