Core SDK
Core SDK
FluxyChatClient, React hooks, and room session helpers.
FluxyChat ships two npm packages for app developers:
@fluxy-chat/sdk
FluxyChatClient, REST helpers, platform clients, createFluxyRoomSession.
@fluxy-chat/react
FluxyRealtimeProvider, useChat, useInbox, useNotifications.
@fluxy-chat/protocol
Shared WebSocket event types.
Minimal client
import { FluxyChatClient } from "@fluxy-chat/sdk";
const client = new FluxyChatClient({
baseUrl: "https://your-worker.workers.dev",
userId: "alice",
token: memberJwt,
});
await client.connect();
await client.joinRoom("general");
await client.sendMessage("general", "Hello!");Topics
| Guide | What it covers |
|---|---|
| useChat | React hook — messages, send, pagination, agents |
| Connection state | WebSocket, SSE, polling fallback |
| Agents | invokeAgent, handoff, mention triggers |
| Inbox | Cross-room unread and snooze |
| User channel | Per-user WebSocket for inbox and notifications |
| Notifications | User channel events |
| Web push | useWebPush browser hook |
| Presence & typing | Room presence and typing indicators |
| Search | Full-text message search |
| Read receipts | Unread counts and mark-read |
| Message middleware | Hooks before send/receive |
| Voice messages | Upload voice clips with transcription |
Install:
npm install @fluxy-chat/sdk @fluxy-chat/react zustandPeer deps: React 18+ for hooks, zustand 5+ for room store helpers.