LeadPilot
AI-powered B2B prospect discovery and cold outreach automation




Why this needed to be built
How it works
Built with
System design
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 →