Skip to content

ByteStreams-AI/dialtone

Repository files navigation

DialTone

Multi-tenant SaaS platform that gives restaurants an AI-powered phone ordering and reservation system. A caller reaches the restaurant's number, an AI voice agent takes their food order or books a reservation, and the result flows to the right place: paid orders appear on a real-time kitchen display, reservations land on the host's list with an SMS confirmation.

Status: M1–M8 complete + M9 in progress. Path A demo proven live; Path B (Vapi voice contract) merged May 3. M9 reservation voice pipeline live on local stack — RPCs, three Edge Functions, and tool-schema gating all in place. Admin UI (reservations view + tables/rules config) is the remaining M9 work. See AGENTS.md for full current state.

See docs/project-status.md for milestone-by-milestone tracking and developer/developer-journal.md for the chronological narrative.

Functional Flow

Where things live

Path What it is
docs/PRD-DialTone-2026-04-17.md Product requirements — authoritative v1 scope
developer/dialtone-schema.sql Original schema reference (live schema is in supabase/migrations/)
developer/dialtone-schema-notes.md Design decisions behind the schema
developer/dialtone-vapi-prompt.md Vapi system prompt + tool schemas
developer/dialtone-tech-stack.md Stack choices and rationale
developer/branding.md Per-restaurant branding system (schema, RPC, render-time fallback rules)
developer/m8-live-demo-checklist.md M8 operational runbook + lessons learned (Stripe envs, CORS, auth init)
developer/planned-migrations/ Migrations designed but not yet applied — currently empty
supabase/migrations/ Applied migrations — schema, realtime publication, RLS fixes, tax_rate_bps, finalize_voice_order, M7 payments, M8 branding + branding-RPC, M9 reservation RPCs (0010)
supabase/functions/ Edge Functions: Vapi voice path (vapi_call_start, ordering tools, M9 reservation tools), stripe_webhook, admin_create_manual_order, kitchen_advance_order, plus _shared/ helpers (CORS preflight, Telnyx SMS, Stripe Checkout, env, logged SMS dispatch)
packages/shared/src/voice/ Shared voice module — prompt renderer, cart math, modifier validation, menu normalization, tz-aware hours helpers, readback generator
packages/shared/src/payment/ Stripe Checkout builder, Web Crypto webhook signature verifier, SMS body templates
apps/admin/ Admin dashboard — auth, menu CRUD, hours, manual orders, order history, customer-facing /orders/:id/{paid,cancel} post-payment pages
apps/kitchen/ Kitchen tablet — realtime board, sound alerts, optimistic state transitions
AGENTS.md Instructions for AI coding agents working in this repo (conventions, gotchas, open follow-ups)

The marketing site at dialtone.menu lives in a separate repo (dialtone_menu/, Worker dawn-pine-d058) and is deployed independently. Customer-facing post-payment pages do NOT live there — they're in the admin app at admin.dialtone.menu, branded per-restaurant.

Stack

React 19 + Vite · Supabase (Postgres + Auth + Realtime + RLS) · Supabase Edge Functions (Deno) · Vapi + ElevenLabs (voice) · Telnyx (SMS — Twilio swapped out May 1, 2026) · Stripe Checkout (per-restaurant Connect routing planned for M11).

See developer/dialtone-tech-stack.md for the rationale behind each choice and what was considered and rejected.

Testing

Command What it does
pnpm test Run unit tests with Vitest (no coverage)
pnpm test:coverage Run tests with v8 coverage report + 85% gate
pnpm test:integration Run integration tests against live local Supabase + Edge Functions. Requires pnpm supabase start and pnpm supabase functions serve --no-verify-jwt running in a second shell
pnpm ci:fast Lint + typecheck + unit tests (fast lane)
pnpm ci:full Fast lane + coverage gate (mirrors GitHub Actions fast + full lanes; CI additionally runs test:integration against Supabase)
pnpm lint ESLint across the workspace (zero-warning policy)

Tests live in packages/*/test/ and apps/*/test/. Unit coverage is enforced at 85% on all implemented modules. Integration tests (packages/shared/test/db/) exercise schema migrations, RLS, seed validation, and the full voice-pipeline ordering scenario suite against the live local Supabase stack. See developer/testing-action-plan.md for the milestone-by-milestone testing strategy.

Deploy

Live deployment infrastructure (Cloudflare Workers for the apps + Supabase cloud for the DB and Edge Functions) is wired and proven. See developer/m8-live-demo-checklist.md for the full operational runbook including the lessons learned during the M8 live deploy (three Stripe environments confusion, CORS preflight, auth init, success_url routing).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors