Scraping / README.md
Harshasnade's picture
Add HF Spaces Docker metadata
404e3d0
metadata
title: LeadFlow - Lead Generation
emoji: πŸš€
colorFrom: indigo
colorTo: purple
sdk: docker
app_port: 7860

πŸš€ LeadFlow β€” Lead Generation & Outreach System

A complete system to scrape business leads from Google Maps, manage them via a premium dashboard, and send WhatsApp outreach messages.

Features

  • πŸ” Google Maps Scraper β€” Search any business type in any city
  • πŸ‘₯ Lead Management β€” Full CRUD with search, filter, and sort
  • πŸ’¬ WhatsApp Integration β€” One-click messaging via wa.me links
  • βœ‰οΈ Message Templates β€” Create and manage reusable templates
  • πŸ“Š Dashboard Stats β€” Real-time lead status overview
  • πŸ“„ CSV Export β€” Export all leads for external use
  • πŸ“ Notes & Follow-ups β€” Track conversations and set reminders
  • 🎨 Premium UI β€” Dark glassmorphism theme, fully responsive

Tech Stack

Layer Technology
Backend Python + FastAPI
Database SQLite
Scraper Selenium + Chrome
Frontend HTML / CSS / JS

Prerequisites

  • Python 3.9+
  • Google Chrome (for the Selenium scraper)

Setup & Run

1. Backend

# Navigate to backend directory
cd backend

# Create a virtual environment
python3 -m venv venv
source venv/bin/activate    # On Windows: venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

# Start the server
python main.py

The API server will start at http://localhost:8000
Swagger docs available at http://localhost:8000/docs

2. Frontend

Simply open frontend/index.html in your browser:

open frontend/index.html    # macOS
# or
xdg-open frontend/index.html  # Linux

Or serve it with Python:

cd frontend
python3 -m http.server 3000

Then open http://localhost:3000 in your browser.

Usage

  1. Scrape Leads β€” Enter a search query (e.g., "gym in Mumbai") and click "Start Scraping"
  2. Manage Leads β€” View leads in the table, search/filter, update statuses
  3. Send WhatsApp β€” Click the πŸ’¬ button on any lead with a phone number
  4. Edit Templates β€” Click "Templates" in the header to create/edit message templates
  5. Export Data β€” Click "Export CSV" to download all leads

API Endpoints

Method Path Description
POST /api/scrape Start scraping
GET /api/scrape/status Scraping job status
GET /api/leads List leads (w/ filters)
PUT /api/leads/{id} Update a lead
DELETE /api/leads/{id} Delete a lead
GET /api/leads/export/csv Export to CSV
GET /api/stats Dashboard statistics
GET /api/templates List templates
POST /api/templates Create template
PUT /api/templates/{id} Update template
DELETE /api/templates/{id} Delete template

⚠️ Important Notes

  • WhatsApp messages are user-triggered only (opens in new tab via wa.me links)
  • No automated messaging or spam β€” fully compliant with WhatsApp's terms
  • Google Maps scraping should be used responsibly with reasonable limits
  • The scraper may need periodic updates if Google changes their page structure

License

MIT β€” Free for personal and commercial use.