Self-host Workflow Auth.
Same dashboard, same AI pipeline, same code we ship in the YouTube build-alongs โ yours under AGPL-3.0. Three commands and you're running the full stack locally.
Quick start
# 1 โ clone
git clone https://github.com/yourname/dropline.git
cd dropline
# 2 โ copy the env template (works without API keys)
cp .env.example .env
# 3 โ bring it up
docker compose up --build
# http://localhost:3000 Next.js dashboard
# http://localhost:8000/admin Django admin
# http://localhost:8000/api REST APIArchitecture overview
Three Docker services, two AI providers, one Postgres. The frontend renders server components against a Django REST API; voice runs through Vapi's custom-LLM mode so Mary keeps a real agent loop server-side.
What's in the repo
Every box below is wired up in code. Click the path to jump straight to the file on GitHub.
Django 5 + DRF
5 apps ยท 8 models ยท Vapi custom-LLM endpoint ยท Twilio webhooks ยท service layer for Claude orchestration + OpenAI Vision.
backend/apps/Next.js 15 + React 19
App Router, server components, real-time dashboard with KPIs, lead detail, quote line items, customers, settings.
frontend/app/dashboard/Vapi + Twilio (custom-LLM mode)
Vapi POSTs every conversation turn to /api/calls/vapi/chat/completions/. Mary runs an agentic loop server-side and returns the next utterance plus optional X-Vapi-End-Call header.
apps/calls/views.py ยท chat_completionsMary ยท Claude Sonnet 4.6 + GPT-4o vision
5-tool loop (qualify_lead, check_availability, book_appointment, send_sms, end_call). Tools persist Customer, Lead, Conversation rows in real time.
apps/calls/agent/{prompts,tools,receptionist}.pyPostgres 16
Single docker volume. Seed command included โ one shell command and you have 8 leads, 5 calls, 4 quotes to play with.
manage.py seed_demo --wipeDocker Compose
Three services: db, backend, frontend. Hot-reload mounted on both apps. No build tooling, no Vercel config required.
docker-compose.ymlMary's agent loop
Six stages, each one a single function, webhook, or tool dispatch in the codebase. Trace it with your IDE in five minutes.
- 01Inbound call
Vapi ยท custom-LLM modeVapi handles STT + TTS. The caller hears Mary in the voice you picked, in the language you configured.
- 02Every turn POSTs the transcript
POST /api/calls/vapi/chat/completions/OpenAI-compatible payload. Django converts it to Claude format and runs the agent loop.
- 03Mary decides what to do next
agent/receptionist.pyClaude Sonnet 4.6 picks from 5 tools โ qualify_lead, check_availability, book_appointment, send_sms, end_call โ or speaks.
- 04Tools write to the database
services/persistence.pyqualify_lead creates/updates Customer + Lead + Conversation. book_appointment confirms a slot. Every fact Mary learned is persisted.
- 05Dashboard updates live
GET /api/leads/ ยท GET /api/calls/Server component re-fetches, action pill flips to Qualified / Quote Sent / Booked / Won.
Wiring real voice
Drop your Vapi key in .env and point the assistant webhook at a tunnel of your local backend (or your deployed URL):
https://<your-host>/api/calls/webhooks/vapi/The custom-LLM completions endpoint lives at /api/calls/vapi/chat/completions/ โ Vapi POSTs the running transcript on every turn and Mary's loop returns the next utterance.
Seed demo data
One management command. Wipes the existing demo set and inserts 8 leads, 5 calls, 4 quotes โ enough to see every dashboard view come alive.
docker compose exec backend \
python manage.py seed_demo --wipeRoadmap
Pull requests welcome. Each line below is a real GitHub issue.
Shipped 8
- โDjango data model (Business, Channel, Customer, Lead, Conversation, Message, Call, Quote, LineItem)
- โVapi + Twilio webhook handlers with structured-JSON Claude extraction
- โOpenAI Vision pipeline โ drafted quote with line items, tax, total
- โNext.js dashboard: Overview, Leads, Calls, Quotes, Customers, Support, Settings
- โSupport tickets app โ WhatsApp / SMS / email / web-chat threads with status workflow and agent reply that posts back through the original channel
- โLead-detail conversation timeline + extracted_fields inspector
- โseed_demo management command for instant believable data
- โDocker Compose 3-service stack with hot-reload
In progress 4
- ยทStripe checkout for deposit collection on quote acceptance
- ยทOutbound SMS / WhatsApp via Twilio for quote delivery
- ยทMulti-tenant auth (today: single business, no login)
- ยทPDF rendering for the customer-facing quote
Open issues 4
- โSubsidy lookup integration (solar / energy renovation)
- โTech dispatch + GPS routing for booked jobs
- โReview request automation (Google + Trustpilot webhooks)
- โEval harness for the Claude extraction prompt
License
The reference implementation is published under the GNU AGPL-3.0. A separate commercial license is available for white-labeling, reselling, or embedding Workflow Auth in closed-source products โ email contact@workflowauth.com.