@firtoz/collection-sync
v7.0.2
Published
WebSocket sync protocol and bridges for TanStack DB collections
Maintainers
Readme
@firtoz/collection-sync
Real-time sync for TanStack DB collections over WebSockets—shared Zod message schemas, client/server bridges, optional partial sync and viewport-aware caching for large datasets.
Installation
npm install @firtoz/collection-sync @tanstack/db @standard-schema/spec @firtoz/websocket-do react @tanstack/react-dbAlso: pnpm add · bun add · yarn add
Peers include @firtoz/websocket-do, @tanstack/db, @tanstack/react-db, react, and @standard-schema/spec. Wire your Durable Object or server to the protocol types exported from the package root.
React entry
Import hooks and adapters from the dedicated subpath:
import { /* … */ } from "@firtoz/collection-sync/react";Core exports
The package root exposes protocol types (SyncClientMessage, SyncServerMessage, …), bridges (SyncClientBridge, SyncServerBridge, PartialSyncClientBridge, …), withSync for wrapping collections, and related utilities. See src/index.ts for the full public API.
Related
@firtoz/idb-collections— IndexedDB-backed collections@firtoz/db-helpers— shared TanStack DB helpers
Links
License
MIT © Firtina Ozbalikchi
