All case studies
Case study · SiteBeacon

Building SiteBeacon, AI-powered lead generation.

How we created an AI-powered lead generation platform that helps web agencies find businesses in need of their services — using Google Maps, Gemini AI, Neon Postgres, and modern SaaS architecture. Now with Proposal PDF generation, saved-search daily alerts, and Wayback Machine domain enrichment.

17.3K
Lines of code
39
API endpoints
3
Search modes
100%
TypeScript
Client
SiteBeacon
Industry
B2B SaaS · Lead Generation
Services
Full-stack development
The challenge

Lead generation that doesn't scale.

Web developers and digital agencies face a critical problem: finding qualified leads is time-consuming, expensive, and often ineffective. Cold calling, outdated lead lists, and referrals don't scale.

Pain points identified

What's broken

  • Manually searching Google Maps for businesses without websites
  • No way to identify which businesses actually need help
  • Hours spent crafting individual outreach emails
  • Expensive lead generation services ($100+/month)
  • No collaboration features for agency teams
  • Existing tools focus on SEO, not lead discovery

Goals defined

What we built

  • Automate local business discovery with intelligent filtering
  • Identify businesses by problem type (no website, low ratings, poor GMB)
  • AI-powered lead scoring with multi-variant outreach and follow-ups
  • Affordable credit-based pricing for all agency sizes
  • Team collaboration with shared leads and credits
  • Built-in CRM features for pipeline management
Our solution

Google Maps + Gemini AI.

A full-stack SaaS platform that combines Google Maps intelligence with Gemini AI to automate lead discovery, qualification, and outreach.

01

Multi-Mode Search Engine

Three distinct modes: Website (finds businesses without websites or using third-party platforms), Reputation (low-rated businesses), and GMB (incomplete Google Business Profiles). Each mode uses specialized filtering algorithms.

02

AI-Powered Analysis

Google Gemini 2.0 Flash powers instant lead analysis, 3 customized email variants per prospect, automated follow-up sequences with optimal timing, geo-anchored competitor intelligence, PageSpeed audits, and one-click Proposal PDF generation.

03

Intelligent Lead Scoring

Proprietary 1-100 scoring with A-F grades, evaluating businesses based on website status, rating, review count, GMB completeness, and detected issues. Higher scores indicate better conversion opportunities.

04

Team Collaboration

Enterprise-ready features with role-based access control, shared credit pools, centralized lead management, email invitations, and owner/member permissions. Built for agencies with multiple sales reps.

Technical architecture

Stack and APIs.

Frontend stack

  • Next.js 15 with App Router & Turbopack
  • React 19 with Server Components
  • TypeScript end-to-end type safety
  • Tailwind CSS for responsive design
  • Lucide React for consistent iconography

Backend stack

  • Next.js API Routes (serverless on Vercel)
  • Prisma 6 ORM with Neon Postgres (migrated from MongoDB Apr 2026)
  • NextAuth.js with Prisma adapter (JWT + Google OAuth)
  • Stripe Subscriptions + one-time credit packs
  • Resend for transactional + saved-search daily alerts
  • React PDF for one-click Proposal PDF generation

Google Maps Platform

Places API (New)

Search businesses by location with comprehensive filtering and up to 60 results via pagination.

Place Details API

Retrieve ratings, reviews, websites, phone numbers, hours, photos, and GMB status.

Geocoding API

Convert ZIP codes to lat/lng coordinates for precise radius-based searches.

Google Gemini AI

Lead Analysis

AI generates comprehensive business summaries highlighting problems and opportunities.

Email Generation & Follow-Up

3 customized email variants per prospect with automated follow-up sequences.

Website Audits

PageSpeed analysis with improvement recommendations for businesses with existing websites.

Competitor Intelligence

Analyzes local competitors to identify market opportunities and strategic talking points.

Key features delivered

Nine feature pillars.

Multi-Mode Search

Three specialized search modes for the leads you need.

  • ZIP code + keyword + radius search
  • Website status classification (17+ platforms)
  • Rating threshold filtering
  • GMB completeness analysis

AI-Powered Outreach

Gemini 2.0 Flash generates personalized content per business.

  • One-click lead analysis summaries
  • 3 customized email variants per prospect
  • Automated follow-up sequences with optimal timing
  • Website audits with PageSpeed analysis
  • Geo-anchored competitor weakness analysis

Proposal PDF Generator

One-click sales-ready proposal PDFs from any qualified lead — closes the loop from search to signed contract.

  • React PDF with brand customization
  • Built on top of AI lead analysis
  • Auto-fills company, services, pricing
  • Downloadable and email-ready

Lead Scoring System

Proprietary algorithm prioritizes the best opportunities.

  • 1-100 numerical score
  • A-F letter grades for quick sorting
  • Multi-factor evaluation
  • Issue detection and highlighting

Saved Searches + Daily Alerts

Set-and-forget prospecting with daily email digests.

  • Persist any search query
  • Daily email digest with matching leads
  • Cron-driven via Resend
  • Unsubscribe and re-tune anytime

Wayback Domain Age

Wayback Machine surfaces domain age — strong intent signal.

  • Domain creation date detection
  • History timeline visibility
  • Cached for performance
  • Visual lead-card badge

Team Collaboration

Enterprise-ready features for agencies of any size.

  • Create teams with unlimited members
  • Shared credit pools
  • Centralized lead management
  • Email invitations with token-based links

Flexible Billing

Credit-based system with subscriptions and one-time packs.

  • 4 subscription tiers (Free to Business)
  • Annual billing with discount
  • One-time credit packs (never expire)
  • Stripe Customer Portal for self-service

Lead Management CRM

Lightweight CRM features for pipeline tracking.

  • 7 status stages (New → Closed Won/Lost)
  • Custom notes on each lead
  • Bulk action updates
  • CSV export
  • Duplicate prevention
The results

Real impact, both sides.

17+
Third-party platforms detected
60
Leads per search (max)
<2s
AI response time
99.9%
Uptime (Vercel SLA)

For users

  • Find 10x more qualified leads in 1/10th the time
  • AI-generated emails save 30+ minutes per prospect
  • Lead scoring ensures focus on best opportunities
  • Team features enable agency-wide collaboration

For business

  • Recurring SaaS revenue model with 4 tiers
  • Low operational costs with serverless architecture
  • Credit-based pricing aligns cost with usage
  • Scalable architecture handles 10x growth
Lessons learned

What we'd tell our past selves.

Start with the AI, not the UI

We built the Gemini AI integration and lead scoring algorithm first, then designed the interface around them. This ensured AI was a core feature, not an afterthought.

Credit systems need atomic transactions

Every credit deduction uses Prisma transactions to prevent race conditions. Critical for the team credit pool feature where multiple users might search simultaneously.

Third-party detection is surprisingly complex

Businesses use dozens of platforms beyond just "no website." We built detection for 17+ platforms — Facebook, Yelp, DoorDash, Toast — each requiring URL pattern matching.

Type everything from day one

100% TypeScript with strict mode caught countless bugs before production. Combined with Prisma's type-safe queries, end-to-end type safety from database to UI.

Built with

Technology stack.

Next.js 15.5TypeScriptGemini 2.0 FlashGoogle Maps PlatformVercelNeon PostgresPrisma 6NextAuth.jsStripeReact PDFResendWayback Machine
Try it live

Want to try SiteBeacon?

Find qualified local leads in minutes. Or contact us to discuss building a similar platform for your business.

Build with us

Want a project like this?

We build production-ready AI applications and SaaS platforms. Let's discuss your next project.