Skip to content

M3GA-MAK3R/lead-gen-umbrella

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Buyer Intent Lead Generation dApp

A modern, full-featured B2B/B2C lead generation platform built with React 18, client-side search, OpenStreetMap geo-targeting, and Framer Motion animations. Optimized for Horizons browser-based deployment.

πŸš€ Features

Core Functionality

  • Client-Side Search: Fast, responsive search across leads, packages, and niches (no external API needed)
  • Geo-Targeting: Interactive OpenStreetMap with radius slider (10-500km) for location-based lead discovery
  • Lead Capture: B2B and B2C lead capture forms with intent scoring
  • E-Commerce Style Browsing: Filterable lead packages by industry, niche, budget, and intent score
  • Federated Results: Unified search results across multiple collections
  • Dashboard: Comprehensive lead management with analytics, export (CSV/JSON), and intent distribution charts
  • Dark Theme: Modern dark UI with Tailwind CSS and shadcn/ui components
  • Persistent Storage: localStorage-based data persistence

Technical Stack

  • Frontend: React 18.2.0, React Router 6, TypeScript
  • Styling: TailwindCSS 3.3.2, shadcn/ui components, Lucide icons
  • Animations: Framer Motion
  • Search: Client-side filtering with localStorage
  • Maps: Leaflet + React Leaflet + OpenStreetMap
  • Charts: Recharts for analytics
  • Build: Vite
  • Deployment: Horizons-compatible (no Docker, no external APIs)

πŸ“‹ Project Structure

windsurf-project-2/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ ui/
β”‚   β”‚   β”‚   β”œβ”€β”€ Button.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Input.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Card.tsx
β”‚   β”‚   β”‚   └── Tabs.tsx
β”‚   β”‚   β”œβ”€β”€ InteractiveMap.tsx
β”‚   β”‚   β”œβ”€β”€ TypesenseSearch.tsx
β”‚   β”‚   β”œβ”€β”€ LeadCaptureForm.tsx
β”‚   β”‚   β”œβ”€β”€ LeadPackagesBrowser.tsx
β”‚   β”‚   └── LeadsDashboard.tsx
β”‚   β”œβ”€β”€ pages/
β”‚   β”‚   β”œβ”€β”€ Home.tsx
β”‚   β”‚   β”œβ”€β”€ Search.tsx
β”‚   β”‚   β”œβ”€β”€ Packages.tsx
β”‚   β”‚   └── Dashboard.tsx
β”‚   β”œβ”€β”€ lib/
β”‚   β”‚   β”œβ”€β”€ typesense.ts (Typesense client & utilities)
β”‚   β”‚   └── utils.ts (Helper functions & constants)
β”‚   β”œβ”€β”€ App.tsx
β”‚   β”œβ”€β”€ main.tsx
β”‚   └── index.css
β”œβ”€β”€ Dockerfile
β”œβ”€β”€ docker-compose.yml
β”œβ”€β”€ package.json
β”œβ”€β”€ vite.config.ts
β”œβ”€β”€ tsconfig.json
β”œβ”€β”€ tailwind.config.js
β”œβ”€β”€ postcss.config.js
└── README.md

πŸ› οΈ Installation & Setup

Prerequisites

  • Node.js 18+
  • Docker & Docker Compose (for containerized deployment)
  • Typesense instance (local or cloud)

Local Development

  1. Clone the repository

    cd /Users/oniasbrown/CascadeProjects/windsurf-project-2
  2. Install dependencies

    npm install
  3. Configure environment variables

    cp .env.example .env.local

    Update .env.local with your Typesense credentials:

    REACT_APP_TYPESENSE_HOST=localhost
    REACT_APP_TYPESENSE_PORT=8108
    REACT_APP_TYPESENSE_PROTOCOL=http
    REACT_APP_TYPESENSE_API_KEY=xyz
    
  4. Start Typesense (if running locally)

    docker run -p 8108:8108 -v typesense_data:/data typesense/typesense:latest
  5. Start development server

    npm run dev

    Access at http://localhost:5173

Docker Deployment

  1. Build and run with Docker Compose

    docker-compose up --build
    • App: http://localhost:5173
    • Typesense: http://localhost:8108
  2. Production build

    npm run build
    docker build -t buyer-intent-app .
    docker run -p 5173:5173 buyer-intent-app

πŸ“Š Typesense Collections Schema

b2b_leads

{
  "id": "string",
  "company_name": "string",
  "industry": "string (facet)",
  "location": "string (facet)",
  "budget": "int32",
  "intent_score": "int32 (facet)",
  "contact_email": "string",
  "contact_phone": "string",
  "created_at": "int64"
}

b2c_leads

{
  "id": "string",
  "name": "string",
  "service_category": "string (facet)",
  "location": "string (facet)",
  "budget": "int32",
  "intent_score": "int32 (facet)",
  "email": "string",
  "phone": "string",
  "created_at": "int64"
}

packages

{
  "id": "string",
  "name": "string",
  "industry": "string (facet)",
  "niche": "string (facet)",
  "price": "int32",
  "lead_count": "int32",
  "intent_threshold": "int32",
  "description": "string",
  "created_at": "int64"
}

