mercureact/README.md

58 lines
1.4 KiB
Markdown
Raw Normal View History

2024-03-10 02:06:19 +00:00
# Mercureact
This is an implementation of the Mercure realtime protocol on steroids, built using ReactPHP.
2024-03-10 15:23:46 +00:00
**Mercureact is under development, and not ready for use in anything important.**
2024-03-10 02:06:19 +00:00
It is intended to be used standalone, but it may also be integrated into another PHP application.
2024-03-10 15:23:46 +00:00
## Installing
2024-03-10 02:06:19 +00:00
2024-03-10 15:23:46 +00:00
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
2024-03-11 01:15:04 +00:00
$ cp mercureact.conf.dist mercureact.conf
2024-03-10 15:23:46 +00:00
$ editor mercureact.conf
# Use the config file when launching
$ ./mercureact.phar -c mercureact.conf
```
## Using as dependency
*TODO.*
## ToDos
2024-03-10 02:06:19 +00:00
* [x] Read config from file
2024-03-10 15:23:46 +00:00
* [ ] Security Security Security
* [x] Check JWTs on connect
2024-03-10 23:51:47 +00:00
* [x] Check claims on subscribe and publish
* [x] Extract JWT claims to request attributes, instead of JWTToken
* [x] Subscription/Topic manager
* [x] Unify distribution
* [x] Enumerate subscriptions and topics
2024-03-11 00:40:05 +00:00
* [x] Publish events
2024-03-10 23:51:47 +00:00
* [x] Server-Side Events distributor
2024-03-10 15:23:46 +00:00
* [x] Distribute events over SSE
* [ ] WebSocket distributor
* [ ] WebSocket authentication
2024-03-10 15:23:46 +00:00
* [ ] Setup subscriptions
* [ ] Dynamic subscriptions
* [x] Distribute events over WS
* [x] Break out HTTP middleware into classes
* [ ] HTTP middleware unittests
2024-03-11 01:15:04 +00:00
* [ ] Replay missed events based on event id
* [x] Figure out how to determine last event IDs
2024-03-11 13:39:58 +00:00
* [ ] Metrics endpoint