Book a demo
Built in public ยท AGPL-3.0 ยท Self-hostable

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 API

Architecture 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.

01
CallerPhone ยท SMS ยท WhatsApp ยท web chat ยท email
02
Vapi / TwilioVoice handling, transcript per turn
03
Django + MaryClaude tool loop, persists to Postgres
04
Next.js dashboardServer components, live KPIs, quote PDFs

What's in the repo

Every box below is wired up in code. Click the path to jump straight to the file on GitHub.

Backend

Django 5 + DRF

5 apps ยท 8 models ยท Vapi custom-LLM endpoint ยท Twilio webhooks ยท service layer for Claude orchestration + OpenAI Vision.

backend/apps/
Frontend

Next.js 15 + React 19

App Router, server components, real-time dashboard with KPIs, lead detail, quote line items, customers, settings.

frontend/app/dashboard/
Voice

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_completions
Database

Postgres 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 --wipe
Infra

Docker Compose

Three services: db, backend, frontend. Hot-reload mounted on both apps. No build tooling, no Vercel config required.

docker-compose.yml

Mary'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.

  1. 01
    Inbound call
    Vapi ยท custom-LLM mode

    Vapi handles STT + TTS. The caller hears Mary in the voice you picked, in the language you configured.

  2. 02
    Every turn POSTs the transcript
    POST /api/calls/vapi/chat/completions/

    OpenAI-compatible payload. Django converts it to Claude format and runs the agent loop.

  3. 03
    Mary decides what to do next
    agent/receptionist.py

    Claude Sonnet 4.6 picks from 5 tools โ€” qualify_lead, check_availability, book_appointment, send_sms, end_call โ€” or speaks.

  4. 04
    Tools write to the database
    services/persistence.py

    qualify_lead creates/updates Customer + Lead + Conversation. book_appointment confirms a slot. Every fact Mary learned is persisted.

  5. 05
    Dashboard 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 --wipe

Roadmap

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.

Docs ยท Workflow Auth