Awesome Mercure
Libraries, framework integrations, and tutorials for Mercure. Check each project's supported protocol version: older integrations may require the 0.x compatibility mode. Contributions are welcome.
#Mercure demos
- Demo hub and debug UI (source): managed demo hub with the official debug tools.
- Chat (source): chat app with presence (JavaScript + Python).
#Mercure code examples
- JavaScript: publish, subscribe, presence API
- JavaScript: subscribe + presence
- Node.js: publish
- PHP: publish
- Ruby: publish
- Python: subscribe
- Python: cookie-based authorization
- API Platform: publish + subscribe: book catalog updated in real time.
#Hubs and server libraries
- Mercure.rocks Hub (Go): the reference implementation.
- Freddie (PHP)
- Ilshidur/node-mercure (Node.js)
#Mercure client libraries
@microsoft/fetch-event-source(JavaScript): browser SSE client with custom headers and retry handling.symfony/mercure(PHP, publisher)python-mercure(Python, publish + subscribe)dart_mercure(Dart / Flutter, publish + subscribe)amp-mercure-publisher(PHP / Amphp)java-mercure(Java, publisher)mercure-rs(Rust, publisher)
#Mercure framework integrations
- Symfony: official component, full publisher support.
- API Platform: full publisher + subscriber + GraphQL subscriptions.
- Laravel Mercure Broadcaster
- Yii Mercure Behavior
- CakePHP Mercure plugin
- Hotwire / Turbo Streams
- GitHub Action: publish on workflow events
#Documentation, tooling, and code generation
- AsyncAPI: can describe asynchronous APIs; check tooling support for your Mercure revision.
- URI Template tester: for hubs running 0.x-style URI Template subscriptions.
#Useful SSE and JWT libraries for Mercure
EventSourcepolyfill (Edge / IE / old browsers)EventSourcepolyfill for React NativeEventSourcefor Node- Server-Sent Events client for Go
- Server-Sent Events client for Android / Java
- Server-Sent Events client for Swift
parse-link-header(JavaScript): parseLink: rel="mercure"headers.jose(JavaScript): JWT and JWE in the browser and Node.
#Projects using Mercure
#Mercure learning resources
#Mercure resources in English
- 📺 API updates in real time with Mercure.rocks
- 📺 Building async public APIs using HTTP/2+ and the Mercure protocol
- Official push and real-time capabilities for Symfony and API Platform
- Laravel Broadcasting: Mercure driver
- Using Mercure on Stackhero
#Mercure resources in French
- 📺 Notifications instantanées avec Mercure (Grafikart)
- 📺 Live coding: Notifications temps réel avec Mercure
- 📺 Server-Sent Events avec Mercure
- 📺 Mercure: des UIs synchronisées avec les données en BDD
- 📺 Async avec Messenger, AMQP et Mercure
- Mercure, un protocole pour pousser des mises à jour en temps réel (Les-Tilleuls.coop)
- À la découverte de Mercure
#Mercure resources in German
#Find more Mercure projects
GitHub mercure topic, community-tagged repositories.
#Add your Mercure library or tutorial
Submit a pull request with one bullet per resource. Include the language for libraries and place tutorials under the appropriate language heading.