Portal Community

What is EdgeStream?

EdgeStream is the real-time message delivery backbone of BizFirstGO. It provides a composable, hook-driven pipeline for moving typed messages between backend services and frontend applications. Built as a 10-package TypeScript monorepo, EdgeStream handles everything from raw transport connections to structured pub/sub delivery — with full observability built in.

Every real-time event in BizFirstGO passes through EdgeStream: workflow execution updates, Octopus agent responses, ANCP protocol messages, and UI interaction events. The library is framework-agnostic at its core with a dedicated React bindings package for frontend integration.

Core Package The edge-stream-js package (108KB compiled) is the complete framework-agnostic runtime. Import it in any TypeScript/JavaScript environment. React-specific features live separately in edge-stream-js-react.

Key Capabilities

Typed Message Pipeline

Every message flows through an ordered series of hooks — normalization, transformation, delivery — with full TypeScript generics throughout.

Multi-Transport

SignalR (recommended), raw WebSocket, SSE, and HTTP polling — each transport implements the same ITransport interface.

Topic-Based Pub/Sub

Subscribe to exact topics or wildcard patterns (workflow.*). Subscribers receive typed IEnvelope containers.

Composable Hooks

Add cross-cutting behavior — logging, validation, transformation, auth — as discrete hook classes with priority ordering.

Built-in Observability

HooksMonitor and SubscribersMonitor React components visualize live pipeline activity in real time.

React Bindings

useSubscription, useEdgeStream, and EdgeStreamProvider make real-time subscriptions clean in React components.

Message Flow at a Glance

Every incoming message follows the same linear path from transport receipt to subscriber delivery:

1

Transport Receipt

Raw bytes arrive over SignalR, WebSocket, SSE, or HTTP polling. The transport emits a raw message event.

2

Normalization

NormalizationHook converts raw data into a standardized IEnvelope with CloudEvents protocol metadata. Business data is never modified.

3

Incoming Pipeline

Registered hooks execute in priority order — validation, decryption, logging, enrichment. Any hook can abort the pipeline.

4

Subscriber Delivery

SubscriptionManager matches the envelope topic against registered patterns and invokes all matching subscriber callbacks.

5

Observability

Every step emits events to IPipelineObserver — feeding HooksMonitor and SubscribersMonitor in real time.

The Ten Packages

PackagePurposeKey Exports
edge-stream-jsCore runtime — pipeline, hooks, subscriptions, transportsEdgeStream, createEdgeStream, all types
edge-stream-js-reactReact hooks and context providerEdgeStreamProvider, useSubscription, useEdgeStream
observability-coreObserver contracts — IPipelineObserverIPipelineObserver, event types
observability-hooks-jsHook that feeds observability dataHookActivityLogger
observability-reactReact monitoring componentsHooksMonitor, SubscribersMonitor, ActivityStreamMonitor
observability-react-nativeReact Native monitoring componentsMobile equivalents of react components
observability-uiShared UI primitives for observabilityCharts, lists, activity feeds
app-pages-reactPre-built React pages for EdgeStream appsDashboard, settings pages
app-themesTheming tokens for EdgeStream appsColor tokens, design system
app-ui-components-reactReusable React UI componentsButtons, panels, status indicators

Where EdgeStream is Used in BizFirstGO

Ready to Continue Proceed to Architecture for a detailed look at the pipeline stages and how all components connect.