An AI-powered Sales Development Representative that lives on your website, qualifies visitors, and books meetings β automatically.
Built with: Grok AI (xAI) Β· Calendly Β· SQLite Β· React + Vite Β· Node.js + Express
# Backend
cd backend
npm install
# Frontend
cd ../frontend
npm installcd backend
cp .env.example .envEdit .env and fill in:
openRouter_API_KEYβ get free at console.x.aiopenrouter_MODELβ usegrok-3-mini(free tier)DASHBOARD_API_KEYβ any secret string for dashboard authCALENDLY_BOOKING_URLβ your Calendly scheduling linkCALENDLY_API_KEYβ optional, enables personalized booking links
cd backend
npm run dev
# β API running at http://localhost:3001cd frontend
npm run dev
# β Dashboard at http://localhost:5173ai-lead-qualifier/
βββ backend/
β βββ src/
β β βββ app.js β Express entry point
β β βββ routes/
β β β βββ chat.js β POST /api/chat (Grok AI)
β β β βββ leads.js β GET/DELETE /api/leads
β β β βββ meetings.js β POST /api/meetings/book
β β βββ services/
β β β βββ grokService.js β Grok API + system prompt
β β β βββ qualifierService.js β BANT extraction + scoring
β β β βββ meetingService.js β Calendly integration
β β β βββ emailService.js β Booking confirmation emails
β β βββ models/
β β β βββ Lead.js β Lead DB operations
β β β βββ Conversation.js β Chat history DB operations
β β βββ middleware/
β β β βββ auth.js β API key protection
β β β βββ cors.js β CORS for embeds
β β βββ db/
β β βββ database.js β SQLite connection
β β βββ migrations.js β Table setup
β βββ .env.example
β
βββ frontend/
β βββ src/
β βββ components/
β β βββ ChatWidget.jsx β Floating chat bubble
β β βββ ChatWindow.jsx β Full chat UI
β β βββ Dashboard.jsx β Stats + lead management
β β βββ Sidebar.jsx β Lead list with filters
β β βββ LeadCard.jsx β Lead detail + transcript
β β βββ QualPanel.jsx β BANT score breakdown
β β βββ MeetingPanel.jsx β Booking status
β βββ pages/
β β βββ Home.jsx β Main dashboard page
β β βββ EmbedPage.jsx β Standalone widget page
β βββ hooks/
β β βββ useChat.js β Chat state management
β β βββ useLeads.js β Lead data fetching
β βββ utils/
β βββ scoring.js β Score colors + helpers
β
βββ embed/
βββ widget.js β One-line embed script
| Method | Endpoint | Auth | Description |
|---|---|---|---|
| POST | /api/chat |
None | Send message, get AI response |
| GET | /api/chat/session/:id |
None | Get conversation transcript |
| GET | /api/leads |
API Key | List all leads |
| GET | /api/leads/stats |
API Key | Dashboard stats |
| GET | /api/leads/:id |
API Key | Lead detail + history |
| DELETE | /api/leads/:id |
API Key | Delete a lead |
| POST | /api/meetings/book |
None | Trigger booking for session |
| POST | /api/meetings/webhook |
None | Calendly webhook receiver |
| GET | /api/meetings |
API Key | List all booked meetings |
Paste before </body>:
<script src="https://your-domain.com/widget.js" data-api="https://your-domain.com/api" async></script>Works on: Webflow, WordPress, Wix, Shopify, custom HTML β anywhere.
| Plan | Price | Features |
|---|---|---|
| Starter | $49/mo | 1 site Β· 100 leads/mo Β· Basic chat |
| Growth β | $149/mo | AI qualification Β· Calendly booking Β· Email follow-ups |
| Pro | $399/mo | Multi-site Β· Advanced scoring Β· Team dashboard |
10 Growth customers = $1,490 MRR β you need zero code changes to get there.
- AI: Grok (xAI free API) β
grok-3-mini - Backend: Node.js, Express, better-sqlite3
- Frontend: React 18, Vite, React Router
- Database: SQLite (zero setup, file-based)
- Booking: Calendly API
- Email: Nodemailer (Gmail SMTP)
- Embed: Vanilla JS widget (~3kb)