AI Revenue Agent for home services (MVP).
Current vertical: plumbing.
CallBuddy provides a mobile-first merchant dashboard and telephony/AI pipeline:
- Merchant signs up and completes onboarding
- Inbound call (Twilio webhook or demo webhook) is recorded
- AI extraction + rule engines evaluate booking readiness
- Booking is auto-created only when safe conditions are met
- Merchant reviews/updates calls and bookings in dashboard
- Next.js 16 (App Router) + TypeScript
- Prisma + PostgreSQL
- Auth.js (credentials)
- Tailwind CSS
- Vitest + Playwright
- Node.js >= 24 (
.nvmrc) - npm >= 10
- Docker Desktop (for local Postgres)
- Install dependencies:
npm install- Start Postgres:
docker compose up -d- Configure environment:
cp .env.example .env.localOr create .env.local manually:
DATABASE_URL="postgresql://prisma:prisma_password@localhost:5432/callbuddy?schema=public"
NEXTAUTH_URL="http://localhost:3000"
NEXTAUTH_SECRET="replace-with-at-least-16-chars"
# optional
OBSERVABILITY_ERROR_WEBHOOK_URL="https://example.com/webhook"
SEED_DEMO_PHONE_NUMBER="+12025550123"- Run Prisma setup:
npm run db:generate
npm run db:migrate:deploy
npm run db:seed- Start the app:
npm run devOpen http://localhost:3000.
npm run dev- start local Next.js dev servernpm run typecheck- TypeScript validationnpm run test- unit/integration tests (Vitest)npm run test:e2e- all Playwright specsnpm run test:e2e:demo- Step22 stable demo validation spec only
CallBuddy uses a hybrid intent pipeline with ML inference support and a safety fallback path.
ML_INTENT_MODE=SHADOW(default): run ML prediction for observability while preserving the safe intent pathML_INTENT_MODE=ON: apply ML prediction when availableML_INTENT_MODE=OFF: disable ML inference
Optional overrides:
ML_INTENT_PYTHON_BIN(default:ml/.venv/bin/python)ML_INTENT_SCRIPT_PATH(default:ml/scripts/predict_intent.py)ML_INTENT_TIMEOUT_MS(default:1200)
- Stable Step22 end-to-end script:
tests/e2e/demo-validation.spec.ts
- Runbook:
docs/step22-demo-validation.md
- Demo guide:
docs/demo-guide.md
- Optional fixed-account run:
CALLBUDDY_DEMO_EMAIL="test1@example.com" \
CALLBUDDY_DEMO_PASSWORD="SecurePass123" \
npm run test:e2e:demoWhen those env vars are set, the suite reuses that merchant and seeds all demo scenarios into the same dashboard account.
- MVP supports two inbound paths:
- Twilio voice webhook:
/api/telephony/twilio/voice - Internal demo webhook:
/api/telephony/demo/incoming
- Twilio voice webhook:
- Merchant mapping currently uses
merchant_profiles.demo_phone_number. - Optional localtunnel for Twilio testing:
npx localtunnel --port 3000Then point Twilio Voice webhook to:
https://<your-subdomain>.loca.lt/api/telephony/twilio/voiceRecommended:
- App: Vercel
- Database: Neon Postgres (or equivalent managed Postgres)
Required env vars in deployment:
DATABASE_URLNEXTAUTH_URLNEXTAUTH_SECRET
Optional:
OBSERVABILITY_ERROR_WEBHOOK_URL
- Completed through
Step 23: MVP polish pass