Turn Google Maps Data Into Real Business Leads Find websites, emails, and business contacts from Google Maps in minutes.
Open-source AI-powered GTM automation platform
Find leads Β· Score them with AI Β· Generate personalized outreach Β· Close deals
Prospex is a self-hosted, open-source platform that combines lead discovery, AI-powered outreach generation, and CRM management in one dashboard.
Think Apollo.io + Instantly.ai β but open-source, self-hosted, and free.
| Module | Description |
|---|---|
| Lead Discovery | Scrape Google Maps with AI-powered lead scoring |
| AI Content Engine | Personalized Email, WhatsApp, Instagram DM, LinkedIn, Cold Call scripts per lead |
| Campaign Manager | Multi-query batch campaigns with real-time progress tracking |
| CRM Pipeline | Full lead lifecycle: New β Contacted β Replied β Won/Lost |
| Analytics | Conversion funnel, industry breakdown, campaign ROI |
| Export | Download leads as CSV, JSON, or vCard |
| API | REST API with Swagger docs + API key management |
| Layer | Technology |
|---|---|
| Frontend | Next.js 16, App Router, shadcn/ui, Tailwind CSS, Recharts |
| Backend | NestJS 10, Prisma ORM, REST API |
| Database | PostgreSQL 16 |
| Queue | BullMQ + Redis 7 |
| AI | OpenAI SDK (supports OpenRouter & Ollama) |
| Monorepo | Turborepo + pnpm workspaces |
| Deploy | Docker Compose |
git clone https://github.com/asiifdev/business-leads-ai-automation.git
cd business-leads-ai-automation
pnpm installcp .env.example apps/api/.env
cp .env.example packages/database/.envEdit apps/api/.env with your values:
DATABASE_URL="postgresql://prospex:yourpassword@localhost:5432/prospex"
OPENAI_API_KEY=sk-your-key-here # or leave empty for mock AI
OPENAI_MODEL=gpt-4o-mini
# Optional: use OpenRouter or Ollama
# OPENAI_BASE_URL=https://openrouter.ai/api/v1docker compose up -d # starts PostgreSQL + Redis
pnpm --filter @prospex/database db:push # push schema
pnpm --filter @prospex/database exec prisma generate# Terminal 1 β API (port 3001)
pnpm --filter @prospex/api dev
# Terminal 2 β Dashboard (port 3000)
pnpm --filter @prospex/web devOpen http://localhost:3000 and you're in.
Swagger API docs: http://localhost:3001/api/docs
prospex/
βββ apps/
β βββ web/ # Next.js 16 dashboard
β βββ api/ # NestJS REST API
β βββ marketing/ # Landing page
βββ packages/
β βββ database/ # Prisma schema + migrations
β βββ types/ # Shared TypeScript types
β βββ config/ # Shared eslint/tsconfig
βββ docker-compose.yml # Local dev (PostgreSQL + Redis)
βββ docker-compose.prod.yml # Production stack
βββ nginx.conf # Nginx reverse proxy config
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/health |
Health check |
GET/POST |
/api/campaigns |
List / create campaigns |
GET/PATCH/DELETE |
/api/campaigns/:id |
Campaign detail / update / delete |
POST |
/api/scraper/campaigns/:id/start |
Start scraping + AI pipeline |
GET |
/api/leads |
List leads (filter by ?campaignId=) |
PATCH |
/api/leads/:id/crm |
Update CRM status |
GET |
/api/analytics |
Overview stats |
GET |
/api/analytics/industries |
Leads by industry |
GET |
/api/export/leads/csv |
Export leads as CSV |
GET |
/api/export/leads/json |
Export leads as JSON |
GET |
/api/export/leads/vcard |
Export leads as vCard |
GET/POST/DELETE |
/api/settings/api-keys |
API key management |
GET/POST |
/api/settings/integrations |
Integration config |
Full interactive docs at /api/docs (Swagger).
Prospex supports any OpenAI-compatible AI provider:
OpenRouter (access Claude, Gemini, Llama, etc.):
OPENAI_API_KEY=sk-or-your-openrouter-key
OPENAI_BASE_URL=https://openrouter.ai/api/v1
OPENAI_MODEL=anthropic/claude-haiku-4-5Ollama (local, fully offline):
OPENAI_API_KEY=ollama
OPENAI_BASE_URL=http://localhost:11434/v1
OPENAI_MODEL=llama3.2cp .env.example .env
# Edit .env with production values (strong passwords, real API key)
docker compose -f docker-compose.prod.yml up -dThis starts: PostgreSQL + Redis + NestJS API + Next.js + Nginx.
pnpm install # install all dependencies
pnpm dev # start all apps (requires turbo)
pnpm build # build all apps
pnpm --filter @prospex/database db:studio # Prisma Studio (DB browser)- Fix: search queries now combine each campaign's search term with every area in its
locationfield (split on commas) before scraping β previouslylocationwas stored but never sent to the scraper, so results could drift to the scraping server's IP-based region instead of the requested cities. - Feature: leads now capture
lat/lngcoordinates (parsed from the scraped Google Maps place URL) and store them on theLeadmodel. - Feature: campaign detail page has a new "Map" tab with a Leaflet-based lead map (custom priority-colored markers, auto-fit bounds, popups linking to lead detail) alongside the existing "List" view.
- Fix: scraping progress no longer gets stuck at 0% β the scraper now reports incremental progress per search query/area combo while scraping runs (previously progress only updated before scraping started and after it fully finished, so long-running scrapes appeared frozen).
- Fix: campaign and lead list polling (every 2s while a campaign is running) no longer flashes the whole page back to a loading skeleton on every refresh β only the initial fetch shows the skeleton, so live progress/lead updates render smoothly.
- Fix: lead scoring/ordering no longer ranks by raw star rating alone (a 5.0β lead with 1 review could previously outrank a 4.5β lead with thousands of reviews). Review count is now scraped and stored, and rating contribution to the score uses a Bayesian average (weighted toward a neutral 4.0β prior by review volume) so low-review, high-star leads no longer unfairly beat well-reviewed ones.
MIT β see LICENSE.