app
JLCPCB Parts Library
Public Made by Adomby adom
Check the JLCPCB / LCSC parts library before you fab — Basic vs Extended tier, LCSC stock and assembly pricing, so you avoid surprise feeder-setup fees. CLI, a Hydrogen app, and a shared backend.
← Commit history
Publish 1.0.6
7 files changed
+94−50
README.md+76−32@@ -1,52 +1,96 @@-# adom-jlcpcb+# JLCPCB Parts Library -JLCPCB Electronics component search for the Adom ecosystem — one Rust binary, three modes:+**Know it's in the JLCPCB library — Basic or Extended — before you commit a board to fab.** -- **CLI verbs** — `adom-jlcpcb search|part|health` for quick JSON-returning shell use.-- **Hydrogen webview app** — `adom-jlcpcb app` opens a searchable UI as a first-class Hydrogen tab.-- **Backend HTTP service** — `adom-jlcpcb serve` runs the shared proxy (port 8774) used by the `service-jlcpcb` container.+`adom-jlcpcb` is the single-vendor JLCPCB / LCSC tool for the Adom ecosystem: one Rust binary with+three faces — a JSON **CLI**, a first-class **Hydrogen webview app**, and the shared **backend+service** that powers `service-jlcpcb` and feeds [`adom-parts-search`](/adom/adom-parts-search). -Replaces the former `gallia/services/jlcpcb/server.js` + `gallia/jlcpcb/mcp/` setup. No MCP server, no Adom Viewer dependency.+## Install++```bash+adom-wiki pkg install adom-jlcpcb+``` ## Quick start ```bash-# One-shot search (auto-detects backend, or falls back to direct JLCPCB call)-adom-jlcpcb search "STM32F103RBT6"+# One-shot search+adom-jlcpcb search "0402 10k resistor" -# Interactive UI+# Interactive UI as a Hydrogen tab adom-jlcpcb app -# Run the backend on the service container-JLCPCB_API_KEY_UNUSED_placeholder=<key> adom-jlcpcb serve+# One exact LCSC code+adom-jlcpcb part "C7950" ``` -See `SKILL.md` for the full command reference and typical workflows.+## Screenshots -## Architecture+### Basic vs Extended — the question that costs money+On a JLCPCB assembly run, **Basic** parts are pre-loaded on the line (no fee); **Extended** parts+add a per-part feeder charge. Every card shows the tier, LCSC code, stock and price, so you design+around what's actually cheap to place. -```-┌─────────────────────────────────┐ ┌─────────────────────────┐-│ any container │ │ service-jlcpcb │-│ │ │ │-│ $ adom-jlcpcb search "ESP32" │───POST──▶│ adom-jlcpcb serve │-│ $ adom-jlcpcb app │ │ port 8774 │-│ (Hydrogen webview tab) │ │ JLCPCB_API_KEY_UNUSED_placeholder set │-│ │ │ 10-min LRU cache │-└─────────────────────────────────┘ └─────────────────────────┘- │- ▼- api.jlcpcb.com (v2)-```+ -Consumer containers point `JLCPCB_API` at the service container's public URL; locally, the CLI will also autodetect `http://127.0.0.1:8774` if a backend is running on the same box.+### Catch the Extended part before fab does+Search your MCU or regulator and see at a glance whether your first pick is Basic — and what the+Basic alternative is. Here a popular STM32 is Basic while a drop-in GD32 is Extended. -## Build+ -```bash-./build.sh # cargo build --release → copy to /usr/local/bin → adom-jlcpcb install-```+### Scriptable from the first keystroke+`search`/`part`/`health` return JSON — pipe to `jq`, a BOM, or a board-cost estimator.++++## Dependencies++| Dependency | Required? | Why |+|---|---|---|+| `service-jlcpcb` backend (`adom-jlcpcb serve`) | Recommended | LCSC resolve + cache; the CLI auto-detects it |++## Features++- **Three faces** — CLI verbs, a Hydrogen webview app, and the shared backend service.+- **Library tier on every card** — Basic vs Extended, so you avoid surprise feeder-setup fees.+- **LCSC codes + assembly pricing** — what JLCPCB will actually charge to place the part.+- **Assembly-first** — in [`adom-parts-search`](/adom/adom-parts-search) it's the library column, not a buy-now vendor.++## Talk to the AI++- "is the LM358 a JLCPCB basic part?"+- "find a basic 0402 10k resistor on JLCPCB"+- "is my STM32 a basic or extended part on JLCPCB"+- "what's the LCSC code for an LM358"++## Skills++| Skill | Purpose |+|---|---|+| `adom-jlcpcb` | When/how Claude drives the search — Basic/Extended, LCSC codes, reading the cards |+| `adom-jlcpcb-build` | Release workflow (build, publish to the wiki) |++## CLI reference++| Command | What it does |+|---|---|+| `adom-jlcpcb search "<q>"` | Search JLCPCB / LCSC → JSON |+| `adom-jlcpcb part "<lcsc>"` | Fetch one LCSC code → JSON |+| `adom-jlcpcb app` | Open the searchable Hydrogen tab |+| `adom-jlcpcb health` | Check the backend + LCSC reachability |+| `adom-jlcpcb serve` | Run the shared backend proxy (port 8779) |++## Open source — make it yours, then give it back++This app is **open source under the MIT license**. Fork it, improve it, then send it back: `adom-wiki pkg+publish` your own version, or open a pull request against this page so the change lands for everyone.++> **One caveat — the search backend is an Adom service.** Lookups run against Adom's hosted JLCPCB /+> LCSC backend (`service-jlcpcb`), which uses Adom's API credentials and counts against Adom's quota+> — an Adom service, **subject to change**. Everything client-side is yours to fork and republish. ## License -MIT.+MIT © Adom — do what you want with the code, just pass it on.
SKILL.md+4−4@@ -188,7 +188,7 @@ adom-jlcpcb search "LM317" adom-jlcpcb app # UI reads $JLCPCB_API automatically ``` -Most containers don't need to set the API env var explicitly — `adom-jlcpcb` installs from the wiki registry (`adom-wiki pkg install adom/adom-jlcpcb`) and is kept current by the auto-update hook. The CLI autodetects a local `adom-jlcpcb serve` on 127.0.0.1:8774 and falls back to calling JLCPCB directly if `JLCPCB_API_KEY_UNUSED_placeholder` is set locally.+Gallia users don't need to set `JLCPCB_API` explicitly — `adom-jlcpcb` is a Tier A app (see `adom-app-model`), so it's installed by every `adom-wiki pkg install` run from the wiki binary. The CLI autodetects a local `adom-jlcpcb serve` on 127.0.0.1:8774 and falls back to calling JLCPCB directly if `JLCPCB_API_KEY_UNUSED_placeholder` is set locally. ### Local-only (quick testing) @@ -196,13 +196,13 @@ On any container, if `JLCPCB_API_KEY_UNUSED_placeholder` is set and you run `ado ## Installation -Install from the wiki registry — the package delivers the binary and the skills together:+The binary is distributed as a GitHub release from `adom-inc/adom-jlcpcb`. After downloading to `/usr/local/bin/adom-jlcpcb` and making it executable, run: ```bash-adom-wiki pkg install adom/adom-jlcpcb+adom-jlcpcb install ``` -This installs the CLI to `~/.local/bin` and the skills to `~/.claude/skills/adom-jlcpcb/`.+This deploys the skill to `~/.claude/skills/jlcpcb/SKILL.md` and installs bash completions. ## Notes
bin/adom-jlcpcb⋯ 1 unchanged line ⋯
package.json+1−1@@ -1,6 +1,6 @@ { "slug": "adom-jlcpcb",- "version": "1.0.5",+ "version": "1.0.6", "type": "app", "description": "Check the JLCPCB / LCSC parts library before you fab \u2014 Basic vs Extended tier, LCSC stock and assembly pricing, so you avoid surprise feeder-setup fees. CLI, a Hydrogen app, and a shared backend.", "dependencies": {},
page.json+4−4@@ -3,8 +3,8 @@ "type": "app", "slug": "adom-jlcpcb", "title": "JLCPCB Parts Library",- "brief": "Check the JLCPCB / LCSC parts library before you fab \u2014 Basic vs Extended tier, LCSC stock and assembly pricing, so you avoid surprise feeder-setup fees. CLI, a Hydrogen app, and a shared backend.",- "version": "1.0.5",+ "brief": "Check the JLCPCB / LCSC parts library before you fab — Basic vs Extended tier, LCSC stock and assembly pricing, so you avoid surprise feeder-setup fees. CLI, a Hydrogen app, and a shared backend.",+ "version": "1.0.6", "install": { "binary_name": "adom-jlcpcb", "install_dir": "",@@ -60,11 +60,11 @@ "datasheet jlcpcb", "in stock jlcpcb" ],- "discovery_pitch": "Search JLCPCB Electronics for components, pricing, stock, and datasheets \u2014 CLI + webview app + shared backend service.",+ "discovery_pitch": "Search JLCPCB Electronics for components, pricing, stock, and datasheets — CLI + webview app + shared backend service.", "metadata": { "platform": "linux" },- "description": "Check the JLCPCB / LCSC parts library before you fab \u2014 Basic vs Extended tier, LCSC stock and assembly pricing, so you avoid surprise feeder-setup fees. CLI, a Hydrogen app, and a shared backend.",+ "description": "Check the JLCPCB / LCSC parts library before you fab — Basic vs Extended tier, LCSC stock and assembly pricing, so you avoid surprise feeder-setup fees. CLI, a Hydrogen app, and a shared backend.", "dependencies": {}, "needs_sudo": false, "scripts": {
skills/adom-jlcpcb-build/SKILL.md+5−5@@ -27,7 +27,7 @@ A release syncs five places to the same version X.Y.Z: 3. **Ralph loop the UI** (per app-creator): open in pup, drive a real search, screenshot, check `/console` for errors. ```bash JLCPCB_API=<backend> adom-jlcpcb app --no-tab &- adom-bridge-cli browser_open_window '{"sessionId":"jlcpcb","profile":"jlcpcb","url":"http://127.0.0.1:8892"}'+ adom-desktop browser_open_window '{"sessionId":"jlcpcb","profile":"jlcpcb","url":"http://127.0.0.1:8892"}' # drive a search, screenshot, verify 0 console errors ``` @@ -44,10 +44,10 @@ A release syncs five places to the same version X.Y.Z: curl -s https://jlcpcb-<slug>.adom.cloud/health | jq '.version' # → "X.Y.Z" ``` -7. **Verify on a fresh user container** (optional):+7. **Verify on a fresh user container** (optional, but catches regressions): ```bash # on a fresh container:- adom-wiki pkg install adom/adom-jlcpcb+ node ~/adom-wiki pkg install # Tier A block fetches from wiki adom-jlcpcb --version # → "adom-jlcpcb X.Y.Z" ``` @@ -57,10 +57,10 @@ A release syncs five places to the same version X.Y.Z: - [ ] Wiki page at `apps/adom-jlcpcb` renders the new `install_hint` one-liner - [ ] User has seen a working screenshot of the webview - [ ] No console errors via `GET /console`-- [ ] a clean `adom-wiki pkg install adom/adom-jlcpcb` pulls + installs the new version+- [ ] `adom-wiki pkg install` Tier A block still works (pulls + installs the new version) - [ ] **Brand audit — in-app icons are monochrome white.** Run: ```- grep -nE 'fill="#(00b8b0|00b8b1)"|stroke="#(00b8b0|00b8b1)"|color: var\(--accent\)' src/app/*.html src/app/*.svg 2>/dev/null+ grep -nE 'fill="#00b8b0"|stroke="#00b8b0"|color: var\(--accent\)' src/app/*.html src/app/*.svg 2>/dev/null ``` Expected result: empty, OR only the text-color rules (`.jlcpcb-pn`, `<a>`, focus-rings) on non-SVG elements. Any match on an `<svg>` or
skills/adom-jlcpcb/SKILL.md+4−4@@ -188,7 +188,7 @@ adom-jlcpcb search "LM317" adom-jlcpcb app # UI reads $JLCPCB_API automatically ``` -Most containers don't need to set the API env var explicitly — `adom-jlcpcb` installs from the wiki registry (`adom-wiki pkg install adom/adom-jlcpcb`) and is kept current by the auto-update hook. The CLI autodetects a local `adom-jlcpcb serve` on 127.0.0.1:8774 and falls back to calling JLCPCB directly if `JLCPCB_API_KEY_UNUSED_placeholder` is set locally.+Gallia users don't need to set `JLCPCB_API` explicitly — `adom-jlcpcb` is a Tier A app (see `adom-app-model`), so it's installed by every `adom-wiki pkg install` run from the wiki binary. The CLI autodetects a local `adom-jlcpcb serve` on 127.0.0.1:8774 and falls back to calling JLCPCB directly if `JLCPCB_API_KEY_UNUSED_placeholder` is set locally. ### Local-only (quick testing) @@ -196,13 +196,13 @@ On any container, if `JLCPCB_API_KEY_UNUSED_placeholder` is set and you run `ado ## Installation -Install from the wiki registry — the package delivers the binary and the skills together:+The binary is distributed as a GitHub release from `adom-inc/adom-jlcpcb`. After downloading to `/usr/local/bin/adom-jlcpcb` and making it executable, run: ```bash-adom-wiki pkg install adom/adom-jlcpcb+adom-jlcpcb install ``` -This installs the CLI to `~/.local/bin` and the skills to `~/.claude/skills/adom-jlcpcb/`.+This deploys the skill to `~/.claude/skills/jlcpcb/SKILL.md` and installs bash completions. ## Notes