PlumbFlow is a feature-rich, high-performance Voice AI Agent Dispatcher and B2B Lead Generation & Outreach Platform built for modern agencies and enterprises. Resell the platform under your own branding using our built-in Whitelabel (Agency Mode).
- 24/7 Intelligent Answering: Custom voice agents that sound like natural humans, qualify leads, schedule jobs, and route calls.
- Calendar Integration: Auto-book appointments during calls directly into your calendar.
- Custom Knowledge Base: Supply custom instructions, PDFs, websites, and business rules for the AI to refer to.
- Powered by Vapi & OpenAI/Deepgram: High-fidelity, low-latency conversational audio.
- Google Maps Scraper: Parse local businesses and contact details automatically based on search queries.
- WhatsApp Active Validator: Check list of phone numbers for active WhatsApp accounts.
- Outbound Campaigns: Set up and run automated cold outreach calls and campaigns.
- Custom Branding: Sell the platform under your own brand, colors, logo, and domain.
- Stripe & PayPal Integration: Charge your users directly through integrated SaaS payment gates.
- Real-time Call Monitoring: Monitor live calls, listen to recordings, and view transcripts.
- AI QA & Evaluation: Automated Quality Assurance scores every call from 0 to 100 based on custom evaluation rules (hallucination checks, success rate).
- Frontend/Backend: Next.js 15 (App Router), React 19, TypeScript
- Styling: Tailwind CSS v4, Shadcn UI
- Database / Auth: Supabase (PostgreSQL, Realtime, SSR auth)
- State Management: Zustand
- Form Handling: React Hook Form, Zod
- Telephony & Voice: Vapi, Deepgram
- Payments: Stripe, PayPal
- Observability: Sentry, Next-Axiom
- Node.js 20.x or higher
- Supabase CLI & account
- Vapi & API credentials (OpenAI, Deepgram, etc.)
-
Clone the repository:
git clone https://github.com/marko1olo/plumbflow-ai.git cd plumbflow-ai -
Install dependencies:
npm install
-
Set up Environment Variables: Create a
.env.localfile in the root directory:NEXT_PUBLIC_SUPABASE_URL=your-supabase-url NEXT_PUBLIC_SUPABASE_ANON_KEY=your-supabase-anon-key SUPABASE_SERVICE_ROLE_KEY=your-supabase-service-role-key VAPI_API_KEY=your-vapi-api-key OPENAI_API_KEY=your-openai-api-key
-
Run the Development Server:
npm run dev
Open http://localhost:3000 in your browser.
-
Build for Production:
npm run build
This project is licensed under the MIT License - see the LICENSE file for details.
PlumbFlow AI combines continuous telemetry analysis across commercial and residential piping loops with a zero-latency conversational voice agent for emergency plumber dispatch:
graph TD
A[IoT Acoustic / Ultrasonic Pipe Sensor] -->|Real-Time Pressure Stream| B[Hazen-Williams Hydraulic Loss Engine]
B -->|Pressure Drop Delta P > 35 PSI| C{Burst Anomaly Detected?}
C -->|Yes: Critical Tier 1| D[Instant Emergency Auto-Shutoff Command]
C -->|Yes| E[Inbound / Outbound Voice Agent WebRTC]
E -->|STT + Deterministic Geo-Filter| F[Nearest Master Plumber Routing]
F -->|Telegram / WhatsApp / SMS Dispatch| G[Emergency Technician Dispatched ETA < 15m]
C -->|No: Nominal| H[Predictive Cavitation & Scale Modeling]
Calculates continuous friction head loss
-
$L$ : Pipe length$(\text{m})$ . -
$Q$ : Volumetric flow rate$(\text{m}^3/\text{s})$ . -
$C$ : Roughness coefficient (Copper:$150$ , PEX:$140$ , Cast Iron:$100$ ). -
$d$ : Internal pipe diameter$(\text{m})$ .
// Production TypeScript Hydraulic Pressure Drop & Leak Detection Kernel
export interface PipeSegment {
id: string;
lengthMeters: number;
diameterMeters: number;
roughnessC: number;
nominalPressureBar: number;
}
export function evaluatePipeTelemetry(
pipe: PipeSegment,
measuredFlowM3S: number,
inletPressureBar: number,
outletPressureBar: number
): { isRupture: boolean; headLossMeters: number; pressureDeltaBar: number } {
// Hazen-Williams head loss
const numerator = 10.67 * pipe.lengthMeters * Math.pow(measuredFlowM3S, 1.852);
const denominator = Math.pow(pipe.roughnessC, 1.852) * Math.pow(pipe.diameterMeters, 4.87);
const headLossMeters = numerator / denominator;
// Convert head loss meters to pressure loss in Bar (1m water column ~= 0.0980665 Bar)
const expectedLossBar = headLossMeters * 0.0980665;
const actualLossBar = inletPressureBar - outletPressureBar;
// Anomaly threshold: actual loss exceeds theoretical loss by > 40% indicating downstream breach
const isRupture = actualLossBar > expectedLossBar * 1.40 && outletPressureBar < (pipe.nominalPressureBar * 0.6);
return {
isRupture,
headLossMeters,
pressureDeltaBar: actualLossBar
};
}| Emergency Severity | Trigger Symptoms | Automated Response | SLA Technician Target |
|---|---|---|---|
| Tier 1 — Catastrophic | Main line burst, multi-story flooding, sewage backup | Solenoid shutoff signal, automated live call transfer | |
| Tier 2 — High Priority | Water heater rupture, continuous running toilet, frozen pipe risk | SMS client isolation instructions, job queue escalation | |
| Tier 3 — Standard | Low pressure, slow drain, minor faucet leak | Self-service AI booking, appointment slot reservation | Same-Day Service |







