Skip to content

feat(provider-nailbook): keyless Japanese nail-art image provider (nailbook.jp)#24

Merged
MyPrototypeWhat merged 1 commit into
mainfrom
feat/provider-nailbook
Jul 24, 2026
Merged

feat(provider-nailbook): keyless Japanese nail-art image provider (nailbook.jp)#24
MyPrototypeWhat merged 1 commit into
mainfrom
feat/provider-nailbook

Conversation

@MyPrototypeWhat

Copy link
Copy Markdown
Collaborator

What

New satellite @refkit/provider-nailbook — keyless image provider over nailbook.jp, Japan's nail-design catalog (8.9M+ salon photos, same-day fresh, tag-structured). Registered in the MCP zero-config default set (keyless).

How it talks to the upstream

  • Calls the site's own JSON endpoint POST /api/web/photo/search (the one its frontend XHR uses) — the list HTML's embedded bootstrap carries no image URLs, so HTML parsing was a dead end. Content-Type: application/json is the one proven-required header; the rest mirror the site's XHR (documented inline).
  • One request per search() — interactive retrieval, no multi-page fan-out (robots.txt is open to general agents; AI-training crawlers are the ones it blocks).
  • Pagination deliberately unsupported: the upstream page param is a no-op (verified 57/60 overlap); real paging is a stateful search_after cursor that doesn't map onto stateless controls.page. capabilities: { controls: [] }.

Mapping

canonicalUrl = design detail page; thumbnail = cnv.nailbook.jp/photo/<id>/320_lc, preview = 1280_lc; title = caption with tag fallback; rights = license:'unknown' + rehostPolicy:'thumbnail-only' (discovery moat, same stance as brave).

Verification (post-rebase onto d27619d)

  • pnpm typecheck exit 0 · pnpm vitest run 385 passed / 23 skipped / 0 failed · lint clean · tsup build OK
  • Unit tests run against a captured real API fixture; live smoke passed (REFKIT_LIVE=1): non-empty results for マグネット, canonicalUrl shape asserted, thumbnail HEAD 200.

Caveats

  • Internal, undocumented endpoint — could change shape without notice; Japanese queries retrieve best (caller owns language mapping).
  • ~5% of results are video posts surfaced via their still frame.
  • Touches the same mcp files as feat(core,mcp): source-targeted search via SearchInput.sources #23; whichever lands second needs a trivial rebase.

Add @refkit/provider-nailbook — image references from Nailbook (nailbook.jp).
Calls the site's own JSON endpoint (POST /api/web/photo/search) rather than
scraping the client-rendered list HTML, whose embedded bootstrap carries photo
IDs but no image URLs. One request per search, no fan-out.

Discovery-class rights: no per-item license metadata, so every result is
license: 'unknown' + rehostPolicy: 'thumbnail-only' (gates to needs-review;
mirrors the Brave discovery moat). Japanese tag words recall best.

Wired into @refkit/mcp's zero-config keyless default set (hard dependency),
README, and the keyless-set test; registered in the root vitest projects list.

Verified: typecheck, lint, full vitest (369 passed), package build, and a live
smoke against the real API (non-empty results, canonicalUrl = /design/<id>/,
thumbnail HEAD 200 image/*).
@MyPrototypeWhat
MyPrototypeWhat force-pushed the feat/provider-nailbook branch from ea2a3bf to 17469ad Compare July 24, 2026 15:55
@MyPrototypeWhat
MyPrototypeWhat merged commit 916f3fd into main Jul 24, 2026
@MyPrototypeWhat
MyPrototypeWhat deleted the feat/provider-nailbook branch July 24, 2026 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant