TABFinders — System Schematic
A full-stack marketplace platform connecting property owners and contractors with certified HVAC Testing, Adjusting & Balancing (TAB) professionals across the US.
Platform Overview — What It Does
Public-facing company directory with map view, search, filters by state/cert/service. SEO-optimized company profiles and city landing pages.
Customers submit project requests (PostJob). AI matches them to the nearest qualified TAB company. Leads are captured and tracked.
TAB companies claim their profiles, manage leads, view analytics, message customers, and upgrade to PRO subscription plans.
Stripe-powered subscriptions: Free, Basic, Premium for companies. Customer premium plans. Advertiser billing via Ad campaigns.
Floating chat widget + dedicated AI assistant page powered by an in-app agent. Helps users find TAB pros, answer questions, capture leads.
Full ad campaign system: creatives, placements, impressions, clicks, conversions. Targeted by state/city/service/property type.
User Roles & Access Levels
- Browse directory
- View company profiles
- Search by location/service
- Submit job request (creates lead)
- Use AI assistant
- All guest permissions
- Dashboard with projects
- Message companies
- Track bids & responses
- Upgrade to Premium
- Write reviews
- Company dashboard
- View & manage leads
- Respond to messages
- Edit company profile
- View analytics
- Upgrade to PRO
- Claim listing
- Full admin dashboard
- Manage all users/companies
- Import companies (bulk)
- Run AI enrichment
- Approve/reject companies
- Manage ads & content
- Platform settings
- Access all tools
Database Entities (Click to expand fields)
Company Import System
Input Formats
# Company Name heading. Key: Value pairs on subsequent lines.Field Mapper (Step 2)
Auto-match rules check column names against patterns. User can override any mapping.
Backend (importCompanies)
- 1Bulk fetch — Loads all existing company names into a Set in one query (not one per row)
- 2Filter dupes — Filters out duplicates before any DB writes. Also dedupes within the same batch.
- 3Parallel batches — Creates companies 10 at a time with Promise.allSettled — fast but safe
- 4No AI per row — Skips per-row LLM calls. Uses template description. Run Enrichment Tool after.
- 5Chunked frontend — Frontend sends 200 companies per request. 2,000 companies = 10 API calls.
- 6Logo fetch — Fire-and-forget logo fetch after import succeeds, per company with website.
AI Enrichment Pipeline
enrichCompanyProfile — 9-Step Pipeline
- 1Google Places API — Text search → Place Details. Fills: website, phone, address, rating, review_count, coordinates, city, state, ZIP.
- 2AbstractAPI — Domain enrichment. Fills missing: website, logo, description, phone, email, city, state, address, years_experience.
- 3SerpAPI — Google search with knowledge graph + local pack. Fills: phone, address, website, rating, hero image.
- 4AI Web Search (LLM) — Only runs if still missing critical data. Searches for website, phone, email, address, certifications, service_areas, coordinates. Uses add_context_from_internet=true.
- 5Logo Fetch (Logo.Dev → fallback) — Tries Logo.Dev API by domain. Falls back to fetchCompanyLogo function if Logo.Dev fails.
- 6Website Image Extraction (LLM) — AI scrapes the company website for hero images and gallery images. Stores in microsite_config.
- 7Geocoding — If still no coordinates, calls geocodeLocation function on the address.
- 8Slug Generation — Generates SEO-friendly URL slug if missing.
- 9DB Update — All collected enrichments written to Company entity in a single update call.
autoEnrichCompanies — Batch Runner
Iterates all active companies. Skips ones that already have: description, ai_summary, logo, coordinates, meta_title, screenshot.
2 second delay between companies for API rate limiting.
orchestrateCompanyEnrichment — Master Orchestrator
Runs all pipeline steps in sequence. Returns immediately, processes in background. Logs everything to AdminActivityLog.
Daily limit configurable via AutomationSettings entity (key: daily_company_discovery_limit). Default: 20.
External APIs Used
Google Places API
Primary data source. Phone, address, rating, coordinates.
AbstractAPI
Company enrichment by domain.
SerpAPI
Google search results scraping.
Gemini / GPT (LLM)
AI web search for missing fields.
Logo.Dev
Company logo by domain.
Browserless
Website screenshot capture.
Customer Journey — Getting a TAB Quote
Company Journey — Getting Listed & Getting Leads
Admin Import Path
Self-Service Path
Backend Functions Map
AI Agents
Main AI assistant embedded in the site. Answers questions about TAB, helps users find companies, explains services. Accessible via floating chat widget and /AIAssistantChat page.
Specialized agent for finding and recommending TAB companies. Has read access to Company entity. Used in CompanyFinder admin tool.
Chatbot variant focused on capturing lead information. Routes users toward submitting a project request.
Key Data Flows
New Lead Submitted
Company Import → Live Profile
Ad Impression → Conversion
Company Claim Flow