A TypeScript/JavaScript client library (v2.0.1) for the js-bao-wss Yjs WebSocket service, providing document management, real-time collaborative editing, authentication (OAuth, magic link, OTP, passkey), permissions, invitations, blob storage, LLM chat, workflows, analytics, and offline support with automatic reconnection and storage fallback (IndexedDB in browsers, SQLite or in-memory in Node.js). Built for multi-tenant collaboration with Yjs CRDT and integrates with lib0, yjs, js-bao, better-sqlite3, y-sqlite3, and React. Released under MIT license.
npm install js-bao-wss-clientNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initialize the client with OAuth, create a document, and open it for real-time collaboration using Yjs.
Use await initializeClient(...) and handle the promise.
Use import statements instead of require().
Install better-sqlite3 as a dependency and ensure it is available at runtime, or explicitly set storageConfig to 'memory' if volatility is acceptable.
Use a persistent storage config (better-sqlite3 or IndexedDB) to retain auth state across restarts.
Pass { includeRoot: true } to list documents method to include root documents.Install better-sqlite3: npm install better-sqlite3, or force in-memory storage: storageConfig: { type: 'memory' }Change import to: import { initializeClient } from 'js-bao-wss-client'Ensure await is used: const client = await initializeClient({...});Install lib0: npm install lib0