Home / Companies / Webflow / Blog / Post Details
Content Deep Dive

How to stream live Postgres changes to a Webflow Cloud dashboard with Supabase

Blog post from Webflow

Post Details
Company
Date Published
Author
Colin Lateano
Word Count
2,277
Language
English
Hacker News Points
-
Summary

Webflow Cloud Apps allow users to deploy a Next.js app alongside a Webflow site, facilitating the creation of a real-time metrics dashboard that syncs with a Supabase Postgres database using WebSocket connections. The setup involves two distinct phases: infrastructure configuration and component construction. The infrastructure setup includes scaffolding a Webflow Cloud App, connecting to a Supabase project with Realtime enabled, and setting up necessary npm packages. The next phase involves building a Server Component to fetch initial data via REST and a Client Component to maintain real-time updates by subscribing to Supabase Realtime events. This approach ensures that new database entries appear instantly on the dashboard without requiring page refreshes or polling. The guide emphasizes the importance of configuring environment variables, enabling Postgres Realtime on the desired Supabase table, and correctly managing WebSocket connections to avoid common issues that may disrupt real-time updates.