Lead generation, multi-channel outreach, CRM, and analytics β unified with AI.
Features β’ Architecture β’ Quick Start β’ Tech Stack β’ Modules β’ Deploy
LeadHawk is a production-grade SaaS platform that consolidates a B2B founder's outbound workflow into one AI-driven cockpit. Instead of juggling LinkedIn, Sales Navigator, email tools, a CRM, and an analytics dashboard, LeadHawk fuses all of it into seven tightly integrated modules powered by Google Gemini (with OpenRouter fallback).
Why it exists: Founders and solo sellers waste hours context-switching between tools. LeadHawk replaces that fragmentation with a single, AI-first surface for prospecting, outreach, social growth, and pipeline management.
|
|
LeadHawk is organized around 7 first-class modules, each with its own page, components, and store slice β all unified by a shared AI router and Zustand state.
graph TB
User[π€ User] --> Sidebar[π§ Sidebar Navigation]
Sidebar --> M1[π― Leads]
Sidebar --> M2[π± LinkedIn Growth]
Sidebar --> M3[π¦ X / Twitter Growth]
Sidebar --> M4[π§ Email Sequences]
Sidebar --> M5[πΌ Pipeline / CRM]
Sidebar --> M6[π Analytics]
Sidebar --> M7[π Templates]
M1 --> Store[(Zustand Store<br/>+ localStorage)]
M2 --> Store
M3 --> Store
M4 --> Store
M5 --> Store
M6 --> Store
M7 --> Store
M1 --> AI[π€ /api/ai]
M2 --> AI
M3 --> AI
M4 --> AI
M5 --> AI
AI --> Gemini[Google Gemini 2.5]
AI -.fallback.-> OpenRouter[OpenRouter Models]
Store --> LS[(Browser localStorage)]
User --> Auth[π Supabase Auth]
Page β Component β Zustand action β localStorage
β
/api/ai β Gemini β (fallback) OpenRouter
| # | Module | Route | Purpose |
|---|---|---|---|
| 1 | Leads | /leads |
Filter builder + archetype-based lead briefs + outreach generation |
| 2 | LinkedIn Growth | /linkedin-growth |
Trending topics + post generation + growth plans |
| 3 | X / Twitter Growth | /twitter-growth |
Tweets, threads, and Twitter growth plans |
| 4 | Email Sequences | /sequences |
Multi-step cold email sequences with auto-trigger |
| 5 | Pipeline | /pipeline |
Kanban CRM, bulk import, daily action queue, sequence linking |
| 6 | Analytics | /analytics |
Reply rates, meetings, channel performance |
| 7 | Templates | /templates |
Reusable, variable-aware message library |
|
Frontend
|
State & Data
|
AI & Tooling
|
git clone <repo-url>
cd leadhawk
npm installCreate .env.local:
# Recommended (free tier, generous limits)
GOOGLE_API_KEY=your_gemini_key_here
# Optional fallback (free model cycling)
OPENROUTER_API_KEY=your_openrouter_key_here
OPENROUTER_MODELS=openai/gpt-4o-mini,meta-llama/llama-3-70b-instruct
# Optional Supabase auth
NEXT_PUBLIC_SUPABASE_URL=...
NEXT_PUBLIC_SUPABASE_ANON_KEY=...π Get keys: Gemini Β· OpenRouter
npm run dev # β http://localhost:3000
npm run build # production build
npm start # serve production build
npm run lint # eslint
npm test # vitestleadhawk/
βββ src/
β βββ pages/
β β βββ api/ai.ts # AI router: Gemini β OpenRouter fallback
β β βββ index.tsx # App shell + page routing
β β βββ leads.tsx # Module 1
β β βββ linkedin-growth.tsx # Module 2
β β βββ twitter-growth.tsx # Module 3
β β βββ sequences.tsx # Module 4
β β βββ pipeline.tsx # Module 5
β β βββ analytics.tsx # Module 6
β β βββ templates.tsx # Module 7
β βββ components/
β β βββ layout/ # Sidebar, Header
β β βββ leads/ # FilterBuilder, BriefGenerator, MessageGen
β β βββ linkedin/ # PostGenerator, GrowthPlan
β β βββ twitter/ # TweetGen, ThreadBuilder, GrowthPlan
β β βββ pipeline/ # SequenceDialog, ProgressDisplay, BulkImport, DailyQueue
β β βββ shared/ # ProfileSetup
β βββ lib/
β β βββ types.ts # Single source of truth for data shapes
β β βββ store.ts # Zustand global state + persistence
β β βββ ai.ts # AI generation functions + JSON extractor
β β βββ archetypes.ts # 9 lead archetype profiles
β β βββ topicEngine.ts # Trending topics + 48h TTL
β β βββ auth.tsx # Supabase auth context
β β βββ supabase.ts # Supabase client
β βββ styles/globals.css # Design tokens + utility classes
βββ supabase/ # Supabase config + migrations
βββ CLAUDE.md # AI development guide
βββ PROJECT_OVERVIEW.md # Full project documentation
βββ USER_GUIDE.md # End-user manual
LeadHawk uses an automatic fallback AI router at src/pages/api/ai.ts:
- Google Gemini (primary) β
gemini-2.5-flash, JSON mode supported - OpenRouter (fallback) β cycles through configured models on failure
- Returns detailed, actionable errors when both fail
All client code calls a single callAI(system, user, opts) interface from src/lib/ai.ts, and a robust extractJSON() helper handles markdown fences, leading prose, and partial wrapping returned by models.
- Theme: Dark-first SaaS aesthetic (
#0b1020base,#1e293bcards) - Brand colors:
hawk-*(indigo),accent-*(cyan, emerald, amber, rose) - Fonts: Syne (display), DM Sans (body), JetBrains Mono (code)
- Animations:
fade-in,slide-up,pulse-slow,shimmer - Shadows:
glow-indigo,glow-cyan,card-hover
| Variable | Required | Purpose |
|---|---|---|
GOOGLE_API_KEY |
β * | Google Gemini API key |
OPENROUTER_API_KEY |
β * | OpenRouter fallback API key |
GOOGLE_MODEL |
β | Gemini model ID (default: gemini-2.5-flash) |
OPENROUTER_MODELS |
β | Comma-separated OpenRouter model list |
OPENROUTER_MAX_TOKENS |
β | Token cap for OpenRouter (default: 800) |
NEXT_PUBLIC_SUPABASE_URL |
β | Supabase project URL (auth) |
NEXT_PUBLIC_SUPABASE_ANON_KEY |
β | Supabase anon key (auth) |
NEXT_PUBLIC_APP_URL |
β | App URL for OpenRouter referer header |
NEXT_PUBLIC_APP_NAME |
β | App name for OpenRouter referer header |
* At least one AI provider key is required.
| Phase | Feature | Status |
|---|---|---|
| 1 | Lead Intelligence Engine (9 archetypes) | β |
| 2 | Trending Topics Engine (48h TTL) | β |
| 3 | X / Twitter Module (tweets + threads + plans) | β |
| 4 | Analytics Dashboard | β |
| 5 | Pipeline Sequence Deep Linking | β |
| 6 | Money Features (Bulk Import + Daily Queue + Templates) | β |
| 7 | Polish, QA & Type-safety pass | β |
| 8 | Supabase migrations & sync scaffolding | β |
Recommended: Vercel (zero-config for Next.js).
npm install -g vercel
vercelThen add your environment variables in Vercel β Project β Settings β Environment Variables.
Any host that supports Next.js 14 (Netlify, Render, self-hosted Node) will also work.
- localStorage limits β large datasets may approach browser quotas; production should sync to Supabase DB
- AI cost β Gemini free tier can rate-limit; OpenRouter free models also have caps
- Sales Navigator β requires an active LinkedIn Sales Navigator subscription
- Trending topics β auto-expire after 48 hours; refresh manually before expiry
- Sequence trigger β auto-dialog fires on transition to "contacted" only; manual linking always available
See CLAUDE.md for the full list and architectural notes.
- CLAUDE.md β Development guide & architectural conventions
- PROJECT_OVERVIEW.md β Full project documentation
- USER_GUIDE.md β End-user manual
- DIAGNOSTIC.md β Health checks & troubleshooting
Built with Next.js Β· TypeScript Β· Tailwind Β· Gemini
If LeadHawk helped you ship more outbound, drop a β on the repo.