# JST showcase — cracking email-gated CAD, end to end ✅

> **What this proves:** chip-fetcher can pull manufacturer-grade CAD even from a
> vendor that **refuses to serve a download** and instead **emails the file** —
> a flow that defeats every "click Download" scraper. Proven end to end on real
> JST parts, with the file retrieved straight out of Gmail and imported into the
> library. This page is the receipts.

This is the success story behind the [JST email-gated CAD how-to](jst-email-gated-cad.md)
and the agent playbooks (`playbooks/jst.md`, `playbooks/jst-email-retrieval.md`).
If you just want to run it, read the how-to. This page shows **what was pulled
off and why it matters**.

---

## The problem JST poses

JST is a tier-1 connector maker whose CAD is locked behind three walls that
break normal scrapers:

1. **jst.com (USA) hard-blocks automated browsers** with a Cloudflare bot
   challenge — a headless/puppeteer browser never gets past "Just a moment…".
2. The real CAD lives on the **global site jst-mfg.com**, organized by
   **series**, not by part number.
3. **Clicking "Download" does not return a file.** It returns a **License
   Agreement form**, and — since **April 2025** — JST **emails** the CAD to the
   address you type in. There is no file to scrape at all.

A "download the file" tool gets nothing. You need to drive a real browser, fill
a form, **and read email**.

## How chip-fetcher beats it

### 1 · Drive the user's real browser to the real catalog

Instead of a bot browser, chip-fetcher drives the user's **real signed-in
Chrome** (via the Adom native-browser bridge), which carries Cloudflare's
human-trust and sails through. It lands on the jst-mfg.com series page, where
every part lists **IGES / STEP / 3D-PDF / 2D-PDF**:

![JST global catalog with STEP column](img/jst-catalog.png)

### 2 · Recognize the gate and fill the form

Clicking the STEP "Download" returns the **License Agreement form** — not a
file. chip-fetcher accepts the cookie banner (required to submit), then fills
the user's business profile + email and clicks **I agree**:

![JST License Agreement form, filled](img/jst-form.png)

### 3 · Confirm the email hand-off

JST responds with the tell that it's an **email** flow, not a download:

![The data has been sent to your email address](img/jst-confirm.png)

### 4 · Read the email, pull the attachment, import

This is the part that makes or breaks it. chip-fetcher uses **adom-google** to
find the JST mail, pull the `.zip` attachment (the real `PHR-2.STEP`), and
import it — no human in the loop:

![adom-google retrieves the emailed CAD](img/jst-email.png)

### 5 · The payoff — a real library card

`PHR-2` lands in the library with its **manufacturer STEP** (3D thumbnails
auto-rendered) + datasheet:

![PHR-2 library card with imported manufacturer STEP](img/jst-dashboard.png)

## …then a real, board-ready set

The CAD pull is only half a connector. `PHR-2` is the **wire-side crimp
housing**; a board needs the **mating board-side header** plus a **symbol and
footprint** (which JST never ships). chip-fetcher completes the bundle from the
KiCad standard libraries and, where KiCad has no 3D, falls back to the JST
email flow for the manufacturer STEP. Result: the **5 most-common JST
connectors**, each with **symbol + footprint + 3D + datasheet**:

![JST-common project — 5 board connectors fully bundled](img/jst-5connectors.png)

| Part | Series | Pitch | Symbol | Footprint | 3D | Datasheet |
|---|---|---|:--:|:--:|:--:|:--:|
| **B2B-PH-K-S** (mates `PHR-2`) | PH | 2.0 mm | ✓ | ✓ | ✓ | ✓ |
| **B2B-XH-A** | XH | 2.5 mm | ✓ | ✓ | ✓ | ✓ |
| **SM02B-SRSS-TB** | SH | 1.0 mm | ✓ | ✓ | ✓ | ✓ |
| **BM02B-GHS-TBT** | GH | 1.25 mm | ✓ | ✓ | ✓ | ✓ |
| **B2P-VH** | VH | 3.96 mm | ✓ | ✓ | ✓ (via JST email) | ✓ |

## Why this matters

- **It generalizes.** JST is the reference case for *any* manufacturer that
  email-delivers CAD. The retrieval layer is pluggable: Gmail users get it free
  via adom-google; other providers build a small fetcher and
  [breadcrumb](https://wiki.adom.inc/adom/wiki-breadcrumbs) it so chip-fetcher
  stays provider-agnostic.
- **It's fully hands-off.** Form fill, the email round-trip, attachment
  extraction, and import all run without a human click.
- **It's honest about provenance.** JST ships 3D + drawings only; symbol +
  footprint come from the matched KiCad libraries, and the library records
  where each file came from.

## Watch it

▶ **[60-second narrated demo](jst-email-gated-cad-demo.webm)** of the full flow.

## Reproduce it

- How-to: **[jst-email-gated-cad.md](jst-email-gated-cad.md)**
- Agent playbooks: `playbooks/jst.md`, `playbooks/jst-email-retrieval.md`
- Demo recipe: **[jst-email-gated-cad-demo-script.md](jst-email-gated-cad-demo-script.md)**
