FluxyChat Docs
Room layer on Cloudflare. Chat, presence, Yjs, and agents on one Durable Object.
FluxyChat is the room you put in the product. One Durable Object plus D1. People and agents share that room. Map roomId to a document, board, deal, classroom, or dispatch view. Auth stays yours.
Chat and presence use a JSON WebSocket. Yjs uses a second binary connection to the same object. That is the design, not a shortcut.
Start with publishableKey on FluxyRealtimeProvider, or npx @fluxy-chat/create-fluxy-chat@latest. Then Concepts or What to build.
Get started
Hosted, self-host, or SDK-only.
Quickstart
pk_ in the browser, then member JWT.
Wire protocol
Frames, two sockets, v1 limits.
Concepts
Projects, rooms, which primitive to pick.
What to build
Idea to gallery example.
Gallery
Vite apps you can run. Open two tabs.
Collaboration features
Presence and cursors
Who is here, pointers, selections. Aggregate above 250 users.
Broadcast
Sparse pulses. Not 60 Hz pointers.
Storage / Tiptap / whiteboard
Yjs document on the room.
Comments
Pinned threads, not chat replies.
Chat reply threads
useThread on parentId. Same socket.
Notifications and digest
Inbox kinds and daily email.
Chat + room agents
useChat and invokeAgent.
Polls
createPoll, votePoll, anonymous ballots.
Feeds
n8n and agent logs, not the chat log.
Copilots
Side panel AI. Does not write the timeline.
AI collaboration
Workflows write feeds and presence.
Visibility
Who may see a chat line.
Packages
@fluxy-chat/sdk
Client, REST, Yjs, verticals.
@fluxy-chat/react
Provider, useChat, useThreads, useFeeds.
@fluxy-chat/ui-kit
FluxyChatWidget and inbox. Guest plus pk_.
@fluxy-chat/ui
Cursors, Thread, AiChat, AvatarStack.
@fluxy-chat/config
onPublish allow/block/mask in fluxy.config.
REST API
Worker HTTP. OpenAPI YAML.
What you need
| Piece | Who sets it |
|---|---|
| Worker URL | Hosted API or your workers.dev |
| Public room | FluxyRealtimeProvider + publishableKey (POST /tokens/anonymous). Widget guest still works. |
Project API key (fc_…) | Server only. Mints member JWTs. |
| Member JWT | Private rooms, roles, production. |
| LLM keys | Worker secrets. Never the browser. |
Try fluxychat.com. Self-host: pnpm install && pnpm run self-host && pnpm --filter @fluxy-chat/worker dev.