← Back to work

JJ's Quote Tool

AI-powered quoting platform for a roofing contractor with a 27-tool AI agent, hybrid semantic catalog search, weather-aware scheduling, and real-time business insights.

ReactViteSupabaseClaude APIVoyage AIZustandRechartsVercel

The Challenge

A roofing and gutter contractor in Indiana was running their entire business off spreadsheets — quoting jobs by hand, tracking customers in their head, and losing money on follow-ups that never happened. They needed a purpose-built platform that could handle multi-supplier pricing, quote lifecycle management, and customer tracking — ideally with an AI assistant that actually understands the trade.

What I Built

A full-featured quoting platform with 10 modules and a deeply integrated AI agent that can run nearly the entire business through natural language.

The AI Agent

The centerpiece is an AI agent with 27 tools that operates as a hands-on business partner:

  • Quote building via conversation — “200 feet of 5-inch K-style, white, 4 downspouts, the Henderson job on Oak Street” triggers catalog lookups, line item creation, customer field population, and a running total — all in one response
  • Hybrid catalog search — keyword matching plus Voyage AI vector embeddings against the contractor’s own uploaded supplier pricing from three distributors (Lynch, Wilco, Raytec), with automatic best-price comparison
  • Photo analysis — contractor sends a job site photo and the agent identifies gutter runs, downspouts, elbows, end caps, estimates linear footage, searches the catalog for each component, builds the quote, and attaches the photos to the record
  • Weather-aware scheduling — finds open calendar slots, cross-references weather forecasts, and recommends the best dry-weather windows for outdoor work. Flags upcoming jobs on bad-weather days and offers to reschedule
  • Full quote lifecycle — “we got the Henderson job” → marks it won. “Henderson’s done, need to invoice” → updates status. “Henderson paid” → marks paid. All through natural language pattern matching
  • Proactive business insights — a cron-triggered pipeline analyzes quote history across all users, computes win rates, revenue trends, stale sent quotes, and outstanding invoices, then generates specific recommendations via Claude (e.g., “Follow up with Williams — that quote has been sitting for 12 days”)
  • Two personality modes — a professional “business buddy” persona and a toggleable “smartass” mode that talks like a gutter guy with 20 years in the trade (“Missing sealant and hangers. You want leaky gutters or do you want to do this right?”)
  • Deep domain expertise baked into the system prompt — gutter sizing rules, downspout spacing, hanger standards, slope calculations, material pricing for the region, failure modes, and Indiana building code

The agent streams responses in real time via SSE, executes tool calls client-side against the Zustand store, and supports multi-turn agentic loops (up to 10 iterations) for complex multi-step operations.

The Platform

  1. Quote Builder — line-item editor with per-supplier pricing, markup, tax, and totals
  2. Quote History — searchable archive with status tracking (draft → sent → won → invoiced → paid) and deep links
  3. Supplier Catalog — CSV upload pipeline that normalizes pricing across three different distributor formats, with vector embedding for semantic search
  4. Price Comparison — side-by-side supplier cost analysis
  5. Reports Dashboard — revenue, margin, win rate, and top-customer analytics with Recharts
  6. Customer Management — contact book with quote history, lifetime value, and agent-driven enrichment
  7. Calendar — scheduling with contractor feed integration and weather overlay
  8. Shareable Quotes — short links (/q/:id) for sending estimates to customers, with a public acceptance flow
  9. Settings — company name, address, tax rates, markup defaults, and per-user preferences
  10. Offline Support — optimistic saves with reconnection handling and an offline banner

Technical Highlights

  • 27-tool agentic loop with streaming SSE, client-side tool execution, and multi-turn conversations
  • Hybrid search: keyword tokenization + Voyage AI vector embeddings with Supabase pgvector RPC
  • Row-level security isolates each user’s data; shared catalog uses most-recent-upload strategy
  • Cron-driven insight generation pipeline that produces actionable business recommendations per user
  • Serverless API on Vercel Functions for agent, catalog search, quote acceptance, price extraction, and embedding
  • White-label ready — company name and location are injected into system prompts via runtime substitution