FerryDocs
ContributingWeb client

Live updates

The server pushes each change through Server-Sent Events. Then the dashboard gets the changed data again.

Edit on GitHub
changestaleferryd/api/v1/eventsevents.tsthe change feedTanStack Querythe cacheNew requestthe fresh data

The server sends a change event on the stream /api/v1/events.

1 / 4

Two kinds of streams

The server pushes data with : the log streams, and the /api/v1/events.

The app reads them with fetch() and a parser for streams, src/lib/api/sse.ts. The same cookie proves who you are.

The change feed

src/lib/api/events.ts changes each change event into an of .

If the stream stops, the app connects again with an exponential , from 1 to 15 seconds.

When the stream is down

While the stream is down, the queries use :

DataInterval
Lists5 seconds
The detail on screen2 to 3 seconds

An older server has no change feed and answers 404. Then the queries also use polling.

On this page