Package Exports
- @firtoz/collection-sync
- @firtoz/collection-sync/cache-manager
- @firtoz/collection-sync/connect-partial-sync
- @firtoz/collection-sync/connect-sync
- @firtoz/collection-sync/create-partial-synced-collection
- @firtoz/collection-sync/create-synced-collection
- @firtoz/collection-sync/index
- @firtoz/collection-sync/partial-sync-client-bridge
- @firtoz/collection-sync/partial-sync-interest
- @firtoz/collection-sync/partial-sync-mutation-handler
- @firtoz/collection-sync/partial-sync-predicate-match
- @firtoz/collection-sync/partial-sync-row-key
- @firtoz/collection-sync/partial-sync-server-bridge
- @firtoz/collection-sync/react
- @firtoz/collection-sync/react/constants
- @firtoz/collection-sync/react/index
- @firtoz/collection-sync/react/partial-sync-adapter
- @firtoz/collection-sync/react/partial-sync-utils
- @firtoz/collection-sync/react/range-conditions-expression
- @firtoz/collection-sync/react/types
- @firtoz/collection-sync/react/usePartialSyncCollection
- @firtoz/collection-sync/react/usePartialSyncViewport
- @firtoz/collection-sync/react/usePartialSyncWindow
- @firtoz/collection-sync/react/usePredicateFilteredRows
- @firtoz/collection-sync/sync-client-bridge
- @firtoz/collection-sync/sync-protocol
- @firtoz/collection-sync/sync-server-bridge
- @firtoz/collection-sync/with-sync
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