FluxyChat

Core SDK

Core SDK

FluxyChatClient, React hooks, and room session helpers.

One room WebSocket. Install:

npm install @fluxy-chat/sdk @fluxy-chat/react @fluxy-chat/ui zustand

React 18+, zustand 5+. Yjs editors also need yjs and @fluxy-chat/sdk/yjs.

Read Concepts before mixing primitives.

Provider (required for hooks)

import { FluxyRealtimeProvider, useChat } from "@fluxy-chat/react";

<FluxyRealtimeProvider
  workerUrl={workerUrl}
  authTokenProvider={memberJwt}
  userId={userId}
>
  <Room />
</FluxyRealtimeProvider>

FluxyYjsProvider takes token, not authTokenProvider. Do not pass token= to FluxyRealtimeProvider.

Topics

GuidePrimitive
useChatChat timeline, agents, most room APIs
Presence & typingNow (cursors, selections)
BroadcastPulse (sendClientEvent)
StorageYjs document, Tiptap, whiteboard
CommentsContextual pins
Chat reply threadsparentId lens
FeedsActivity logs
CopilotsSide-panel AI
AI collaborationWorkflows → feeds
AgentsinvokeAgent
InboxMentions, unread, thread/comment
NotificationsPush + email digest
Connection stateWS / SSE / poll
VoiceClips + stage signaling

Minimal client (no React)

import { FluxyChatClient } from "@fluxy-chat/sdk";

const client = new FluxyChatClient({
  baseUrl: "https://your-worker.workers.dev",
  userId: "alice",
  token: memberJwt,
});
await client.sendMessage("general", "Hello!");

On this page