The sync engine that streams everything
Point browsers straight at a sync service and clients get to pick their own tables and filters. One missing check, and every customer's rows stream out to whoever asks.
Screens update by themselves, and each user only sees their own data.
Changes show up on every open screen in real time. No refresh button, no polling code to write. And every live stream is checked on the server first, so users only ever see their own company's data.
0
query details accepted from the browser
5 min
before every stream must re-prove access
1
checked path for every live feed
Without a shared foundation, every team rebuilds these edge cases — differently.
Point browsers straight at a sync service and clients get to pick their own tables and filters. One missing check, and every customer's rows stream out to whoever asks.
Access was checked once, when the stream opened. That person was removed an hour ago. Their tab is still receiving live updates. Access checked once is access that never expires.
A slightly stale update lands over a fresh edit, then the real one arrives and the screen visibly jumps. Your users read that flicker as data loss.
The mechanism end to end, as implemented in the repository.
The browser asks by name
The client requests a named feed along with its company and project IDs. Everything gets validated before anything else runs.
The server checks membership
Login and role are verified, and project feeds are checked against the right company. Failures return errors, never data.
The server builds the real query
Tables, columns, and filters come from a server-only registry. The sync secret never leaves the server.
Updates settle in order
Each save returns its database transaction ID. The screen holds its instant change until that exact transaction arrives, so nothing stale wins.
Interactive example
This walkthrough demonstrates the implemented backend contract without using an account, credentials, or provider calls.
Interactive example
Step 1 of 4: Optimistic update
Deterministic sample data only. No account, provider, or network connection is used by the interaction.
Highlights
The browser can only ask for a feed by name. Which tables, columns, and filters it gets is decided on the server.
Live streams expire every five minutes and must re-prove access. Removed users lose their feed at the next check, not never.
The screen updates instantly, then quietly confirms with the server. Stale data never overwrites a fresh edit.
Engineering guarantees
This bounds what a live stream can reach. It doesn't audit what your own feed definitions choose to expose, and full checks against a running stack are still a separate release step.
The boundary above is code, not a claim. These files carry the contract:
src/routes/api/electric.tssrc/realtime/server-proxy.tssrc/realtime/registry.server.tsThese capabilities share contracts and boundaries with this one.
The docs describe the same contracts this page demonstrates.