Skip to content

Devansh-365/competitorfinder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Competitor Finder

Find competitors for any business across JustDial, IndiaMART & Google Maps — all at once.

Add a company, let AI generate search queries, and get a full list of competing businesses with contact details, products, and more.

Getting Started · How It Works · Tech Stack


How It Works

Competitor Finder Flow

Step What Happens
1 Add your company — enter business details or bulk import from Excel
2 AI generates targeted search queries based on your company's profile
3 All 3 platforms are scraped in parallel — JustDial, IndiaMART, Google Maps
4 View competitors in a table, export to Excel or Google Sheets

Data Extracted

Field JustDial IndiaMART Google Maps
Business Name
Phone Number(s)
Email ⚠️
Address / City / Pincode
GST Number ⚠️
Products & Services
Rating / Reviews ⚠️

✅ Reliably extracted · ⚠️ When available


Setup

Prerequisites

  • Node.js 18+
  • Supabase account (PostgreSQL)
  • OpenAI API key

Install

# Server
cd server
npm install
npx playwright install chromium
npx puppeteer browsers install chrome

# Client
cd ../client
npm install

Environment Variables

Copy .env.example.env in both client/ and server/ directories.

Client client/.env
Variable Purpose
ADMIN_USERNAME / ADMIN_PASSWORD Login credentials
NEXT_PUBLIC_SUPABASE_URL Supabase project URL
NEXT_PUBLIC_SUPABASE_ANON_KEY Supabase anon key
SUPABASE_SERVICE_ROLE_KEY Supabase service role key
OPENAI_API_KEY AI query generation
RAILWAY_API_URL Server URL (default: http://localhost:4000)
RAILWAY_WEBHOOK_SECRET Shared secret for webhook auth
NEXT_PUBLIC_APP_URL Client URL (default: http://localhost:3000)
Server server/.env
Variable Purpose
PORT Server port (default: 4000)
WEBHOOK_SECRET Must match RAILWAY_WEBHOOK_SECRET

Database

Run the SQL migrations in your Supabase SQL editor to create the clients, competitors, and scrape_jobs tables.

Run

# Terminal 1 — Server
cd server && npm run dev

# Terminal 2 — Client
cd client && npm run dev

Open http://localhost:3000 and log in.


Tech Stack

Technology
Frontend Next.js 16 · React 19 · TypeScript · shadcn/ui · TanStack Table
Backend Express.js · TypeScript
Scraping Puppeteer + Stealth Plugin · Playwright
Database Supabase (PostgreSQL)
AI OpenAI GPT-4o mini · Vercel AI SDK

Troubleshooting

Chromium not found
cd server
npx playwright install chromium
npx puppeteer browsers install chrome
No results from Google Maps

Google has stricter bot detection. Try increasing delays in google-maps-scraper.ts or run with headless: false to debug.

JustDial phone numbers missing

Phone numbers are behind "Show Number" buttons. Check console logs for click failures — modal selectors may have changed.


MIT License

Built with TypeScript, Next.js, Puppeteer, Playwright & Supabase

Built by Devansh Tiwari

Releases

No releases published

Packages

 
 
 

Contributors