Back to PortfolioAI Lead Generation Platform

LeadPilot

AI-powered B2B prospect discovery and cold outreach automation

25
leads found in 4 seconds
3
AI email variants per lead
94%
AI quality score
LeadPilot main screenshot
LeadPilot screenshot 2
LeadPilot screenshot 3
LeadPilot screenshot 4
The Problem

Why this needed to be built

B2B sales reps waste 4+ hours per day finding leads across multiple databases and writing personalized cold emails. Different tools don't talk to each other, data lives in spreadsheets, and personalization gets sacrificed for speed. Teams pay $300+/month for Apollo, another tool for email writing, and another for campaign tracking — none of them are integrated.
The Solution

How it works

01Type a niche + location → 25 qualified leads found in under 4 seconds
02AI writes 3 personalized cold email variants per lead with customized subject lines
03Campaign dashboard with real-time open/reply tracking and stats
04One-click CSV export to import into any existing CRM or email tool
05Provider Pattern allows swapping Apollo.io for Google Maps or mock data
06Built-in rate limiting and cost controls to prevent runaway OpenAI spend
Tech Stack

Built with

Next.js 15TypeScriptSupabaseOpenAI gpt-4o-miniApollo.io APIGoogle Maps APIResendZodTailwind CSS
Architecture

System design

User Input (niche / location / count) │ ▼ Search Router ┌───────────────────────────┐ │ Provider Pattern │ │ ┌────────┐ ┌──────────┐ │ │ │ Apollo │ │ G.Maps │ │ │ │ .io │ │ API │ │ │ └────────┘ └──────────┘ │ │ ┌────────┐ │ │ │ Mock │ (demo mode) │ │ │ Data │ │ │ └────────┘ │ └───────────────────────────┘ │ ▼ Lead Enrichment │ ▼ OpenAI gpt-4o-mini (3 email variants per lead) │ ▼ Supabase DB ──► Campaign Manager │ │ ▼ ▼ CSV Export Resend Sender
Key Decisions & Lessons

What I learned

Why Provider Pattern for lead sources

Abstracting Apollo.io, Google Maps, and mock data behind a common interface was the single best architectural decision. When Apollo's free tier hit rate limits during demo, switching to Google Maps took 5 minutes. Without the pattern, it would have required rewriting the entire search pipeline.

How AI prompt structure ensures quality

The key was giving GPT-4o-mini structured context: company name, industry, role, and a specific pain point discovered from their website. Generic prompts produce generic emails. The 94% quality score came from templated context injection with strict Zod output validation ensuring every field was populated before showing results.

Why mock data fallback was critical for demo

Every live demo has API failures. Building a realistic mock data generator that mirrors real Apollo responses saved 3 demos from disaster. The mock mode also made development 10x faster — no rate limit anxiety, no API costs during iteration.

What I'd do differently next time

I'd add webhook-based lead enrichment instead of synchronous API calls — the 4-second wait is acceptable but could become a bottleneck at scale. I'd also implement proper job queuing (BullMQ or Inngest) from day one instead of treating it as a future optimization.

Want me to build something similar for you?

Hire me for your project →