Chatpack demo backend
A real, running Chatpack server you can point chat UI at — no signup, no install, no local setup. Built for people designing chat components in Lovable, v0, Shipper, or Bolt.
Paste this into your app
Pick any sandbox name (your project name works) and any demo user — alice, bob, and carol already have conversations waiting.
import { createChatClient } from "@chatpack/client/react";
import { typingClient, presenceClient, receiptsClient } from "@chatpack/client/plugins";
export const chatClient = createChatClient({
baseURL: "https://demo-api.chatpack.dev",
basePath: "/api/chat/u/my-sandbox/alice", // <-- sandbox + who you are
plugins: [typingClient(), presenceClient(), receiptsClient()],
});
export const currentUserId = "alice";Why the identity is in the URL
AI-builder previews run inside a cross-site iframe, where browsers block third-party cookies. A cookie-based demo login silently fails there. Putting the demo user in the path means no cookies, no CORS credentials, and a working EventSource for live updates.
This is a demo-only shortcut: anyone with the URL can act as that user. Real apps resolve a session in Chatpack’s auth hook instead.
What’s already in a fresh sandbox
- alice ↔ bob — a short conversation, including one edited message and one deleted message (a tombstone) so you can style those states.
- alice ↔ carol — a second conversation, so list components have more than one row.
Two windows = live chat
Open your preview twice: one with .../alice, one with .../bob, same sandbox. Messages, typing indicators, and presence flow between them in real time.
Try it without any code
curl https://demo-api.chatpack.dev/api/chat/u/demo/alice/conversations
Rules of the road
- Messages are capped at 2000 characters.
- Storage is in-memory: data resets when the server goes cold. Fresh seed data is planted automatically, so a reset never leaves you with an empty screen.
- Sandboxes are isolated but public — treat everything here as throwaway.
Full API reference: docs.chatpack.dev · GitHub