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.4
7 files changed
+86−98
README.md+30−77@@ -1,99 +1,52 @@-# JLCPCB Parts Library+# adom-jlcpcb -**Know it's in the JLCPCB library — Basic or Extended — before you commit a board to fab.**+JLCPCB Electronics component search for the Adom ecosystem — one Rust binary, three modes: -+- **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,-three faces:+Replaces the former `gallia/services/jlcpcb/server.js` + `gallia/jlcpcb/mcp/` setup. No MCP server, no Adom Viewer dependency. -- **CLI** — `adom-jlcpcb search | part | health` for quick JSON-returning shell use and BOMs.-- **Hydrogen app** — `adom-jlcpcb app` opens a searchable UI as a first-class Hydrogen tab.-- **Backend service** — `adom-jlcpcb serve` runs the shared proxy (port 8779) that powers the- `service-jlcpcb` container and feeds [`adom-parts-search`](/adom/adom-parts-search).+## Quick start ```bash-adom-wiki pkg install adom-jlcpcb-adom-jlcpcb search "0402 10k resistor"-```--## Basic vs Extended — the question that costs money--On a JLCPCB assembly run, **Basic** parts are pre-loaded on the line (no fee), while **Extended**-parts add a per-part feeder setup charge. Picking a Basic equivalent up front can shave real money-off a build. `adom-jlcpcb` shows the library tier on every card, alongside LCSC code, stock and-price, so you design around what's actually cheap to place.----## Catch the Extended part before fab does--Search your MCU or regulator and you'll 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 equivalent is-Extended — exactly the trade-off you want to make *before* the board goes out.----## Scriptable from the first keystroke--`search` returns JSON; `part` fetches one LCSC code; `health` checks the backend. Pipe it into-`jq`, a BOM, or a board-cost estimator.+# One-shot search (auto-detects backend, or falls back to direct JLCPCB call)+adom-jlcpcb search "STM32F103RBT6" -+# Interactive UI+adom-jlcpcb app -```bash-adom-jlcpcb search "LM358" | jq '.components[0]'-adom-jlcpcb part "C7950"-adom-jlcpcb health+# Run the backend on the service container+JLCPCB_API_KEY_UNUSED_placeholder=<key> adom-jlcpcb serve ``` -## Install--```bash-adom-wiki pkg install adom-jlcpcb-```+See `SKILL.md` for the full command reference and typical workflows. -## How it works+## Architecture ```- any container service-jlcpcb- $ adom-jlcpcb search "LM358" ──POST──▶ adom-jlcpcb serve (:8779)- $ adom-jlcpcb app LCSC resolve + cache- (Hydrogen webview tab)- │- ▼- JLCPCB / LCSC parts API+┌─────────────────────────────────┐ ┌─────────────────────────┐+│ 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) ``` -JLCPCB is an assembly-first workflow, so in [`adom-parts-search`](/adom/adom-parts-search) it shows-as a library column rather than competing on the buy-now recommendation — but for "can JLCPCB-place this for me, and is it Basic?" it's the fastest answer in the workspace.+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. -## See also--- [`adom-parts-search`](/adom/adom-parts-search) — searches Mouser, DigiKey and JLCPCB at once and picks the best buy.--## Open source — make it yours, then give it back--This app is **open source under the MIT license**. Fork it, rewrite it, rename it, bend it to your-own workflow — and when you've made it better, **send your changes back to the Adom Wiki so the-whole community benefits**. Every wiki page is a git repo with a package registry on top, so-contributing back is first-class — improvements that land here ship to every Adom user who installs-the app.+## Build ```bash-adom-wiki pkg install adom-jlcpcb # install it-# …edit the source to taste…-adom-wiki pkg publish # publish your own fork, or-# open a pull request against this page so the change lands for everyone+./build.sh # cargo build --release → copy to /usr/local/bin → adom-jlcpcb install ``` -> **One caveat — the search backend is an Adom service.** The actual lookups run against-> Adom's hosted JLCPCB / LCSC backend (`service-jlcpcb`), which uses **Adom's vendor API credentials and counts against Adom's quota**. That-> hosted backend is an Adom service and is **subject to change** — rate limits, endpoints, and-> availability can move at any time. Everything client-side (the CLI, the webview, the rendering-> and recommendation logic) is yours to fork and republish; the cloud API quota is not.- ## License -MIT © Adom — do what you want with the code, just pass it on.+MIT.
SKILL.md+1−1@@ -188,7 +188,7 @@ adom-jlcpcb search "LM317" adom-jlcpcb app # UI reads $JLCPCB_API automatically ``` -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 `adompkg install` run from the registry. 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 `gallia/install.mjs` 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)
bin/adom-jlcpcb⋯ 1 unchanged line ⋯
package.json+29−2@@ -1,6 +1,6 @@ { "slug": "adom-jlcpcb",- "version": "1.0.2",+ "version": "1.0.4", "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": {},@@ -35,5 +35,32 @@ ], "hero": { "path": "screenshots/hero.png"- }+ },+ "discovery_triggers": [+ "jlcpcb",+ "jlcpcb parts",+ "jlcpcb pricing",+ "jlcpcb search",+ "jlcpcb part number",+ "component search",+ "part lookup",+ "price breaks",+ "datasheet jlcpcb",+ "in stock jlcpcb"+ ],+ "discovery_pitch": "Search JLCPCB Electronics for components, pricing, stock, and datasheets \u2014 CLI + webview app + shared backend service.",+ "sample_prompts": [+ {+ "label": "is the LM358 a JLCPCB basic part?",+ "prompt": "is the LM358 a JLCPCB basic part?"+ },+ {+ "label": "find a basic 0402 10k resistor on JLCPCB",+ "prompt": "find a basic 0402 10k resistor on JLCPCB"+ },+ {+ "label": "is my STM32 a basic or extended part on ",+ "prompt": "is my STM32 a basic or extended part on JLCPCB"+ }+ ] }
page.json+22−14@@ -4,7 +4,7 @@ "slug": "adom-jlcpcb", "title": "JLCPCB Parts Library", "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.3",+ "version": "1.0.4", "install": { "binary_name": "adom-jlcpcb", "install_dir": "",@@ -35,24 +35,32 @@ "path": "screenshots/hero.png" }, "sample_prompts": [- "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"+ {+ "label": "is the LM358 a JLCPCB basic part?",+ "prompt": "is the LM358 a JLCPCB basic part?"+ },+ {+ "label": "find a basic 0402 10k resistor on JLCPCB",+ "prompt": "find a basic 0402 10k resistor on JLCPCB"+ },+ {+ "label": "is my STM32 a basic or extended part on ",+ "prompt": "is my STM32 a basic or extended part on JLCPCB"+ } ], "discovery_triggers": [ "jlcpcb",- "lcsc", "jlcpcb parts",- "basic part",- "extended part",- "jlcpcb assembly",- "jlcpcb library",- "lcsc stock",- "is it a basic part",- "feeder fee",- "pcba parts"+ "jlcpcb pricing",+ "jlcpcb search",+ "jlcpcb part number",+ "component search",+ "part lookup",+ "price breaks",+ "datasheet jlcpcb",+ "in stock jlcpcb" ],- "discovery_pitch": "Check the JLCPCB / LCSC parts library for Basic vs Extended tier, stock and assembly pricing before you commit a board to fab — CLI + Hydrogen 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" },
skills/adom-jlcpcb-build/SKILL.md+3−3@@ -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, but catches install regressions):+7. **Verify on a fresh user container** (optional, but catches gallia regressions): ```bash # on a fresh container:- adompkg install --refresh # Tier A block fetches from the registry+ node ~/gallia/install.mjs # Tier A block fetches from wiki adom-jlcpcb --version # → "adom-jlcpcb X.Y.Z" ``` @@ -57,7 +57,7 @@ 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`-- [ ] `adompkg install --refresh` still pulls + installs the new version (Tier A)+- [ ] `gallia/install.mjs` Tier A block still works (pulls + installs the new version) - [ ] **Brand audit — in-app icons are monochrome white.** Run: ``` grep -nE 'fill="#00b8b0"|stroke="#00b8b0"|color: var\(--accent\)' src/app/*.html src/app/*.svg 2>/dev/null
skills/adom-jlcpcb/SKILL.md+1−1@@ -188,7 +188,7 @@ adom-jlcpcb search "LM317" adom-jlcpcb app # UI reads $JLCPCB_API automatically ``` -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 `adompkg install` run from the registry. 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 `gallia/install.mjs` 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)