Skip to content

docs: realtime extender integration guide - #516

Merged
imorland merged 1 commit into
mainfrom
im/realtime-extender-docs
Mar 21, 2026
Merged

docs: realtime extender integration guide#516
imorland merged 1 commit into
mainfrom
im/realtime-extender-docs

Conversation

@imorland

Copy link
Copy Markdown
Member

Summary

  • Adds docs/extend/realtime.md — a developer guide for integrating extensions with flarum/realtime
  • Covers the PHP Realtime extender (broadcastModelEvent, broadcastDialogEvent, broadcastFlagEvent, registerModelEndpoint)
  • Covers the JS Realtime extender (onDiscussionStreamEvent, onUserChannelEvent, onPublicChannelEvent, onBothChannelsEvent)
  • Documents direct channel access via RealtimeState
  • Includes a complete real-world example (likes integration)
  • Documents the two-layer security model
  • Added to the Advanced Guides section of the sidebar

Companion to: flarum/framework#4473

Test plan

  • npx docusaurus build passes without new errors
  • Page renders correctly in browser
  • Code examples are accurate against the extender API in framework#4473

Documents the Realtime PHP and JS extender API introduced in
flarum/framework#4473. Covers:

- broadcastModelEvent / broadcastDialogEvent / broadcastFlagEvent
- registerModelEndpoint for custom model types
- JS RealtimeExtend extender (onDiscussionStreamEvent, onUserChannelEvent,
  onPublicChannelEvent, onBothChannelsEvent)
- Direct channel access via RealtimeState
- Complete likes integration as a real-world example
- Security model (permission-gated payload generation + channel auth)
@imorland
imorland marked this pull request as ready for review March 21, 2026 00:00
@imorland
imorland merged commit d34ddf2 into main Mar 21, 2026
1 check passed
@imorland
imorland deleted the im/realtime-extender-docs branch March 21, 2026 00:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant