DEV Community

LeadHunting AI
LeadHunting AI

Posted on Originally published at leadhunting.app

LeadHunting AI: How I Built an Autonomous Real Estate Lead Gen Platform for $0

LeadHunting AI: Autonomous Real Estate Lead Generation for $0

The Problem

Real estate agents spend hours every day on lead generation — cold calling, following up, writing marketing content, posting on social media. It is repetitive, time-consuming, and takes them away from what they do best: closing deals.

I wanted to build a platform that handles all of this autonomously, using only free-tier APIs, so that any agent could afford it.

The Solution: LeadHunting AI

LeadHunting AI is an autonomous 24/7 AI-powered real estate lead generation platform. Here is how it works:

1. Autonomous Content Pipeline

The system auto-generates blog posts, images, audio, and video using Google AI Studio (free tier):

  • Text: Gemini Flash generates SEO-optimized blog posts about real estate topics
  • Images: Imagen 3 creates cover images for each post
  • Audio: Google TTS creates MP3 narrations
  • Video: Veo 2 creates video clips (async — polled later)
  • Social: Auto-posts to LinkedIn, Twitter, Facebook with policy compliance

All of this runs on free-tier APIs. Total cost: $0/month.

2. AI-Powered Lead Scoring

Every lead is scored on a 0-100 scale based on:

  • Lead type (buyer, seller, investor, CMA, tenant)
  • Phone number presence
  • TCPA consent
  • Time of day
  • Source channel

High-scoring leads are auto-qualified; low-scoring leads are marked lost.

3. Credit Billing System

The platform uses a credit-based billing model:

  • Admin uses the $0 free tier (Google AI Studio)
  • Users pay credits for AI generation (500%+ margin)
  • Credits are purchased via Stripe (dynamic pricing via price_data)
  • Atomic credit deduction with auto-refund on failure

4. Compliance Engine

Built-in compliance for:

  • CAN-SPAM: Unsubscribe link + physical address in every email
  • TCPA: Consent tracking + audit trail
  • GDPR: Data portability (JSON export) + right to erasure
  • Platform Policies: Rate limits for 9 social platforms

Tech Stack

Layer Technology
Frontend Next.js 16, React 18, TypeScript, Tailwind CSS
UI shadcn/ui component library
Backend Prisma ORM, Supabase PostgreSQL
AI Google AI Studio (Gemini Flash, Imagen 3, Veo 2, TTS)
Payments Stripe (dynamic pricing)
Deployment Vercel (free Hobby plan)
Auth JWT with session invalidation

Key Architecture Decisions

1. SPA + Serverless

The app uses a SPA-like architecture with Next.js App Router. Marketing pages are server-rendered for SEO; the dashboard is client-rendered for interactivity.

2. Built-in Cron Scheduler

No external cron service. A heartbeat endpoint (/api/cron/heartbeat) is triggered by real user traffic. Every page visit runs the scheduler, which fires overdue tasks (content pipeline, social posting, email sequences, etc.).

3. Fire-and-Forget with Keepalive

Background tasks use fetch with keepalive: true to trigger long-running operations (like the content pipeline) without blocking the heartbeat response. The pipeline runs in its own 60-second serverless function.

4. Silent Islamic Values Filter

All image generation uses a sanitizePromptForImageGeneration() function that enforces modest attire and male subjects only — without notifying users. This is a silent filter that aligns with the founder'''s values.

Results

  • Traffic Goal: 1 million visitors/month (driven by autonomous content pipeline)
  • Content Output: 4 blog posts/day (every 6 hours)
  • Cost: $0/month (all free-tier APIs)
  • Revenue: Credit billing at 500%+ margin

Try It

Visit leadhunting.app to start a 7-day free trial. No credit card required.


This article was originally published on leadhunting.app.

Discussion

Have you built autonomous content pipelines before? What free-tier APIs do you use? Let me know in the comments!

Top comments (0)