Objective & Business Rationale Sales teams waste time on bad or duplicate contacts. Under a strict 5-hour cap, I prioritized lead quality (to cut bounce and save SDR time) and throughput (to process more lists fast). The product outputs a clean, validated, de-duplicated, and scored list that’s ready for CRM via one-click export.
Main Dashboard with Lead Generation Interface
Lead Results Table with Filtering and Export Options
- Validation: Email format check (regex) + DNS MX lookup (deliverability signal).
- Deduplication: By
email
(fallback:domain+name
). - Scoring (rule-based): Boost senior roles (Founder/CEO/VP Sales/Head of Growth), good TLDs (
.com
,.io
,.ai
), and non-generic mailboxes; penalize flags. - Smart Filters: Senior roles only; Good TLDs; free-text search; sortable table.
- Analytics: Total leads, Valid (format), No-MX count, Duplicates, Average Score.
- Export: Filtered CSV (or All) for instant SDR handoff.
- URL List Checker: Single HEAD/GET per URL (robots-friendly), parse title/meta, extract
mailto:
; then run the same quality pipeline. - CSV Header Mapper & Normalizer: Align arbitrary headers to the canonical schema; trim/lowercase; flag missing columns.
- Saved Filter Presets: e.g., Decision Makers + Good TLDs for repeatable targeting.
- Quick Stats Generator: Batch KPIs (valid %, no-MX %, dupes removed) for easy reporting.
- Input: Sector/company keywords (e.g., “SaaS startup, fintech, AI tools”).
- Behavior: Seed candidate domains (demo/mock or user-provided), then Normalize → Validate (format+MX) → Dedup → Score → Filter → Export.
- Best for: Early discovery when you don’t yet have a list.
API sketch
POST /api/scrape
{ "keyword": "SaaS startup, fintech" }
→ { "leads": [ { "name": "...", "company": "...", "domain": "...", "email": "..." } ] }
- Input: Homepages/profile URLs.
- Behavior: Single-page check (status/title/meta/
mailto:
) → then Validate, Dedup, Score, Filter, Export. - Best for: Fast triage of known companies without aggressive crawling.
API sketch
POST /api/scrape
{ "urls": ["https://acme.io", "https://contoso.com"] }
→ { "leads": [ { "company": "Acme", "domain": "acme.io", "email": "info@acme.io" } ] }
- Input: Existing list (emails/domains/names/roles).
- Behavior: Header Mapper → Normalize → Validate (format+MX) → Dedup → Score → Filter → Export (Filtered/All).
- Best for: Quickly cleaning and prioritizing third-party lists.
Canonical schema
name | role | company | domain | email | (optional: source, industry, country)
Quality gates applied to all three: Validation (regex + MX), Dedup, Scoring, Smart Filters, Export.
Input (Keyword/URLs/CSV) → Normalize/Map → Validate (format + MX) → Dedup → Score → Filter/Sort → Export CSV
- Single Next.js + TypeScript app (UI + API Routes) for rapid demo/deploy.
- Composable helpers:
validate
,dedup
,score
,export
. - MX used as a deliverability signal; SMTP ping intentionally omitted for speed and ethics.
Data model
{ name?, role?, company?, domain?, email?, source?, industry?, score?, flags?: string[] }
flags
: invalid_format
, no_mx
, duplicate
.
- Health cards: Total, Valid (format), No-MX, Duplicates, Avg Score (with % bars).
- Inline badges next to emails:
Valid
,MX
. - Smart Filters: Senior roles, Good TLDs, free-text; column sorting.
- Export Filtered: Keeps SDRs focused on the highest-intent subset.
- (Optional) Saved presets for one-click repeatability.
- 9 total leads, Valid (format): 9 = 100%, No-MX: 4 (44.4%), Duplicates: 0, Avg Score: 74/100.
- Time-to-CSV: seconds for ~100–300 rows.
- Outcome: Cleaner lists, clearer prioritization, and faster handoff to outreach.
- No aggressive crawling; uses user-provided inputs and single-page checks (respect ToS/robots).
- MX is strong but not definitive; SMTP validation is out of scope for this sprint.
- No CAPTCHA/anti-bot handling (can be added later with rate-limits/rotations).
- Optional SMTP verification (rate-limited) + bounce learning loop.
- Open-source enrichment (industry/location) for better scoring.
- Direct CRM exporters (HubSpot/Pipedrive) & webhooks.
- Scoring calibration using reply/bounce labels over time.
- Stack: Next.js, TypeScript, DNS MX check, CSV util.
- GitHub:
- Demo Video (1–2 min):
Design choice: Quality-First increases conversion efficiency; Quantity-Driven adds lightweight utilities to maximize usable output—together delivering immediate sales impact within a 5-hour build.
A modern, AI-powered lead generation application built with Next.js, TypeScript, and Tailwind CSS. This application allows users to scrape, validate, deduplicate, filter, and export leads with an intuitive and beautiful user interface.
- Web Scraping: Extract leads from websites using keywords or specific URLs
- CSV Upload: Import existing lead data from CSV files
- Email Validation: Comprehensive email validation including format checking and MX record verification
- Lead Scoring: AI-powered scoring system to rank lead quality
- Deduplication: Automatic removal of duplicate leads based on email addresses
- Advanced Filtering: Filter leads by status, score, company, and more
- Export: Export filtered leads to CSV format
- Modern Design: Clean, responsive interface with gradient backgrounds and smooth animations
- Real-time Stats: Live statistics showing lead quality metrics
- Interactive Tables: Sortable and filterable lead tables with bulk actions
- Smart Filters: Expandable filter panel with search and quick filters
- Loading States: Beautiful loading indicators and error handling
- Framework: Next.js 14 with App Router
- Language: TypeScript
- Styling: Tailwind CSS
- UI Components: Custom components with Heroicons
- State Management: React hooks (useState, useCallback)
- API: Next.js API routes
- Email Validation: Custom validation with DNS MX record checking
-
Clone the repository
git clone <repository-url> cd leadgen
-
Install dependencies
npm install
-
Run the development server
npm run dev
-
Open your browser Navigate to http://localhost:3000
- Keyword Search: Enter keywords to scrape leads from various sources
- URL Scraping: Provide specific URLs to extract contact information
- CSV Upload: Upload existing lead data in CSV format with drag and drop support
The application automatically processes leads through the following pipeline:
- Scraping/Import: Collect lead data from various sources
- Validation: Verify email addresses and check MX records
- Scoring: Calculate lead quality scores based on multiple factors
- Deduplication: Remove duplicate entries based on email addresses
- View Statistics: Monitor lead quality metrics in real-time
- Apply Filters: Use advanced filters to find specific leads
- Sort Data: Sort leads by name, company, email, score, or date
- Bulk Actions: Select multiple leads for bulk operations
- CSV Export: Export filtered leads to CSV format
- Automatic Naming: Files are automatically named with timestamps
- UTF-8 Encoding: Proper encoding for international characters
src/
├── app/
│ ├── api/
│ │ ├── scrape/route.ts # Lead scraping API
│ │ ├── validate/route.ts # Email validation API
│ │ ├── dedup/route.ts # Deduplication API
│ │ └── export/route.ts # Export API
│ ├── globals.css # Global styles
│ ├── layout.tsx # Root layout
│ └── page.tsx # Main application page
├── components/
│ ├── UploadArea.tsx # Data input component
│ ├── QuickStats.tsx # Statistics display
│ ├── FiltersBar.tsx # Filtering interface
│ └── LeadTable.tsx # Lead data table
├── lib/
│ ├── email.ts # Email validation utilities
│ ├── scoring.ts # Lead scoring algorithms
│ ├── csv.ts # CSV processing utilities
│ └── utils.ts # General utilities
└── types/
└── lead.ts # TypeScript type definitions
Scrape leads from keywords or URLs
{
"keyword": "software company",
"urls": ["https://example.com"]
}
Validate email addresses and check MX records
{
"leads": [/* array of lead objects */]
}
Remove duplicate leads
{
"leads": [/* array of lead objects */],
"key": "email"
}
Export leads to CSV format
{
"leads": [/* array of lead objects */],
"format": "csv"
}
The application uses Tailwind CSS for styling with:
- Gradient Backgrounds: Beautiful gradient overlays
- Smooth Animations: Hover effects and transitions
- Responsive Design: Mobile-first responsive layout
- Modern Components: Clean, professional interface elements
- Color Coding: Visual indicators for lead quality and status
The application includes:
- Mock Data Generation: Realistic test data for development
- Error Handling: Comprehensive error states and messages
- Loading States: Proper loading indicators throughout the app
- Edge Case Handling: Validation for empty states and invalid inputs
The application is ready for deployment on Vercel:
-
Connect to Vercel
vercel
-
Configure Environment
- No additional environment variables required for basic functionality
- Add any API keys for real web scraping services if needed
-
Deploy
vercel --prod
- Real Web Scraping: Integration with actual web scraping services
- XLSX Export: Support for Excel file format
- Email Templates: Lead outreach email templates
- CRM Integration: Connect with popular CRM systems
- Advanced Analytics: Detailed lead analytics and reporting
- Team Collaboration: Multi-user support and sharing