EdgeStream is a pure TypeScript library with zero external runtime dependencies. Install the core package, create an EdgeStream instance, connect to your SignalR hub, and start publishing and subscribing in under ten minutes.
The main edge-stream-js package is the foundation. Add observability and React packages as needed.
For React Native applications, install the mobile-specific adapter. The same API surface as the web package — only the transport layer differs.
EdgeStream is the main facade. Pass it a HubServer configured with your SignalR endpoint. Start the connection — EdgeStream manages reconnection automatically.
WebSocketServer alongside a HubServer and EdgeStream manages both connections independently.
EdgeStream emits lifecycle events for connection state changes, reconnections, and errors. Subscribe to stay in sync with the connection.
Hooks intercept every message in the pipeline. Register them before starting the connection. Lower priority numbers run first — the system executes hooks in order.
Topics are dot-separated strings. Use * as a wildcard segment. The callback receives the full IEnvelope including message body, metadata, and routing context.
Publish sends a message through the outgoing pipeline (hooks fire in order) before transmitting to the server. The server processes and distributes to matching subscribers.
The React package provides a context provider and hooks. Wrap once at the app root and use hooks anywhere in the component tree — no prop drilling.
Explore the architecture or join the EdgeStream community.