Integrations
First-party companion packages that bridge a stitch to the framework, frontend, logger, and store you already run — each a thin layer over a stable seam, never a re-implementation.
A stitch is plain TypeScript with no framework and no node:*, so it already runs
anywhere. The packages here are the companions: thin bridges that wire a stitch
into the tool you already run — a backend framework, a frontend's reactivity, your
logger, your store — so its lifecycle, principal, streaming, and telemetry line up
with the host instead of being bolted on.
Each one is small on purpose. They plug into a handful of stable seams, so a new integration is ~100 lines over an existing contract, not a rewrite — and every companion is proven against the same conformance kits the core ships:
- Backend seam — lifecycle, request-scoped principal (
seam.as(user)), an SSE→response bridge, and an error→HTTP mapping, identical across frameworks. - Reactive store —
@stitchapi/query-coreowns a framework-agnosticsubscribe/getSnapshotstore; each frontend binding is a few lines against its own primitive. TraceSink— forward the typed event stream to the logger or telemetry pipeline you already run.StitchStore— move throttle counters, sessions, and cache into a shared backend so they go fleet-wide with no call-site change.
Server frameworks
Attach a seam to your server: one shared client with a request-scoped principal,
an SSE helper, and an error bridge.
Elysia
A plugin with a principal-bound seam on the context, a streamStitchSse → Response bridge, and StitchError mapped to HTTP via onError.
Express
Express 4/5 middleware: a principal-bound seam on req.stitch, an SSE bridge (streamStitchSse), and StitchError mapped to JSON by a 4-arg error handler.
Fastify
A plugin with a request-scoped principal, SSE reply bridge, and an error handler — wired to Fastify's lifecycle and logger.
Hono
Edge/multi-runtime middleware with a per-request seam and an SSE bridge — Workers, Deno, Bun, Node.
NestJS
A module + injectable seam, request-scoped principal, and an exception filter that maps StitchError to HTTP.
Next.js
Web-standard route-handler helpers — streamStitchSse (text/event-stream) and stitchErrorResponse (StitchError → Response).
Client & UI bindings
Each binding is a thin layer over the shared @stitchapi/query-core store, so
updates are tearing-free and streaming-first — the view re-renders as each
delta chunk arrives, which plain request/response query libraries don't model.
One core, one binding per framework's own reactive primitive — including the
mobile bindings, made to stream on device where the platform's fetch, storage,
and lifecycle differ from the web.
Angular
injectStitch / injectStitchStream exposed as both signals and an RxJS observable.
Expo
Streaming over expo/fetch with no polyfills, plus an encrypted expo-secure-store vault — over the same hooks as React Native.
React
Tearing-free useStitch / useStitchStream hooks built on useSyncExternalStore.
React Native
A streaming XHR adapter (bare RN's fetch can't stream), an AsyncStorage store for persistent sessions, and AppState/NetInfo refetch helpers.
Solid
createStitch / createStitchStream primitives reconciled into a Solid store, over @stitchapi/query-core — plus an optional TanStack Query adapter.
Svelte
stitchStore / stitchStreamStore — real Svelte stores, on Svelte 4 and 5.
Vue
useStitch / useStitchStream composables backed by Vue 3 reactivity (refs).
Data-fetching libraries
Run a stitch through the cache-and-revalidation library you already use — the stitch is the fetcher; the library owns caching, dedup, and invalidation.
RTK Query
stitchQueryFn / stitchStreamUpdater slot a stitch into an RTK Query endpoint (incl. streaming).
SWR
useStitchSWR runs a stitch as an SWR fetcher — SWR owns caching and revalidation.
TanStack Query
Use a stitch as a queryFn with the framework-agnostic stitchQueryOptions(stitch, input) helper — no hard dependency.
State stores
Attach a StitchStore to move a stitch's throttle counters, sessions, and cache
into a shared backend — fleet-wide, with no call-site change.
Validation
Adapt a schema you only obtain at runtime — delivered as JSON Schema — into the same Standard Schema contract a stitch validates through.
Auth
Core ships bearer / apiKey / basic / cookieSession / oauth2 built in; companions add the schemes that need more.
AI
A stitch is agent-native through the MCP surface; a companion adapts it to a specific framework's tool-calling loop.
Observability
Pino
Forward the event stream to a Pino logger as structured, leveled records — metadata-only, safe on a secret-bearing seam.
Sentry
Map the event stream to Sentry breadcrumbs and capture error events with the call's context.
For OpenTelemetry, core exports an OTLP trace bridge directly — see the OTLP guide.