PHPackages                             max-stan/magento2-mercure - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. max-stan/magento2-mercure

ActiveMagento2-module[HTTP &amp; Networking](/categories/http)

max-stan/magento2-mercure
=========================

Magento 2 module for real-time publishing via Mercure protocol

0.1.0-alpha1(2mo ago)2591MITPHPPHP &gt;=8.3CI passing

Since Mar 8Pushed 2mo agoCompare

[ Source](https://github.com/max-stan/magento2-mercure)[ Packagist](https://packagist.org/packages/max-stan/magento2-mercure)[ RSS](/packages/max-stan-magento2-mercure/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (6)Versions (4)Used By (1)

📦 Magento 2 Mercure
===================

[](#-magento-2-mercure)

> Magento 2 module that integrates [Symfony Mercure](https://github.com/symfony/mercure)to enable real-time, server-sent event (SSE) publishing capabilities for your e-commerce store.

[![Packagist](https://camo.githubusercontent.com/0d657717b8ec9637c4b4ae50d6333d9fac43f8b953a3896e0aa884fe140dad1c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d61782d7374616e2f6d6167656e746f322d6d6572637572653f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/max-stan/magento2-mercure)[![Packagist](https://camo.githubusercontent.com/53a6c2edbd71a3ea2050c770ce3afae62d6ea28a0194a1060c19d59dcb59bb26/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d61782d7374616e2f6d6167656e746f322d6d6572637572653f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/max-stan/magento2-mercure)[![Packagist](https://camo.githubusercontent.com/7c80703c19321b5a80ca5680ff19d8607bb24f9ab0c37c785ffb535e0f46cbb2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f6d61782d7374616e2f6d6167656e746f322d6d6572637572653f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/max-stan/magento2-mercure)[![Tests](https://camo.githubusercontent.com/cd79afa15eb7c34367bf91c916181426c5ce98ae4e8aa4724274d90956f0b900/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6d61782d7374616e2f6d6167656e746f322d6d6572637572652f6d61696e2e796d6c3f6272616e63683d6d6173746572267374796c653d666f722d7468652d6261646765266c6162656c3d7465737473)](https://github.com/MaxStan/magento2-mercure/actions/workflows/main.yml)

This module provides a Mercure Hub integration layer for Magento 2, enabling real-time server-sent events (SSE) across your storefront and admin panel. It handles JWT-based authentication for both publishing and subscribing, with separate secrets for each operation. Topics are managed through an extensible resolver system that supports both public (guest-accessible) and private (customer-specific) topic authorization.

Warning

This package is currently in **alpha** (`0.1.0-alpha1`). The API is unstable and may introduce breaking changes between releases. Do not use in production.

⭐ Features
----------

[](#-features)

- **SharedWorker SSE** — Single connection shared across browser tabs with automatic reconnection
- **JWT Authentication** — Separate publisher/subscriber token generation with configurable secrets, algorithms (HMAC SHA-256/384/512), and TTL
- **Topic-based authorization** — Third-party modules have an ability to register their own topics. Public and private topic separation with user-scoped access control

🛠️ Installation
---------------

[](#️-installation)

To install Mercure in your Magento 2 project, follow these steps:

```
# Set minimum stability to allow alpha version
composer config minimum-stability "alpha"
# Standard Magento module installation commands
composer require max-stan/magento2-mercure
bin/magento mod:en MaxStan_Mercure
bin/magento setup:upgrade
bin/magento setup:di:compile
# Sets config values
bin/magento config:set mercure/jwt_publisher/jwt_publisher_secret '!ChangeThisMercureHubJWTSecretKey!'
bin/magento config:set mercure/jwt_subscriber/jwt_subscriber_secret '!ChangeThisMercureHubJWTSecretKey!'
bin/magento config:set mercure/general/enabled 1
bin/magento c:f
# Install and configure Mercure Hub in dev mode, available via http://localhost:8080
docker run \
    -e SERVER_NAME=':80' \
    -e MERCURE_PUBLISHER_JWT_KEY='!ChangeThisMercureHubJWTSecretKey!' \
    -e MERCURE_SUBSCRIBER_JWT_KEY='!ChangeThisMercureHubJWTSecretKey!' \
    -p 8080:80 \
    dunglas/mercure caddy run --config /etc/caddy/dev.Caddyfile
```

🔁 Magento Compatibility
-----------------------

[](#-magento-compatibility)

Can be installed on most 2.x Magento versions

🚀 Contributing
--------------

[](#-contributing)

Contributions are welcome! If you find a bug or have a feature request, feel free to open an issue or submit a pull request.

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance86

Actively maintained with recent releases

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~20 days

Total

2

Last Release

71d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8c20a11c23c52d15e5fa5515839af5acdd5c0e6a388f0c34f1b5ea7dce82283e?d=identicon)[max-stan](/maintainers/max-stan)

---

Top Contributors

[![max-stan](https://avatars.githubusercontent.com/u/80004323?v=4)](https://github.com/max-stan "max-stan (21 commits)")

---

Tags

magento2magento2-extensionmagento2-extension-freemagento2-modulemagento2-module-freerealtimerealtime-messagingssepushupdatesssemercuremagento2

### Embed Badge

![Health badge](/badges/max-stan-magento2-mercure/health.svg)

```
[![Health](https://phpackages.com/badges/max-stan-magento2-mercure/health.svg)](https://phpackages.com/packages/max-stan-magento2-mercure)
```

###  Alternatives

[symfony/mercure-bundle

Symfony MercureBundle

30913.5M53](/packages/symfony-mercure-bundle)[symfony/mercure

Symfony Mercure Component

44015.1M28](/packages/symfony-mercure)[pusher/pusher-php-server

Library for interacting with the Pusher REST API

1.5k94.8M293](/packages/pusher-pusher-php-server)[symfony/web-link

Manages links between resources

1.4k99.0M251](/packages/symfony-web-link)[mvanduijker/laravel-mercure-broadcaster

Mercure broadcaster

16866.5k](/packages/mvanduijker-laravel-mercure-broadcaster)[apple/apn-push

Push notifications to Apple devices

1661.4M3](/packages/apple-apn-push)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
