A prompt template for integrating Bootstrapware Chat

If you are using an AI coding agent, the easiest way to waste time is to ask it to build an entire communications platform from scratch.

A better prompt treats Chat as the product and the agent as the integrator: embed, identity, adapter or Hosted props, no invented APIs.

Generic prompt template

Integrate Bootstrapware Chat into this application.

Goal:
Add embeddable in-product messaging for [audience] inside the authenticated product.

Requirements:
- Create a page at [route]
- Render the Bootstrapware Chat component
- Import @bootstrapware/chat/styles.css
- Pass user={{ id, name? }} from our signed-in session (opaque stable id). Never invent user.id
- Mode: [local createLocalAdapter | BYO ChatAdapter | Hosted appId + publishableKey]
- If Hosted/config: use appId [APP_ID] and publishable key from [ENV_VAR]
- If BYO: implement listConversations, createConversation, listMessages, sendMessage, editMessage, deleteMessage, markRead against [BACKEND]
- Body max 4000, groups max 20, plain text
- Embed-only: no public chat URL or invite links
- Do not expose secret keys (bsw_*_sec_) or privileged backend logic in the client
- Never send message body or file bytes through MCP, MCP configures apps only
- Live publishable config needs BYO ($9.99) or Hosted ($19.99); live Hosted writes need Hosted ($19.99)
- If env has no publishable key, stop and ask a human to mint one (MCP cannot mint keys)
- Use the existing design system where reasonable
- Keep the implementation modular and easy to maintain

Non-goals:
- Do not rebuild a thread UI from scratch
- Do not invent Bootstrapware REST routes beyond documented app management
- Do not put Chat identity (login) on Bootstrapware, we assert user.id

Example for Hosted

Integrate Bootstrapware Chat into this Next.js app.

Goal:
Add a messages page at /dashboard/chat.

Requirements:
- Render the Chat component
- Import @bootstrapware/chat/styles.css
- Use appId from NEXT_PUBLIC_CHAT_APP_ID
- Read NEXT_PUBLIC_BSW_CHAT_PUBLISHABLE_KEY from environment variables
- Pass user from the existing session (id + name)
- Omit adapter (Hosted mode)
- Show loading and error states around send
- Keep styling consistent with the existing dashboard
- Do not expose secret keys or database credentials
- Do not create a public chat route

(Env var names are illustrative. Match whatever you use in the app.)

Example for BYO adapter

Integrate Bootstrapware Chat with a BYO adapter.

Goal:
Embed Chat at /inbox; store messages in our Postgres API.

Requirements:
- Pass adapter methods that fetch /api/chat/* Route Handlers
- Re-bind author.id from the signed-in session on every write
- Implement listConversations, createConversation, listMessages, sendMessage, editMessage, deleteMessage, markRead
- Optional uploadAttachment to our object store
- Do not send bodies to Bootstrapware
- Use hosted app config (appId) for toggles if we have a publishable key

Compact brief: Give this to your coding agent. Rules file: AGENTS.md.

Related: Agent brief · Cursor · Quickstart · Next.js