Skip to content

Braid Packages Reference ​

Braid is a modular microfrontend and runtime data resilience ecosystem published under the @braidlabs/* scope. Each package is independently versioned, rigorously tested, and designed to solve a specific boundary failure in modern composed web applications.


Package Ecosystem Overview ​


1. Composition & Gateway Primitives ​

These packages manage origin routing, streaming HTML composition, declarative shadow DOM projection, and JavaScript realm isolation.

PackageDescriptionKey APIs
@braidlabs/coreClient runtime for mounting fragments in isolated realms and declarative shadow roots.<fragment-slot>, defineFragment, createEnv
@braidlabs/gatewayOrigin-front middleware for namespace routing, HTML piercing, and streaming SSR composition.createGateway, toNodeMiddleware
@braidlabs/cliLocal development server, manifest scaffolding, and multi-origin proxying.braid dev, braid init
@braidlabs/registryImmutable manifest snapshots, content-addressed versioning, and validation.createRegistry, validateManifest
@braidlabs/swService Worker partition handler for skew-safe chunk delivery across rolling deploys.createBraidFetchHandler, braidServiceWorker
@braidlabs/consoleVisual registry inspector and gateway status dashboard.<BraidConsole>, mountConsole
@braidlabs/fdc3FDC3 2.2 Desktop Agent: a window.fdc3 for every fragment, resolved against the registry's App Directory.createBraidDesktopAgent

2. Framework Bindings ​

Typed components and navigation connectors for popular UI frameworks.

PackageDescriptionKey APIs
@braidlabs/reactReact component for mounting Braid fragments, host-navigation wiring, and React contract fragments.<BraidFragment>, useBraidHostNavigation, defineReactFragment
@braidlabs/angularAngular component and providers for embedding Braid fragments into Angular applications.<braid-fragment>, provideBraid()

3. Data, Contracts & Version Skew ​

Framework-agnostic primitives for handling independent deployment lifecycles, schema evolution, and persistent client storage.

PackageDescriptionKey APIs
@braidlabs/skewPrimitives for versioned envelopes, bidirectional migration chains, and identity stamping.defineSchema, Envelope, stamp
@braidlabs/dataPersistence-first local data layer with projection on read and durable mutation outbox.createRecordStore, withLock, indexedDbRecordDriver
@braidlabs/contractData-driven schema migrations resolved dynamically from declarative API contracts.resolveContract, migratePayload
@braidlabs/buildBuild-time identity stamping and manifest generation for stale-origin detection.skew-stamp, emitManifest
@braidlabs/studioInteractive debugger for inspecting versioned payloads and testing migration chains.<SkewStudio>, diffPayloads

4. Angular Skew Suite ​

Specialized Angular integrations built directly on @braidlabs/skew and @braidlabs/data.

PackageDescriptionKey APIs
@braidlabs/angular-coreSignal-based versioned state and DI bindings for @braidlabs/skew.provideSkew(), versionedStore()
@braidlabs/angular-dataNormalized entity cache, tag invalidation, and durable mutation outbox.EntityStore, OutboxService, provideData()
@braidlabs/angular-routerStale lazy chunk recovery interceptor with loop prevention and manifest probing.provideSkewRecovery(), SkewRecoveryService
@braidlabs/angular-workflowDurable multi-step form workflows with versioned draft persistence across reloads.WorkflowRuntime, WorkflowDraft