Quickstart
Embed private 1:1 and small-group messaging in minutes. Free local/demo forever; BYO ($9.99) when you own messages; Hosted ($19.99) when Bootstrapware stores messages and files.
1. Install
pnpm add @bootstrapware/chat
2. Choose a mode
Local / demo: createLocalAdapter (free).
BYO ($9.99): pass a ChatAdapter plus optional hosted app config for toggles.
Hosted ($19.99): omit adapter; pass appId + publishableKey.
Resolve order: explicit adapter → Hosted (appId + publishable key) → local. See Modes.
3. Embed (local)
Use a Client Component in Next.js App Router.
"use client";
import { Chat, createLocalAdapter } from "@bootstrapware/chat";
import "@bootstrapware/chat/styles.css";
export function ProductChat() {
return (
<Chat
user={{ id: "user_1", name: "Ada" }}
adapter={createLocalAdapter({ storageKey: "demo-chat" })}
/>
);
}In production, wire the real session id. Never invent user.id. Details: Identity.
4. Embed (Hosted)
After you create and publish an app in the dashboard (or via secret key / MCP), pass the app id and a publishable key. MCP cannot mint keys. If env has no publishable key, stop and mint one on the Keys page.
<Chat
appId="cha_..."
publishableKey="bsw_live_pub_..."
user={currentUser}
/>Optional apiBaseUrl defaults to https://chat.bootstrapware.co. Live config needs BYO or Hosted; live Hosted writes need Hosted.
5. Identity
Always pass user from your session. Bootstrapware does not authenticate end users. id must be opaque and stable. Optional name / email / avatarUrl are display metadata only. Anonymous chat is not supported.
6. Limits worth knowing
Message body max 4,000 characters (plain text with light markup in the widget). Groups max 20. Attachments: jpeg/png/webp/gif/pdf, 10 MB, max 4 per message. Hosted files: 1 GB included, 10 GB with the $9.99 add-on. See limits.
Browser notifications are opt-in in the widget (default off). Permission is requested only when the user clicks Notify. Hidden-tab messages from others can notify; visible-tab, self, opted-out, and deny do not.
7. Security
Publishable keys may appear in the browser. Secret keys stay server-side. Never send message bodies or file bytes through MCP. Hosted stores plain text and files; you moderate in the dashboard. Embed-only: no public chat URL.
Related: Modes · Identity · Adapter · React component · Next.js guide · Live demo