Categories
Developer Tools Push Notifications Realtime Server-Sent Events Web APIs Presence Live UpdatesStars
Forks
Watchers
Developer links
Mercure
Mercure is a realtime hub that pushes updates from your backend straight to browsers over Server-Sent Events, so live dashboards, chat rooms, and activity feeds refresh the moment data changes. Subscribers connect through the browser's built-in EventSource API and choose topics with exact matchers for single resources or URL Pattern matchers for whole families such as /books/:id. Publishers send one form-encoded POST to the hub endpoint, and Mercure fans each update out to every matching connection instantly. JWT access tokens grant publish and subscribe rights topic by topic, so private updates reach only entitled clients while public topics can stay open to anonymous subscribers. If a connection drops, the client reconnects with its last event ID and Mercure replays the updates it missed from stored history. Subscription events announce every arrival and departure, so your application gets live presence and a current list of who is connected. A built-in debug UI shows messages flowing through the hub alongside active subscriptions, turning realtime bugs into something you can watch happen. Optional end-to-end encryption protects sensitive payloads, and any backend able to send an HTTP POST can publish, whatever language it runs. Running on a dedicated VPS on RepoCloud with guaranteed CPU, RAM, and SSD, full root SSH access, and a browser serial console. AGPL-3.0 licensed.
Benefits
- Realtime Without WebSocket Plumbing
- Subscribers use the native EventSource API built into every browser, so live updates ride plain HTTP with automatic reconnection and no client library, socket server, or sticky-session gymnastics to maintain.
- Private Topics Stay Private
- JWT access tokens carry per-topic publish and subscribe grants, so a customer sees only their own orders, messages, and notifications even while thousands of public topics flow through the same hub.
- Missed Updates Replay Automatically
- The hub stores published updates in its history, and a reconnecting client presents its last event ID to receive exactly what it missed, closing the gap left by tunnels, sleep, and flaky Wi-Fi.
- Presence And Debugging Built In
- Subscription events report arrivals and departures in real time, and the bundled debug UI visualizes message flow and active subscribers, so operators can answer who is connected and what was delivered.
Features
- Server-Sent Events Transport
- Subscribers hold one HTTP connection open with EventSource and receive text events as the hub publishes them, traversing proxies and HTTP/2 without upgrades.
- Exact And Pattern Matchers
- Exact matchers select single topics byte for byte, while WHATWG URL Pattern matchers such as /books/:id subscribe to entire resource families in one expression.
- OAuth-Style JWT Authorization
- RFC 9068 JWT access tokens carry RFC 9396 authorization_details grants naming publish and subscribe actions per topic matcher, validated against trusted issuers.
- History And Replay
- Published updates persist in the hub history store, and Last-Event-ID reconnection replays missed events in order before live delivery resumes for the subscriber.
- Built-In Debug UI
- The bundled debugger lists active subscriptions and streams messages as they pass through the hub, giving operators a live window into topics, payloads, and delivery.