Real-time & Subscriptions
Subscribe to live data changes with real-time listeners and WebSocket subscriptions.
Overview
Real-time subscriptions let you watch for live data changes so that new, modified, and deleted records appear automatically in the data table without manual refreshing. This feature is available for Firebase (Firestore snapshot listeners) and Supabase (WebSocket subscriptions). DynamoDB does not support real-time sync.
Enabling Subscriptions
Toggle the real-time listener button in the data table toolbar. When enabled:
- The toolbar shows a pulsing indicator confirming the subscription is active
- New records added appear in the table automatically
- Modified records update their values in place
- Deleted records are removed from the table
How It Works
Firestore (Firebase)
Stackpane uses Firestore’s snapshot listener to receive change events. Each event includes the type of change (added, modified, removed) and the affected document data. The document table updates incrementally rather than reloading the entire collection.
PostgreSQL (Supabase)
Stackpane connects via WebSocket to Supabase Realtime and subscribes to table changes. Events for INSERT, UPDATE, and DELETE operations are received and reflected in the table view. The WebSocket connection is managed automatically.
Visual Indicators
When the listener detects changes:
- New documents briefly flash with a highlight to draw your attention
- Modified documents update their displayed values and show a subtle change indicator
- Removed documents animate out of the table
These visual cues make it easy to spot changes in a busy collection.
Use Cases
Monitoring Production Data
Enable the listener on a production collection to watch for new entries, such as new user signups, incoming orders, or support tickets. This is useful for live monitoring during deployments or incidents.
Development and Testing
When testing locally with the emulator, enable the listener to see how your application writes are reflected in Stackpane in real time. This is valuable for verifying that your client code writes the expected data.
Collaborative Editing
If multiple team members are working on the same Firebase project, the listener ensures everyone sees the latest data without manually refreshing.
Performance Considerations
Real-time subscriptions maintain an active connection to your backend. For very large collections with frequent changes, consider using a query filter to narrow the scope and reduce the volume of incoming updates.
When you navigate away from a collection or switch to a different connection, the subscription is automatically disconnected to conserve resources.
Combining with Query Filters
Real-time subscriptions respect any active query filters. If you have a filter applied, only changes to matching records trigger updates. This is useful for monitoring a specific subset of data.
Provider Support
| Feature | Firebase | Supabase | AWS |
|---|---|---|---|
| Real-time updates | Snapshot listeners | WebSocket subscriptions | Not supported |
| Filter support | Yes | Yes | N/A |
| Event types | added, modified, removed | INSERT, UPDATE, DELETE | N/A |