Bolna Full Stack Engineer Assignment Submission
A production-ready voice AI system that automates restaurant reservations through phone calls. Customers (or staff) trigger an outbound voice call, an AI agent collects booking details over the phone, and reservations are auto-synced to a live dashboard.
| # | Objective | Implementation |
|---|---|---|
| 1 | Enterprise Use Case | Restaurant Reservation Automation — reduces no-shows, eliminates manual booking calls, captures structured data |
| 2 | Voice AI on Bolna | Structured prompt + outbound call API + webhook for post-call data |
| 3 | Web App | Next.js 14 + Supabase + Tailwind — fully functional booking dashboard |
| 4 | Full Flow | User submits form → API triggers Bolna call → Agent talks to customer → Webhook updates Supabase → Dashboard reflects state in real-time |
| 5 | Deliverables | GitHub repo + Vercel deploy + screen recording |
Restaurants lose 15–30% of reservations to no-shows and miss bookings during peak hours when staff can't answer phones. Manual booking is also error-prone — wrong dates, party sizes, dietary restrictions get lost.
Staff/Customer enters request → ResoVoice triggers Bolna voice call →
AI agent confirms booking details over the phone →
Bolna webhook posts structured data → Supabase stores reservation →
Dashboard shows live status (calling / confirmed / failed)
- No-show rate (target: drop from 25% to <10% via confirmation calls)
- Booking capture rate (target: 95%+ even outside business hours)
- Average time per reservation (target: <90 seconds vs ~4 min manual)
- Cost per booking (target: <₹5 vs ~₹40 staff cost)
┌──────────────┐ ┌──────────────────┐ ┌──────────────┐
│ Next.js UI │───▶│ /api/call │───▶│ Bolna API │
│ (Dashboard) │ │ (route handler) │ │ (Voice AI) │
└──────────────┘ └──────────────────┘ └──────┬───────┘
▲ │ │
│ ▼ ▼
│ ┌──────────────────┐ ┌──────────────┐
│ │ Supabase DB │◀───│ /api/webhook│
└────────────│ reservations │ │ (Bolna calls)│
Realtime └──────────────────┘ └──────────────┘
git clone https://github.com/YOUR_USERNAME/resovoice.git
cd resovoice
npm installCopy .env.example to .env.local and fill in:
NEXT_PUBLIC_SUPABASE_URL=...
NEXT_PUBLIC_SUPABASE_ANON_KEY=...
SUPABASE_SERVICE_ROLE_KEY=...
BOLNA_API_KEY=...
BOLNA_AGENT_ID=...
BOLNA_FROM_NUMBER=+1...
WEBHOOK_SECRET=any-random-stringRun the SQL in supabase/schema.sql in your Supabase project's SQL editor. This creates the reservations table with RLS policies and enables Realtime.
- Go to https://platform.bolna.ai and create an agent
- Copy the agent prompt from
docs/bolna-agent-prompt.md - Set the webhook URL to:
https://YOUR_DEPLOY_URL/api/webhook - Copy the agent ID into
.env.local
npm run devresovoice/
├── src/
│ ├── app/
│ │ ├── layout.tsx # Root layout + fonts
│ │ ├── page.tsx # Landing / dashboard
│ │ ├── globals.css # Design tokens
│ │ └── api/
│ │ ├── call/route.ts # Triggers Bolna outbound call
│ │ └── webhook/route.ts # Receives Bolna call events
│ ├── components/
│ │ ├── ReservationForm.tsx # New booking form
│ │ ├── ReservationsList.tsx # Live reservations table
│ │ ├── StatsCards.tsx # KPI cards
│ │ └── StatusBadge.tsx # Reservation status pill
│ ├── lib/
│ │ ├── supabase.ts # Client-side Supabase
│ │ ├── supabase-admin.ts # Server-side (service role)
│ │ └── bolna.ts # Bolna API wrapper
│ └── types/
│ └── index.ts # Shared types
├── supabase/
│ └── schema.sql # Database schema
├── docs/
│ ├── bolna-agent-prompt.md # The prompt for the Bolna agent
│ └── demo-script.md # Demo walkthrough
└── README.md
- Open dashboard — show empty state, KPI cards at zero
- Submit a booking — enter name, phone, party size, date/time
- Watch row appear — status:
calling(live via Supabase Realtime) - Phone rings — answer the call, talk to the AI agent
- End call — Bolna webhook fires
- Row updates — status changes to
confirmed, transcript appears - KPI cards update — total reservations / confirmation rate climbs
- Service-role key is server-only (never exposed to client)
- Webhook verifies a shared
WEBHOOK_SECRETheader - RLS enabled on
reservationstable - Form rate-limited at the API route (10 reqs/min/IP)
- Next.js 14 (App Router, RSC, Server Actions)
- Supabase (Postgres + Realtime + RLS)
- Tailwind CSS + custom design tokens
- Bolna API (voice agent orchestration)
- TypeScript strict mode
- Vercel for deployment
Built as a submission for the Bolna Full Stack Engineer assignment.