# leadgen — Tests & Screenshots

Real runs on **2026-06-14**, both editions, against live Google Maps + Notion.
Raw logs are in this folder; the browser screenshot is `maps_results.png`.

## Summary

| Test | Edition | Result | Proof |
|---|---|---|---|
| Build compiles | Go | ✅ `go build ./...` clean | — |
| CLI: version/doctor/fields/connectors | Both | ✅ | `cli_captures.txt` |
| Doctor preflight (internet/Notion/Chrome) | Both | ✅ all green | `cli_captures.txt` |
| 10 coaching centres in Kolkata → Notion | Python | ✅ honest (3 no-website of 38) | `python_coaching_kolkata.txt` |
| 10 coaching centres in Kolkata → Notion | Go | ✅ 10 kept, live to Notion | `go_coaching_kolkata.txt` |
| Cross-edition de-duplication | Go after Python | ✅ `skipped_duplicate: 1` | `go_coaching_kolkata.txt` |
| Apollo field extraction (geo, place id, address, score) | Both | ✅ identical 37-col output | below |
| Browser scrape (what it sees) | — | ✅ screenshot | `maps_results.png` |

## 1. The requested test — "10 coaching centres in Kolkata"

**Go edition** (`--website any`, the full 10):
```
leadgen run --niche "coaching centre" --location "Kolkata" --limit 10 --website any --to notion --json
...
{"event":"summary","niche":"coaching centre","location":"Kolkata","kept":10,"target":10,
 "queued":38,"skipped_filtered":0,"skipped_no_phone":0,"skipped_duplicate":1,
 "connectors":{"notion":"https://www.notion.so/37fcf93efa30810f865de03daa73c510"},"website_filter":"any"}
```
→ **10 coaching centres written to Notion** with live progress + ETA.

**Python edition** (default `--website without`):
```
{"event":"summary","kept":3,"target":10,"queued":38,"skipped_filtered":33,"skipped_no_phone":2,...}
```
→ Only **3 of 38** coaching centres had no website (a website-heavy niche). The
tool reported **3, not a padded 10** — honest by design. Use `--website any` to
include those that have sites (as the Go run did).

## 2. Zero-duplicate guarantee (across editions)
Python wrote its leads first. The Go run, querying the **same** businesses, began
with them already in Notion and reported `skipped_duplicate: 1` — it skipped the
overlap and added only new businesses. Dedupe is enforced against the
destination (Google Place ID → phone → name), so re-running never duplicates.

## 3. Apollo-grade extraction (identical in both editions)
Sample lead (barber, Howrah), 37 columns — same in Python and Go:
```
Name: The Barber Studio   Category: Hair salon   Phone: 07003999067   Has Website: no
Latitude: 22.5771516   Longitude: 88.3299784   Place ID: 0x3a0277f8f8d7dbe9:0xd53d3914b58e7d74
Area: Shibpur   City: Howrah   State: West Bengal   Postal Code: 711101
Rating: 4.7   Reviews: 84   Region: India   Lead Score: 82
Tags: barber, howrah, no-website, top-rated, established
```
Fields Apollo doesn't have for a local business: geo-coordinates, Place ID,
rating, review count, hours, photos, Lead Score.

## 4. Live progress (streamed, with ETA)
Both editions stream `progress` events (and a human bar) showing kept/target,
listings scanned, elapsed, ETA, and the business currently being read — e.g.:
```
{"event":"progress","kept":8,"target":10,"inspected":8,"queued":38,"percent":80,"elapsed_s":68.6,"eta_s":17.1,"current":"Calcutta institute of competitive studies …"}
```

## 5. Screenshot
`maps_results.png` — a live capture of the Google Maps results the engine reads
for "coaching centre in Kolkata" (results list + map pins).

## Reproduce
```bash
# Go
go/leadgen run --niche "coaching centre" --location "Kolkata" --limit 10 --website any --to notion --json
# Python
python -m leadgen_maps run --niche "coaching centre" --location "Kolkata" --limit 10 --to notion --json
```
