Put a room in the product and you are done shopping for a stack. Chat, presence, Yjs, and an agent on the same Durable Object. Guest widget on a public room takes minutes. Member JWT when you ship. MIT on your Cloudflare account when procurement asks who owns the data. Spec lives at docs.fluxychat.com. Ably and Pusher are transport. Liveblocks is the document. Stream is consumer chat. Voice media is LiveKit. IoT is HTTP ingest. Pusher alternative guide
If the product is tenant rooms on Cloudflare, usually yes: history in D1, reconnect, a console. If you only need pub/sub, keep Pusher or Ably. SMS or WhatsApp to phones still needs a telco. Hosted is beta. Self-host is MIT on your Cloudflare account.
When the Pusher bill catches up
Same story in every thread: the free tier is fine for a demo, then connection and message pricing climbs faster than the app. FluxyChat is not a flat-fee miracle, you still pay Cloudflare, but you can self-host on your account, read the MIT source, and drop a second vendor's connection counter.
Self-host on your Cloudflare account
Can we run it ourselves? Yes. That is the product, not a footnote. Deploy the Worker on your Cloudflare account, keep D1, keep the MIT source, keep the same SDK you used on hosted.
In-app realtime platform, not a support desk
Most live-chat listicles are written for support teams: inbox, macros, CSAT. FluxyChat is for realtime inside your product: tenant rooms, an SDK embed, and agent events on the same timeline. Wire Salesforce or HubSpot through your own integration layer. We handle the room kernel.
Walkthrough on Dev.to
Architecture, RoomDurableObject, SDK reconnect, and self-host steps How to Build a Realtime Chat App on Cloudflare Workers (Without Managing a Socket Fleet).
One platform, not a patchwork of SKUs
Pusher and Ably excel at pub/sub channels. Stream bundles chat and feeds with separate video products. FluxyChat keeps chat, presence, Yjs, and agents on one Durable Object. Platform modules (IoT, game) reuse that Worker when you turn them on. You still pay Cloudflare, not a second chat SKU.
Chat layer, not full BaaS
If you need auth, RBAC, uploads, and AI in one mega-starter, a full Cloudflare framework may fit. If the product is tenant-scoped in-app messaging with history and operator tools, FluxyChat is the slice. What we are not
Socket.IO on a VM is you on call. Pusher and Ably sell connections. FluxyChat sells the room: chat, presence, Yjs, agents, HTTP ingest, console, MIT source. Same SDK hosted or on your Cloudflare account.
Side-by-side with proprietary hosted chat SDKs, Stream, Ably, and Pusher. Rows are factual. Check each vendor's current docs before you buy. List prices vs Sendbird Chat: /compare/sendbird. CometChat Chat + agent credits: /compare/cometchat.
This table is the room. Spatial, IoT, and Stream have their own pages.
| Capability | Hosted chat SDK | Stream | Ably | Pusher | FluxyChat |
|---|---|---|---|---|---|
| Unit of value | Channel log + extensions (cloud) | Hosted chat (channels, moderation, Video SKU separate) | Pub/sub network | Pub/sub channels | The room: chat, presence, Yjs, invokeAgent on one Durable Object |
| pk_ in the browser (public rooms) | Yes (pk_, anonymous) | Usually user tokens | Token auth typical | Public channels | Yes: publishableKey + POST /tokens/anonymous. fc_ stays on the server |
| MIT server you can fork | Client MIT only. Sockets are their cloud | No | No | No | Yes. Worker + D1 in your Cloudflare account |
| Chat history + pagination | Channel history | Yes | Chat add-on / extra SKU | Cache-ish events | D1 + useChat loadMore |
| Cursors on the same room | Ephemeral send (guide) | No | Spaces (partial) | No | sendCursor on the room object. Optional. See /labs. |
| Yjs / shared document | Not the product | No | Spaces Yjs coming soon | No | FluxyYjsProvider on the same room object |
| Agent on the room timeline | Your bot or an extension | GenAI add-on | AI Transport (network) | No | invokeAgent writes chat messages |
| Polls / anonymous ballots | You build on ephemeral + extension | Varies | DIY | DIY | createPoll / votePoll + POST /polls isAnonymous |
| HTTP device ingest | HTTP publish, no IoT schema | No | MQTT / IoT messaging | No | POST → iot.reading / fleet.gps_update. iotAutoAgentId can invoke without @mention |
| Config without forking the server | portal.config.ts + portal deploy | Dashboard rules | Capabilities | Channel rules | fluxy.config.ts + pnpm fluxy:deploy (rooms, deny, extension slots). Callbacks on self-host |
| Inbox realtime socket | wss://realtime.useportal.co/inbox | Notification feeds | Push / channels | User channels / Beams | GET /ws/inbox (connectInbox). Same User DO as /ws/user/:id; inbox_updated only |
| Nested chat threads | threadParentId lens, registry + opaque cursor, inbox siblings | Channel threads | DIY | DIY | parentId lens (useThread), GET /rooms/:id/threads + nextCursor, inbox kind thread |
| Room / channel extension snapshots | channel.ext + ctx.storage, max 5 | Custom | Channel state | No | GET/PUT /rooms/:id/extensions (kv|counter, max 5, 16 KiB). Hosted: declared kinds, no eval |
| Time to first public message | new Portal({ apiKey: pk_ }) | Dashboard + user tokens | SDK + keys | SDK + keys | FluxyRealtimeProvider + publishableKey + useChat({ roomId }) |
| Voice / live video media | Reserved in v1. Bring an SFU | Separate Video SKU | No SFU | No | joinVoiceStage signaling. Media is LiveKit. Not an SFU |
| Hosted maturity | Price unpublished. Cloud lock-in | SLA on paid tiers | Enterprise SLA / HIPAA BAA | Enterprise-select SLA | Open beta. Pin npm. Written SLA only with a signed MSA |
| Resumable stream / durable session | Reconnect + history | Connection recovery | Durable streams with resume (Ably, 2025–2026 docs) | Reconnect + cache-ish | Room WebSocket + REST history merge. Not Ably durable streaming SKU |
| Multi-device sync | Yes (their cloud) | Yes | Yes | Channels per device | Same room socket + D1 history. Inbox on User DO |
| Tool approvals | DIY / their AI add-on | GenAI add-on | Not the product | No | Mail previews do nothing. You press a button. You can require two people. |
Gzip sizes from CI (pnpm run check:bundle-size). App bundles tree-shake imports, so chat-only paths stay small. See the feature parity checklist.
| Package | Gzip | Budget | Note |
|---|---|---|---|
| @fluxy-chat/react | 0.3 kB | 20 kB | Chat-only React hooks entry |
| @fluxy-chat/sdk/react | 0.4 kB | 20 kB | Transitional react subpath |
| @fluxy-chat/sdk | 18.3 kB | 160 kB | Full client (import only what you need) |
| Typical hosted chat SDK (reference) | 14 kB | — | Industry reference for chat-only tree-shaken apps |
Each product and vertical on the docs site shows a production, beta, or preview badge. Check the platform overview before you plan a launch around stream, voice, collab, or mobile SDKs.
Ably Next.js starters own search for realtime chat on Vercel. FluxyChat is the room layer on Cloudflare Workers plus Durable Objects. Keep Ably if you only need generic pub/sub. Tenant rooms, history, and the operator console stay in FluxyChat. Next.js on Vercel guide
Vercel documents Pusher as a common path for live features. FluxyChat keeps the socket layer on Cloudflare so you avoid a second vendor SKU and room limits on serverless functions. Full Vercel guide
GitHub examples are excellent teachers; production SaaS usually needs the rows below. Reconnect and hibernation guide
| Concern | DIY DO repo | FluxyChat |
|---|---|---|
| One Room DO per channel + WS fan-out | You implement accept(), broadcast, and cleanup | RoomDurableObject in MIT repo, same pattern, maintained |
| Multi-thread / multi-tenant chat | Custom schema + auth glue | Project-scoped JWT, room membership in D1 |
| Chat history + pagination | D1/DB layer you design | D1 persistence + SDK loadMore() |
| Reconnect after DO hibernation | Client logic you own | connectionState, retry, SSE/polling fallback |
| Human + agent on same timeline | Separate pipelines | tool_call / tool_result on room WebSocket |
| Operator console + quotas | Not in demo repos | Dashboard + Worker enforcement |
PartyKit vs FluxyChat (SaaS chat)
PartyKit wins collab parties and generic edge realtime. FluxyChat wins when you ship tenant-scoped in-app messaging with history, JWT, and operator tooling. See the PartyKit row in the table below.
Both options ship the same Worker. The Free tier is generous for early apps; the Paid tier scales with usage; self-hosting is just your own Cloudflare bill.
FluxyChat runs entirely on your Cloudflare account. You pay Cloudflare directly no per-seat or per-message markup from us on the self-host path.
| Plan | Monthly messages | D1 reads / day | Cost (USD) | Best for |
|---|---|---|---|---|
| Workers Free | ~3M / mo (100k req/day × 30) | 5M / day | $0 | Hobby · early beta · <1k MAU |
| Workers Paid ($5/mo) | ~300M+ / mo | 25M+ / day | $5 + usage | Growing SaaS · 1k–100k MAU |
| Self-host on your CF account | Unlimited* | Your plan limits | Your plan cost | Enterprise · cost-sensitive · compliance |
* Request and D1 rows are not Durable Object duration. Cloudflare's official chat sample billed almost entirely on duration. FluxyChat has not published idle-socket duration from an invoice. Treat this table as a request-side estimate. See Cloudflare's current pricing for live numbers. Run pnpm run check:pricing to verify your env assumptions match the published rates.
Common mental models from Reddit and CF threads: when to use something else vs FluxyChat.
| Approach | Best for | Tradeoff | FluxyChat angle |
|---|---|---|---|
| Cloudflare Agents SDK (npm i agents) | A single-agent Durable Object: SQL memory, hibernation, MCP SDK v2, Think/chat loops on Workers. | An agent OS, not a multi-tenant room product. You still build JWT tenancy, billing, presence, history, and an operator console. | FluxyChat is the room kernel: humans and agents share one timeline, Bridges in the console, and MIT self-host. Keep Agents SDK for an Agent class Worker; pick FluxyChat when the product is a room. |
| Hosted chat SDK (proprietary) | Teams optimizing for React DX, SSR-safe hooks, inbox feed, streaming agents, hosted dashboard. | Proprietary hosted service, no MIT self-host on your Cloudflare account; broader platform modules (stream, IoT, fleet) are on you. | FluxyChat matches inbox/useInbox, connection UX, and AI timeline, plus MIT self-host and Workers/DO-native rooms. Bridges are console rows you wire (you create the vendor app). |
| PartyKit (+ DO demos on X) | Collab sessions, games, generic realtime “party” state, often mentioned beside Durable Objects in builder posts. | Not tenant-scoped SaaS chat: no first-class multi-tenant JWT, D1 history ops, billing hooks, or operator console for your product. | Pick FluxyChat when buyers need in-app messaging for customers, not a party runtime you extend into a full chat product. |
| Liveblocks | Collaborative documents, comments, and presence on a document. | Not a chat room with agents, HITL, or MIT Worker+D1 tenancy. | Yjs on the same room object as chat. Liveblocks remains a strong pick when the product is the document, not the room. |
| Workers + Upstash Redis (DIY) | Teams that want to assemble WS + Redis persistence themselves. | You own ordering, reconnect, multi-tenant auth, and ops glue. | FluxyChat is the chat layer pre-wired: room DO + D1 + SDK + console. |
| Firebase / Supabase realtime | Greenfield apps already on that BaaS for auth + DB + everything. | Heavier than a chat-only slice if you only need rooms + history. | Edge split: static/SSR front + FluxyChat on CF for chat only. |
| Full Cloudflare app frameworks | Auth, RBAC, queues, uploads, AI helpers in one starter kit. | Realtime chat is one module among many, scope blur. | FluxyChat replaces the chat/realtime slice, not your whole framework. |
| Vercel WebSockets / PushFlo-style workarounds | Teams that want managed realtime without leaving Vercel’s billing envelope. | Still a separate realtime product; WebSocket limits and pricing context on the host remain. | Keep Vercel for the app shell; run chat on CF with room-per-DO isolation and one less socket vendor. |
| DIY WebSockets on Vercel Functions (Rivet-style) | Builders assembling their own WS layer on serverless functions. | You own connection lifecycle, scaling, auth, and ops, easy to underestimate. | FluxyChat removes the DIY socket fleet for SaaS in-app chat; you integrate the SDK. |
| Ably for Next.js / Vercel live apps | General realtime (live dashboards, pub/sub) with strong tutorials for Next.js. | Broader than chat: history UI, templates, and tenant operator tooling are on you. | FluxyChat is the chat layer (rooms, D1 history, console) on Workers + DO, not generic channels. |
| Chatsemble (GPL workspace app) | Self-hosted team chat + in-room agents + workflows/MCP in one React app (one DO per org, SQLite inside the DO). | GPL-3.0; not a headless API, you adopt their product shape or fork the monolith. | FluxyChat is MIT chat infrastructure: room-per-DO, D1, SDK, operator console, embed in your SaaS without their UI. |
| Vask (Pusher-compatible on Cloudflare) | Teams wanting Pusher-shaped APIs on CF with “no fan-out fees” positioning. | Compare their Pusher-compat surface vs your need for D1 history, agent timeline, MIT self-host console. | FluxyChat is room-native chat infra (DO + D1 + SDK), not only channel-compat; evaluate lock-in, webhooks, and operator tooling. |
| Self-hosted helpdesk (Libredesk-style) | Full support desk, ticketing, and customer-facing helpdesk UI. | Not a drop-in chat API for your SaaS product’s in-app threads. | FluxyChat is infrastructure for your app’s messaging, pair with your own support UI if needed. |
| Node-RED WebSocket nodes | Teams that already orchestrate telco/CRM/call-center logic in flows they operate. | You own socket reliability, scaling, and upgrades on your Node-RED runtime, not edge room isolation. | FluxyChat when you want room fan-out + history on Cloudflare without maintaining WS infra; Node-RED when flows are the product and alerts are mostly pub/sub. |
| Stoa Edge (CF-native live state) | Self-hosted edge meshes and live state subscriptions on Workers. | Not a chat-specific layer (rooms, templates, agent timeline, operator console). | FluxyChat for in-app chat and agent events; Stoa-like stacks for broader edge state patterns. |
Cost guardrails, operator console, and DO capacity: /why: cost & architecture
Patterns from real hackathon builds: external agents join rooms, negotiate across orgs, and react to live signals. Not a chat widget SKU.
Room as MCP server
Cross-org agent negotiation
Critical action quorum
External event ingest
Audience score rollup
Asymmetric session profiles
Live knowledge graph
Step 1
Need SMS/WhatsApp to phones?
Use a telco API (e.g. Sent) alongside FluxyChat for in-app threads.
Keep going.
Step 2
Need collab/game party realtime (PartyKit-style), not product chat?
Consider PartyKit or generic edge realtime tooling.
Keep going.
Step 3
Frontend on Vercel/Netlify, need realtime without a socket VPS?
FluxyChat on Cloudflare + your existing frontend host.
Keep going.
Step 4
Need only pub/sub fan-out (no message history UI)?
Consider Ably/Pusher-style channels.
FluxyChat: rooms, history, presence, agents, collab, game, IoT.
Step 5
Must run on your Cloudflare account?
MIT self-host FluxyChat.
Try hosted beta or self-host, same API shape.