Skip to main content

Connect an existing backend

Use the DIC SDK as the wire SoT without scaffolding a new product shell.

Steps​

  1. Add @chbrdk/plexon-federation@0.2.1 (registry or pin).
  2. Send Access Model B headers on viewer-scoped calls: contract + service secret + X-Plexon-User-Id.
  3. Prefer descriptor-first capability updates (ProductCapabilityDescriptor) before product-id switches.
  4. For Lane A origin, call handleLaneAProjectOrigin only — do not copy handler bodies.
import {
buildFederationHeaders,
PATH_PLATFORM_ACCESSIBLE_COLLECTIONS,
} from '@chbrdk/plexon-federation'

const headers = buildFederationHeaders({
contractVersion: '2026-05-plexon-federation-v3',
serviceSecret: process.env.PLEXON_SERVICE_SECRET!,
userId: actorId,
})

const res = await fetch(`${base}${PATH_PLATFORM_ACCESSIBLE_COLLECTIONS}`, { headers })

Shell chrome is optional: wrap with @chbrdk/dic-app DicAppLayout when you want the shared rail.