MB
← All case studies
03Data product · full-stack

An audit platform built to sell engagements

Whole-site SEO crawls where every finding ships with the artifact that proves it — file:line:col, the snippet, the selector — and the score publishes its own error bar.

PythonPlaywrightpydanticNext.js 16TypeScriptzodTailwind
Private – available on request for verified hiring partners

172

tests (118 pytest + 54 node)

33 × 5

checks across weighted categories

0.827

Pearson r vs Lighthouse (calibrated)

6

stage verify gate, one command

The problem

SEO consulting runs on trust-me decks. A slide says 'score 62', the client's developer asks 'says who?', and the engagement burns weeks on arguments instead of fixes. Reports go stale the moment the site ships a change.

Meanwhile the crawls behind those decks are brittle: a three-hour scan dies at hour two, the dashboard disagrees with the report, and nobody can reproduce last month's numbers.

The approach

Every finding carries its evidence

The crawler runs a real Chromium via Playwright with per-domain politeness, robots.txt and crawl-delay respect. Each of the 33 checks (across 5 weighted categories) that fails produces a finding with a CSS selector, the observed snippet, and file:line:col mapped back into the raw served HTML by a progressive-prefix sourcemap.

Sidecar artifacts sit beside the report, each dated and honest about its limits: a SERP sidecar labeled as browsing presence, a robots.txt study per origin, and a calibration run.

The score publishes its own error bar

Scoring is transparent and reproducible: documented category weights (0.25/0.20/0.20/0.20/0.15), a per-page 0–100 score, and an --explain flag that prints the breakdown.

A Lighthouse 12 calibration tool runs both scoring systems on the same pages and publishes the recorded delta and Pearson correlation (r = 0.827, median delta −9.5, n = 10) — with an in-file note that the delta shows systematic differences, not proof one score is wrong. That's how you walk into a client review without getting discredited.

Killing a crawl costs zero re-work

One JSON record per finished page goes into a lock-guarded checkpoint (raw HTML truncated at 512 KB so long runs don't write gigabytes of state). Resume restores pages, endpoint snapshots and the coverage baseline; torn writes are skipped, never fatal; a fresh scan truncates so stale history can't masquerade as new.

The dashboard is local-first — it reads the output directory directly, no backend to babysit — and tails the same checkpoint over SSE for live scan streaming, with a leading comment flush so the EventSource opens before the first event exists.

Contract-first, so Python and the dashboard can't drift

The zod schema is the single source of truth on the TypeScript side; a generator script runs the real Python report payload over fixtures to emit a 48 KB JSON Schema (323 property nodes), and two independent CI jobs fail the build if the committed schema drifts. Input is repaired or rejected — never crashy.

Architecture

  urls.yaml -> pydantic config -> run_scan() (Playwright Chromium)
        |
        v  politeness · robots guard · discovery · JSONL checkpoint
        |
        v  extract() -> analyze() -> benchmark()
        |
        v  output/<project>/  (report · serp · robots · calibration · coverage)
        |  reads directly, no API
        v
  Next.js dashboard -- SSE tail of checkpoint (zod-validated · SVG charts)

Local-first: files are the interface between the crawler and the product surface.

Outcomes

  • ✓A developer goes from 'score 34.7' to the exact line in the served HTML in seconds — disputes become tickets
  • ✓Competitive benchmarking is generated, not hand-assembled: group-vs-group rankings with per-rival pass rates and 'table stakes' gaps
  • ✓Interrupted scans resume instead of restarting; stakeholders watch scans live instead of asking for status
  • ✓Handover-ready by construction: one command runs compile → 118 pytest → lint → tsc → 54 node tests → production build
  • ✓Real audits already run end-to-end: 116 pages across 5 projects, with client-ready PDF/CSV/MD deliverables generated from the same artifacts

What I learned

  • →Evidence-first reporting turns subjective disputes into verifiable tickets.
  • →A score that publishes its own calibration error bar is defensible in a client review.
  • →Resumable, local-first pipelines survive interruption and remove backend operational risk.

Scope, honestly

The part most portfolios leave out. Here is exactly what is shipped today, and what is designed but not yet wired — read the repo and check me on it.

Shipped & verified

  • ·Crawler, 33 checks, scoring with --explain, competitor benchmark, evidence sidecars
  • ·Resumable checkpointing, SSE live dashboard, zod/schema CI drift guards
  • ·Lighthouse calibration tool, 6-stage verify gate, Docker (non-root) + Compose
  • ·172 tests counted statically across Python and TypeScript

Designed · next

  • ·The SERP sidecar measures DuckDuckGo page-1 presence and says so — it is not Google rank tracking
  • ·Calibration is a single run (n = 10); I'd script it as a recurring job before quoting the numbers in a board deck
  • ·Crawl output includes customer site data — before publishing this repo, that output needs an export/clean policy

Next case study

An AI verdict loop you can actually defend

04 →

Start a project

Have a system that should run itself?

Tell me what breaks today — the manual loop, the API bill, the scraper that dies overnight — and I'll tell you what I'd build, what it costs, and what I wouldn't bother automating.