Overview
The dashboard is a Next.js application that provides:- Password-protected admin interface
- View all conversations and messages
- Real-time data from Convex
- Test pages for widget and headless API
Prerequisites
- Convex deployed with production
CONVEX_URL - Backend deployed with production URL
- Vercel account (recommended) or other Next.js host
Vercel Deployment (Recommended)
Quick Deploy
- Import your repository to Vercel
- Configure project settings:
- Root Directory:
dashboard - Framework Preset: Next.js
- Build Command:
npm run build(auto-detected) - Install Command:
npm install(auto-detected)
- Root Directory:
- Add environment variables (see below)
- Deploy
Environment Variables
Environment Variable Details
CONVEX_URL
Your production Convex deployment URL. Same URL used by the backend.DASHBOARD_PASSWORD
Password for accessing the dashboard at/login. Generate a strong password:
NEXT_PUBLIC_BACKEND_URL
Public URL of your deployed backend. Used by test pages and to fetch OpenAPI spec. Example:https://your-backend.onrender.com
NEXT_PUBLIC_WIDGET_SCRIPT_URL
Optional. URL to the widget JavaScript bundle. Used by test pages. Example:https://your-backend.onrender.com/widget/chat-widget.js
Other Platforms
Railway
- Create new project from GitHub repo
- Settings:
- Root Directory:
dashboard - Build Command:
npm install && npm run build - Start Command:
npm run start
- Root Directory:
- Add environment variables
- Deploy
Generic Node.js Host
- SSH into your server
- Navigate to
dashboard/directory - Install dependencies:
- Build:
- Create
.env.localfile with environment variables - Start with process manager:
Build Commands
Build Command
next build in the dashboard workspace.
Start Command
next start in the dashboard workspace.
Dashboard Features
Login Page
Access at/login and enter your DASHBOARD_PASSWORD.
Conversations View
After login, view:- All conversations with session IDs
- Messages in each conversation
- Timestamps and user/assistant roles
- Real-time updates from Convex
Test Pages
Public test pages (no login required):/widget-test.html- Test the embeddable widget/headless-test.html- Test the headless API
NEXT_PUBLIC_BACKEND_URL and NEXT_PUBLIC_WIDGET_SCRIPT_URL.
Framework Configuration
The dashboard uses:- Next.js 16 with App Router
- React 19
- Convex for real-time data
- Built-in password authentication
next.config.js
The project includes a Next.js config. No additional configuration needed for deployment.Verify Deployment
- Visit your dashboard URL
- Navigate to
/login - Enter your
DASHBOARD_PASSWORD - Verify you can see conversations (may be empty initially)
- Test widget at
/widget-test.html - Test headless API at
/headless-test.html
Security Considerations
- Dashboard password uses timing-safe comparison
- Sessions are stored securely
CONVEX_URLis server-side only (not exposed to browser)NEXT_PUBLIC_*variables are public (safe for browser)- Serve dashboard over HTTPS
- Rotate
DASHBOARD_PASSWORDregularly
Optional Deployment
The dashboard is optional. You can skip deploying it if:- You don’t need to view conversations in a UI
- You prefer to use Convex dashboard directly
- You only need the widget or headless API
Next Steps
- Embed the widget on your website
- Test the chat functionality
- Monitor conversations in your dashboard