mercureact/README.md

55 lines
1.3 KiB
Markdown

# Mercureact
This is an implementation of the Mercure realtime protocol on steroids, built using ReactPHP.
**Mercureact is under development, and not ready for use in anything important.**
It is intended to be used standalone, but it may also be integrated into another PHP application.
## Installing
As PHAR:
* Download the latest [release](/noccy/mercureact/releases) from the forge.
As Composer dependency:
* `composer require noccylabs/mercureact`
## Using as PHAR
*TODO.*
```shell
# Make a copy of the dist config and edit it
$ cp mercureact.conf.dist mercurect.conf
$ editor mercureact.conf
# Use the config file when launching
$ ./mercureact.phar -c mercureact.conf
```
## Using as dependency
*TODO.*
## ToDos
* [ ] Read config from file
* [ ] Security Security Security
* [x] Check JWTs on connect
* [x] Check claims on subscribe and publish
* [ ] WebSocket authentication
* [ ] Extract JWT claims to request attributes, instead of JWTToken
* [x] Subscription/Topic manager
* [x] Unify distribution
* [ ] Enumerate subscriptions and topics
* [ ] Publish events
* [x] Server-Side Events distributor
* [x] Distribute events over SSE
* [ ] WebSocket distributor
* [ ] Setup subscriptions
* [ ] Dynamic subscriptions
* [x] Distribute events over WS
* [x] Break out HTTP middleware into classes
* [ ] HTTP middleware unittests