# Chip Fetcher Lite

A fast, low-context staging area for component CAD — the lightweight companion to the full
chip-fetcher. When you just want to know *"is this part on the Adom wiki, and do I have the
KiCad / Altium / Fusion files?"* — and then file the good ones straight into your libraries —
this is the tool.

## What it does

1. **Add a component** (by MPN, or a description like `100nF 0402 capacitor`). It's added to a
   list and checked against the Adom wiki. Descriptions resolve to the real MPN page.
2. **See file availability at a glance.** Each row has four status boxes — **KiCad · Altium ·
   Fusion · JLC** — that colour independently:
   - KiCad/Altium/Fusion: red (0 of symbol/footprint/3D) · yellow (1–2) · green (all 3). Hover for the breakdown.
   - JLC: green if a JLCPCB/LCSC part number is known, red otherwise. Click to set one.
3. **Upload what's missing.** Drop a `.kicad_sym` / `.kicad_mod` / `.step` etc. onto a row;
   it's held in a local staging area and the box turns green.
4. **Probe your libraries.** With one click the app scans your machine (via adom-desktop) for
   your KiCad/Altium/Fusion libraries and shows, per row, exactly where each file will go:
   - **Symbol** → your JLC category library (`JLC_Capacitors_BLT.kicad_sym`, `JLC_MCUs_BLT`, …)
   - **Footprint** → the manufacturer `.pretty` (or the KiCad **stock** footprint for generic passives — locked, marked *KiCad default*)
   - **3D** → the manufacturer subfolder under your `3D/` directory
   - New libraries are flagged **new** and created on send. The folder/file name is shown; hover for the full path.
5. **Send to library.** Files the symbol (merged into the category lib, trimmed to the 5
   standard fields + LCSC), the footprint, and the 3D model onto your machine, creating and
   registering any missing libraries. A live progress bar shows each step.

Rows are grouped under category headers (Resistor, Capacitor, LED, …). Multi-select +
**Select all**, and pick which EDA targets to send to.

## How it stays "lite"

It does **not** scrape vendors, generate symbols, or run cross-source validation. It reads the
wiki, stages files, and files them — nothing heavier. Adding 138 basic parts at once checks
the wiki for all of them (bounded to 4 concurrent lookups) without breaking a sweat.

## Architecture

- **Runtime:** Node.js, **zero native dependencies** (pure `http`).
- **Frontend:** a single `public/index.html`, vanilla JS, dark Adom theme (Familjen Grotesk /
  Satoshi / JetBrains Mono).
- **Storage:** `data/data.json` + `data/staging/<id>/` for uploaded files (runtime only — not shipped).
- **Wiki:** `adompkg search` + `wiki.adom.inc/api/v1/pages/<slug>` + `/blob/component/<slug>/<file>`.
- **Desktop:** library probe + file delivery go through the **adom-desktop** bridge.

## Run

```bash
node server.js            # listens on :7821  (CFL_PORT to override)
node cli.js app           # open as a Hydrogen webview
```

See **SKILL.md** for how an AI agent drives it, and **DEVELOPING.md** for the architecture
notes and hard-won gotchas (start there if you're extending it).
