LeadGen
Local desktop lead-research tooling that combines Playwright automation, structured review, local storage, and Ollama-assisted pitch generation.
Local-first research automation that exposes run state, records, source health, and authorization boundaries.
The scan path exposes source-by-source progress, retries, fallbacks, and local record normalization.
Records stay inspectable in a local CRM instead of being treated as final truth after collection.
Payment webhooks, admin checks, and account-state changes are treated as server-side enforcement problems.
Local run dashboard
Scanner: Home Services / Miami Florida
Run state: 1 active scan, 70 CRM records
Sources: Yellow Pages, Yelp, Manta, Bing Places, Google Maps
Security: internalMutation webhook boundary, role checks, timing-safe bearer comparison
Local assist: Ollama pitch angle generation
LeadGen: Local Research Automation
LeadGen is a local research dashboard for collecting and reviewing public business information. It is built around a practical workflow: choose a niche and city, run browser-driven source collection, normalize records, review them locally, and optionally generate outreach angles with Ollama.
The point is not "scraping" as a buzzword. The point is a repeatable operator workflow with logs, source status, local records, and reviewable output.
Problem
Manual lead research is repetitive and hard to audit. A person can find businesses one by one, but the process gets messy fast: duplicate sources, inconsistent names, missing websites, dead pages, and no clean run history.
LeadGen turns that into a local scan and review loop.
What I Built
- Scanner dashboard: Niche, city, suburb, proxy, and model controls for launching research runs.
- Playwright automation: Browser-driven source collection for public directories and map/search sources.
- Local review CRM: A table of normalized records with phone, source, city, score, status, website status, notes, and tags.
- Analytics: Source performance, city performance, scan history, hit rate, and total lead summaries.
- Local AI assist: Ollama-backed pitch angle generation so review help can stay on the machine.
- Security architecture: Payment webhooks, admin operations, and account-state changes are handled as explicit trust-boundary decisions instead of default route plumbing.
Security Architecture
LeadGen has a small but real security architecture around payment events, admin actions, and account status.
- Webhook-to-database boundary:
internalMutationis the trust boundary between HTTP webhooks and database writes. The public webhook receives and verifies the external event; the internal mutation owns the state change. - Server-side admin checks: Admin operations perform role checks on the server for each action. They do not rely only on route-level guards or hidden UI controls.
- Payment webhook verification: The payment webhook uses timing-safe bearer token comparison so token validation does not leak useful comparison timing.
- Chargeback escalation: Chargebacks move through explicit account status states instead of a loose boolean flag, which makes account restrictions and review paths easier to audit.
Constraints
- Public sources behave differently and can rate-limit, time out, or return empty results.
- Browser automation needs cancellation, logging, and recovery when navigation fails.
- The operator still needs review control; raw automated output should not be treated as final truth.
- Local-first storage keeps the work inspectable and avoids sending every record to a hosted model.
- Webhook handlers should verify external input before invoking internal database mutations.
- Admin tools should keep server-side authorization checks close to the mutation or action being performed.
Proof Artifacts
The project includes screenshots of the scanner view, live feed, CRM table, analytics, duplicate review, and generated pitch angle. The visible run logs show source-by-source progress, failures, fallbacks, and normalized output instead of hiding the automation behind a vague success message.
Example proof shown in the interface:
- Home Services in Miami Florida scan.
- 70 total leads in the CRM.
- Yellow Pages source performance.
- Local status labels for "new" and "No website."
- Ollama-ready model control.
Tradeoffs
The system favors local review and traceability over invisible automation. That means the UI exposes messy source behavior: timeouts, empty responses, and navigation failures. For a research tool, that is useful because the operator can see what actually happened during the run.
Technical Direction
The next useful improvements are better deduplication, source configuration, richer run replay, and a clearer review workflow for turning discovered records into outreach-ready batches.