mirror of
https://github.com/vercel/chat.git
synced 2026-09-14 18:32:29 +08:00
Chat SDK Bot
A chat bot built with Chat SDK, a unified TypeScript SDK by Vercel for building bots across Slack, Teams, Google Chat, Discord, WhatsApp, and more.
Getting Started
- Copy the example environment file and fill in your credentials:
cp .env.example .env.local
- Start the dev server:
npm run dev
- Expose your local server to the internet (e.g. with ngrok) and configure your platform's webhook URL to point to:
https://<your-url>/api/webhooks/<platform>
Replace <platform> with slack, teams, gchat, discord, etc.
Project Structure
src/
lib/bot.ts Bot configuration and handlers
app/api/webhooks/[platform]/route.ts Webhook endpoint (all platforms)
.env.example Required environment variables
Scripts
| Command | Description |
|---|---|
npm run dev |
Start the development server |
npm run build |
Create a production build |
npm run start |
Start the production server |