Build a production-ready AI support bot that intelligently answers questions in whop communities.
Create a Whop App
Get your API Key, Agent User ID, and App ID
WHOP_API_KEY
NEXT_PUBLIC_WHOP_AGENT_USER_ID
NEXT_PUBLIC_WHOP_APP_ID
Create a Supabase Project
Get Database Connection Strings
DATABASE_URL
DIRECT_URL
[YOUR-PASSWORD]
in both URLs with the database password you created.Create OpenRouter Account
Get API Key
OPENROUTER_API_KEY
Copy Environment Template
Fill in Required Variables
.env
in your text editor and fill in these required fields:companies
- Store bot settings for each Whop companyexperience_mappings
- Map Whop experiences to companiesStart the Web Server with Whop Proxy
npm run dev
alone - it won’t include the Whop proxy and the iframe integration won’t work!Start the AI Bot (New Terminal)
Set Base URL and App Path
http://localhost:3000/
/company/[companyId]
Access Bot Settings via Whop iframe
Set Up Your Bot
Bot not responding to messages
Database connection errors
[YOUR-PASSWORD]
with your actual passwordnpm run db:push
againAI responses not working
Can't access bot settings