How real teams ship with ChatPack
Playbooks, customer stories, product notes, and clear comparisons — written for people who live in prompts.
Playbooks, customer stories, product notes, and clear comparisons — written for people who live in prompts.
Set up chat in your Next.js project using ChatPack.
×Set up chat in my Next.js project using ChatPack (chatpack npm package). 1. Install chatpack. If I already have a database configured in this project, use that — don't set up a new one. 2. Create lib/chatpack.ts — call ChatPack() with: - My existing database connection (or a new Postgres setup if none exists) - CHATPACK_SECRET from .env 3. Add the ChatPack provider to my root layout. 4. Create a chat page or component using the useChat hook: - List conversations in a sidebar - Show messages in the main area - Include a message input with send button - Typing indicators and read receipts enabled by default 5. Add CHATPACK_SECRET to my .env if it doesn't exist (generate a 32+ char secret). 6. Run the dev server and verify a working 1:1 chat between two test users.