geo_locations

{
  "id": "string",
  "city": "string (facet)",
  "state": "string (facet)",
  "country": "string (facet)",
  "latitude": "float",
  "longitude": "float",
  "lead_density": "int32",
  "created_at": "int64"
}

🎯 Usage Guide

Home Page

  • Overview of platform features
  • Quick links to search, packages, and dashboard
  • Call-to-action buttons

Search Page

Three tabs:

  1. Search Tab: Semantic/hybrid search across all collections

    • Natural language queries: "HVAC leads Richmond VA"
    • Federated results showing leads, packages, case studies
  2. Geo-Target Tab: Location-based lead discovery

    • Interactive map with click-to-set location
    • Radius slider (10-500km)
    • Geolocation button
  3. Capture Tab: Lead capture forms

    • B2B form (company details)
    • B2C form (consumer details)
    • Auto-calculated intent scores

Packages Page

  • Browse pre-curated lead packages
  • Filter by industry, budget, intent score
  • Sort by rating, price, or lead count
  • E-commerce style card layout
  • Multi-select and checkout

Dashboard

  • Statistics: Total leads, avg intent score, total budget, high-intent count
  • Analytics: Intent score distribution chart
  • Lead Table: Full lead management with:
    • Bulk selection
    • Export to CSV/JSON
    • View/delete actions
    • Intent score color coding

πŸ”Œ API Integration

Typesense Search

import { searchLeads, addLead, exportLeads } from '@/lib/typesense'

// Search leads
const results = await searchLeads('HVAC Richmond', 'b2b_leads')

// Add new lead
await addLead({
  company_name: 'Acme Corp',
  industry: 'HVAC',
  location: 'Richmond, VA',
  budget: 5000,
  contact_email: 'contact@acme.com',
  contact_phone: '+1 (555) 123-4567'
}, 'b2b_leads')

// Export leads
const csv = await exportLeads('b2b_leads', 'csv')

OpenStreetMap Integration

<InteractiveMap
  onLocationChange={(lat, lon, radius) => {
    console.log(`Location: ${lat}, ${lon}, Radius: ${radius}km`)
  }}
  initialLat={37.7749}
  initialLon={-122.4194}
  initialRadius={50}
/>

🎨 Customization

Dark Theme Colors

Edit src/index.css CSS variables:

:root {
  --background: 0 0% 3.6%;
  --foreground: 0 0% 98%;
  --primary: 0 84.2% 60.2%;
  /* ... more colors ... */
}

Industries & Niches

Update src/lib/utils.ts:

export const INDUSTRIES = [
  'HVAC', 'Plumbing', 'Electrical', 'Roofing',
  // Add more...
]

πŸ“¦ Build & Deployment

Build for Production

npm run build

Output: dist/ directory

Deploy to Hostinger Horizons

  1. Build the application
  2. Use provided Dockerfile
  3. Push to container registry
  4. Deploy via Hostinger dashboard
  5. Set environment variables in deployment settings

Environment Variables for Production

REACT_APP_TYPESENSE_HOST=your-typesense-host.com
REACT_APP_TYPESENSE_PORT=443
REACT_APP_TYPESENSE_PROTOCOL=https
REACT_APP_TYPESENSE_API_KEY=your_production_key

πŸ” Security Considerations

  • API keys stored in environment variables (never in code)
  • HTTPS recommended for production
  • Typesense API key should be restricted to read-only operations
  • CORS configured for allowed origins
  • Input validation on all forms

πŸ“ˆ Performance Optimization

  • Code splitting with React Router
  • Lazy loading of components
  • Memoization of expensive computations
  • Image optimization
  • CSS minification via Tailwind
  • JavaScript minification via Vite

πŸ› Troubleshooting

Typesense Connection Issues

  • Verify Typesense is running: http://localhost:8108/health
  • Check API key in .env.local
  • Ensure CORS is enabled if using cloud Typesense

Map Not Loading

  • Verify Leaflet CSS is loaded in index.html
  • Check browser console for errors
  • Ensure OpenStreetMap tiles are accessible

Search Not Working

  • Verify collections are initialized
  • Check Typesense API key
  • Ensure data is indexed in Typesense

πŸ“ License

MIT License - feel free to use for commercial projects

🀝 Support

For issues or questions:

  1. Check the troubleshooting section
  2. Review Typesense documentation: https://typesense.org/docs/
  3. Check React Router docs: https://reactrouter.com/
  4. Leaflet docs: https://leafletjs.com/

πŸš€ Future Enhancements

  • Real-time lead notifications
  • Advanced analytics dashboard
  • CRM integration (Salesforce, HubSpot)
  • Email campaign builder
  • A/B testing for lead capture forms
  • Mobile app (React Native)
  • AI-powered lead scoring
  • Webhook support for integrations
  • Multi-language support
  • Advanced permission system

Built with ❀️ for lead generation professionals

About

Buyer Intene Lead Generation Platform - AI-powered B2B/B2C lead generation with Smart feed algorithm via typesense

https://www.opentools.studio Ex-lead

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors