Documentation
Guides and reference
Auth, SDK, and deployment notes for Fluxychat. For source and self-host details, use the GitHub monorepo.
Hosted quickstart
Account, SDK install, and first room message on Fluxychat Cloud.
Start quickstartAuth and JWT
Keep API keys on the server. Mint member JWTs with POST /auth/token — never expose admin tokens in the browser.
Auth sectionSDK in your app
FluxyChatClient, useChat, rooms, and WebSocket delivery against hosted or self-hosted Workers.
SDK sectionSelf-host on Cloudflare
Deploy apps/worker and D1 when you need an isolated tenant or your own compliance boundary.
Self-host stepsWebhooks and agents
Room events, AI invokes, and Stripe billing hooks on the Worker.
Webhooks sectionOperator console
Projects, rooms, analytics, and billing after you connect an account.
Open wizardAuth & JWT
API key (fc_...): server-to-server, identifies your project. Store in env on your backend only.
JWT: for browsers and the SDK. Mint with POST /auth/token and header X-Fluxy-Api-Key. Claims include sub (user id), tid (project id), and roles.
With Clerk enabled, the dashboard provisions your tenant and mints operator JWTs server-side — you do not paste bootstrap keys in the browser.
SDK
pnpm add @fluxy-chat/sdk
import { FluxyChatClient, useChat } from "@fluxy-chat/sdk";
const client = new FluxyChatClient({
baseUrl: process.env.NEXT_PUBLIC_FLUXYCHAT_CLOUD_URL,
userId: "user_123",
token: memberJwtFromYourBackend,
});Webhooks & billing
Configure outbound webhooks per project in the console. Stripe checkout and usage quotas are enforced on the Worker — upgrade plans from Billing after you connect an account.