












Arventa
CanadaUnited States
Multi-tenant collections platform with AI voice agents that call debtors, automated emails and configurable workflows to recover overdue invoices. It handles batches of up to 500 invoices and centralizes recordings, transcripts and outcomes.
IncludesAI voice agentsAI-written emailsVisual workflows







Overview
The challenge
Links
Private — client project
System architecture
Arventa is split into a static React dashboard, a stateful Node.js call server and a managed Supabase backend. The dashboard reads and writes tenant data directly through Supabase, protected by Row-Level Security. Everything that touches the outside world or must survive restarts goes through the call server (telephony, voice-agent webhooks, inbound email and the workflow engine), and its state lives entirely in Postgres via pg-boss and SQL functions, so restarts and deploys need no special handling.
Application Architecture
- Monorepo with three units: a React/Vite frontend, a Fastify + pg-boss call server, and a Supabase project with migrations and edge functions.
- Frontend data-access layer of 26 modules wrapped in TanStack Query hooks, with no direct database calls in components.
- Engine queues created with pg-boss’s own retries disabled so the engine owns retry logic, plus cron scans for scheduled triggers every 5 minutes and resumes every 2.
- Edge functions hold the LLM and email-provider logic, isolated from the call server.
Platform Features
- Visual workflow editor with 7 node types (call, email, wait, branch, update record, escalate, end), with graphs validated before they can be published.
- Batch launches over up to 500 invoices, skipping any invoice that already has an active run.
- Unified invoice timeline: calls, emails, replies, notes and audit history.
- Action Needed queue fed by escalations, failed calls, wrong numbers and unreachable debtors.
- Per-invoice phone number history with wrong-number tracking.
- Live call listening and transcripts.
Data Model
- 29 tables over 74 migrations, all with RLS enabled.
- Workflow runs and run steps with attempt history, claim tokens and resume deadlines.
- A polymorphic interactions table (call, email, text) with a many-to-many link to invoices for emails that cover several invoices.
- Outcome categories per organization, with a JSON field schema enforced by database triggers.
Authentication
- Supabase Auth
- Org-scoped RLS
- Global + org roles
- SECURITY DEFINER helpers
- JWT-verified admin routes
- Svix webhooks
- Twilio signatures
Infrastructure & deployment
The production setup keeps a deliberately small operational footprint: Supabase provides Postgres, auth, storage and the serverless functions, and the call server runs as a single long-lived Node process.
Hosting & Runtime
- Supabase managed PostgreSQL 17 with separate dev and production projects.
- Edge Functions on Deno 2.
- Call server compiled with tsc and run under PM2 with autorestart and a 500 MB memory cap.
Reliability
- The job queue lives in the same Postgres instance, with no extra broker.
- A dead-letter queue for failed engine jobs.
- A sweeper closes calls whose provider callback never arrived.
- In production the server refuses to boot if webhook signing secrets are missing.
Observability
- Pino structured logs
- AsyncLocalStorage trace context
- Per-run error persistence
Built with
Delivered as a working three-part system: the finance team’s dashboard, the call server that runs the workflow engine, and the Supabase backend behind both.
App Surfaces
- Dashboard, invoices list and detail, workflow editor and templates, campaigns and batches, and run detail.
- Action Needed queue, activities, uploads and contact-hours settings.
- Organization admin for the voice agent, email domains and members, plus user management.
- Pilot kick-off setup and a final report with charts.
Integrations
- Twilio Voice
- ElevenLabs Agents
- Anthropic Claude
- Resend
- Xero
Tooling & Docs
- 87 test files with about 875 test cases across the backend and the frontend.
- Hand-run end-to-end scripts for the engine and email replies.
- An email provider setup guide, a developer handover guide and a product overview.
- Migration of the email provider from SendGrid to Resend.