Background
There is no way to push real-time events from server to browser. Modules cannot do live notifications, live dashboards, presence, or collaborative UI. Laravel Broadcasting + Echo solves this with private/presence channels and event-driven push (Pusher / Reverb / Soketi).
Motivation
Design sketch
Server: SignalR hub BroadcastHub mounted at /hub/broadcast.
publicinterfaceIBroadcaster{TaskToChannelAsync(stringchannel,string@event,objectpayload,CancellationTokenct);TaskToUserAsync(stringuserId,string@event,objectpayload,CancellationTokenct);TaskToTenantAsync(stringtenantId,string@event,objectpayload,CancellationTokenct);}[BroadcastEvent("orders.created")]publicsealedrecordOrderCreatedEvent(GuidOrderId,GuidTenantId):IBroadcastEvent{publicstringChannel(IBroadcastContextctx)=>$"tenants.{TenantId}.orders";}- Bridge from
IEventBus: any event marked [BroadcastEvent] is automatically forwarded to subscribers - Channel authorization:
IBroadcastChannelAuthorizer per channel (hub callback validates ClaimsPrincipal before allowing subscription) - Presence channels: server tracks members, broadcasts join/leave
- Private channels: same as public, but require explicit auth
Client (packages/echo):
import{useChannel}from'@simplemodule/echo';useChannel('tenants.123.orders').on('orders.created',(e)=>{ ... });- Built on
@microsoft/signalr; auto-reconnect; backoff; auth via current Inertia session cookie
Acceptance criteria
References
Background
There is no way to push real-time events from server to browser. Modules cannot do live notifications, live dashboards, presence, or collaborative UI. Laravel Broadcasting + Echo solves this with private/presence channels and event-driven push (Pusher / Reverb / Soketi).
Motivation
Design sketch
Server: SignalR hub
BroadcastHubmounted at/hub/broadcast.IEventBus: any event marked[BroadcastEvent]is automatically forwarded to subscribersIBroadcastChannelAuthorizerper channel (hub callback validatesClaimsPrincipalbefore allowing subscription)Client (
packages/echo):@microsoft/signalr; auto-reconnect; backoff; auth via current Inertia session cookieAcceptance criteria
IBroadcaster+BroadcastHubin framework[BroadcastEvent]discovered by source generator; bridge fromIEventBus@simplemodule/echopackage withuseChannel/useEventhooksReferences