Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PlumbFlow AI — Enterprise Voice AI Agents & B2B Agency Whitelabel Platform

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

Next.js TypeScript Supabase TailwindCSS License


🚀 Key Features

🎙️ 1. Voice AI Dispatcher

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

🎯 2. B2B Lead Generation & Outreach

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

🏢 3. Whitelabel Agency Mode

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

📊 4. Advanced Analytics & Call Logging

  • 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).

📸 Platform Screenshots

💻 Main Dashboard

Dashboard

📞 Outbound Campaigns & Telephony

Phone Calls

👥 CRM & Lead Manager

Contacts

🛠️ AI Agent Builder & Knowledge Base

Builder

📈 Advanced Analytics

Analytics

🔌 Integrations & Webhooks

Integrations


🛠️ Tech Stack


📦 Getting Started

📋 Prerequisites

  • Node.js 20.x or higher
  • Supabase CLI & account
  • Vapi & API credentials (OpenAI, Deepgram, etc.)

⚙️ Installation

  1. Clone the repository:

    git clone https://github.com/marko1olo/plumbflow-ai.git
    cd plumbflow-ai
  2. Install dependencies:

    npm install
  3. Set up Environment Variables: Create a .env.local file 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
  4. Run the Development Server:

    npm run dev

    Open http://localhost:3000 in your browser.

  5. Build for Production:

    npm run build

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

PlumbFlow AI Autonomous Hydraulic Network & Dispatch Hub

🚰 Hydraulic Telemetry, Leak Diagnostics & Voice Dispatch Pipeline

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]
Loading

⚡ 1. Hazen-Williams Head Loss & Flow Rate Engine

Calculates continuous friction head loss $h_f$ (meters) across pipe runs:

$$h_f = 10.67 \cdot rac{L \cdot Q^{1.852}}{C^{1.852} \cdot d^{4.87}}$$

  • $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
    };
}

🚨 2. Plumbing Emergency Tier Classification Matrix

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 $&lt; 15$ Minutes
Tier 2 — High Priority Water heater rupture, continuous running toilet, frozen pipe risk SMS client isolation instructions, job queue escalation $&lt; 45$ Minutes
Tier 3 — Standard Low pressure, slow drain, minor faucet leak Self-service AI booking, appointment slot reservation Same-Day Service

About

Autonomous Hydraulic Telemetry & Plumber Voice Dispatch Engine — Hazen-Williams head loss solver, leak diagnostics & WebRTC intake.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages