Switch Pokémon catalog sync to pokemon-tcg-data GitHub repo #52

Merged
varutasu merged 1 commit from feat/pokemon-github-catalog-source into main 2026-05-28 12:56:01 -04:00
varutasu commented 2026-05-28 12:44:57 -04:00 (Migrated from github.com)

Summary

  • Replace api.pokemontcg.io with PokemonTCG/pokemon-tcg-data raw JSON for catalog sync discovery (sets/en.json) and per-set import (cards/en/{setId}.json).
  • Add lib/card-import/pokemon-github.js adapter with optional POKEMON_TCG_DATA_BASE_URL override (fork/branch/pin).
  • Store collector numbers as {number}/{printedTotal} (e.g. Seel in Perfect Order → 18/88) and keep external ids in scryfall_id (me3-18 style).
  • Images continue to come from linked CDNs in the JSON (pokemontcg.io or scrydex.com URLs).

No POKEMON_TCG_API_KEY required for catalog sync anymore.

Out of scope

  • Legacy pages/api/admin/index.js bulk Pokémon loader still hits the old API — separate cleanup if desired.

Test plan

  • npm run test:run — 47/47 green
  • After deploy: run catalog sync and confirm a Pokémon set (e.g. me3 Perfect Order) imports from GitHub
  • Confirm pending Seel submissions reconcile when Perfect Order lands

Made with Cursor

## Summary - Replace `api.pokemontcg.io` with [PokemonTCG/pokemon-tcg-data](https://github.com/PokemonTCG/pokemon-tcg-data) raw JSON for catalog sync discovery (`sets/en.json`) and per-set import (`cards/en/{setId}.json`). - Add `lib/card-import/pokemon-github.js` adapter with optional `POKEMON_TCG_DATA_BASE_URL` override (fork/branch/pin). - Store collector numbers as `{number}/{printedTotal}` (e.g. Seel in Perfect Order → `18/88`) and keep external ids in `scryfall_id` (`me3-18` style). - Images continue to come from linked CDNs in the JSON (pokemontcg.io or scrydex.com URLs). No `POKEMON_TCG_API_KEY` required for catalog sync anymore. ## Out of scope - Legacy `pages/api/admin/index.js` bulk Pokémon loader still hits the old API — separate cleanup if desired. ## Test plan - [x] `npm run test:run` — 47/47 green - [ ] After deploy: run catalog sync and confirm a Pokémon set (e.g. `me3` Perfect Order) imports from GitHub - [ ] Confirm pending Seel submissions reconcile when Perfect Order lands Made with [Cursor](https://cursor.com)
vercel[bot] commented 2026-05-28 12:45:02 -04:00 (Migrated from github.com)

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
tcg-vault Ready Ready Preview, Comment May 28, 2026 4:45pm

Request Review

[vc]: #fMKGQ2HmdJMqcMoAyuBZMkL9MEpwxo5SwWtp/r4FuiM=:eyJpc01vbm9yZXBvIjp0cnVlLCJ0eXBlIjoiZ2l0aHViIiwicHJvamVjdHMiOlt7Im5hbWUiOiJ0Y2ctdmF1bHQiLCJwcm9qZWN0SWQiOiJwcmpfRjZXOEVvRkd3Y0g3aWVGcnRvRlNlOXdVVkFhNSIsImluc3BlY3RvclVybCI6Imh0dHBzOi8vdmVyY2VsLmNvbS9yYW5kYWxsLXN0aWxsd2VsbHMtcHJvamVjdHMvdGNnLXZhdWx0LzVKdEN3ZXN3eGh0dHpVMnFnQUR6SHFzOEo2eVciLCJwcmV2aWV3VXJsIjoidGNnLXZhdWx0LWdpdC1mZWF0LXBva2Vtb24tZy1mODQ1MGUtcmFuZGFsbC1zdGlsbHdlbGxzLXByb2plY3RzLnZlcmNlbC5hcHAiLCJuZXh0Q29tbWl0U3RhdHVzIjoiREVQTE9ZRUQiLCJsaXZlRmVlZGJhY2siOnsicmVzb2x2ZWQiOjAsInVucmVzb2x2ZWQiOjAsInRvdGFsIjowLCJsaW5rIjoidGNnLXZhdWx0LWdpdC1mZWF0LXBva2Vtb24tZy1mODQ1MGUtcmFuZGFsbC1zdGlsbHdlbGxzLXByb2plY3RzLnZlcmNlbC5hcHAifSwicm9vdERpcmVjdG9yeSI6bnVsbH1dLCJyZXF1ZXN0UmV2aWV3VXJsIjoiaHR0cHM6Ly92ZXJjZWwuY29tL3ZlcmNlbC1hZ2VudC9yZXF1ZXN0LXJldmlldz9vd25lcj12YXJ1dGFzdSZyZXBvPXRjZy12YXVsdCZwcj01MiJ9 The latest updates on your projects. Learn more about [Vercel for GitHub](https://vercel.link/github-learn-more). | Project | Deployment | Actions | Updated (UTC) | | :--- | :----- | :------ | :------ | | [tcg-vault](https://vercel.com/randall-stillwells-projects/tcg-vault) | ![Ready](https://vercel.com/static/status/ready.svg) [Ready](https://vercel.com/randall-stillwells-projects/tcg-vault/5JtCweswxhttzU2qgADzHqs8J6yW) | [Preview](https://tcg-vault-git-feat-pokemon-g-f8450e-randall-stillwells-projects.vercel.app), [Comment](https://vercel.live/open-feedback/tcg-vault-git-feat-pokemon-g-f8450e-randall-stillwells-projects.vercel.app?via=pr-comment-feedback-link) | May 28, 2026 4:45pm | <a href="https://vercel.com/vercel-agent/request-review?owner=varutasu&repo=tcg-vault&pr=52" rel="noreferrer"><picture><source media="(prefers-color-scheme: dark)" srcset="https://agents-vade-review.vercel.sh/request-review-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://agents-vade-review.vercel.sh/request-review-light.svg"><img src="https://agents-vade-review.vercel.sh/request-review-light.svg" alt="Request Review"></picture></a>
github-actions[bot] commented 2026-05-28 12:45:08 -04:00 (Migrated from github.com)

Pipeline Health

Build + CI gates

Gate Status
Vercel build (Preview) pass
CI: Lint pass
CI: Schema map fresh skipped
Preview smoke pass
Visual diff ⏭ skipped or pending

Build runs on Vercel; this CI runs lint and schema-map drift only (no duplicate build).

Role reports

Role Status
Reviewer report pending
A11y audit pending
Design system audit pending

See individual comments above for details. This rollup updates automatically.

<!-- pipeline-rollup --> ## Pipeline Health ### Build + CI gates | Gate | Status | | --- | --- | | Vercel build (Preview) | ✅ pass | | CI: Lint | ✅ pass | | CI: Schema map fresh | ❌ skipped | | Preview smoke | ✅ pass | | Visual diff | ⏭ skipped or pending | _Build runs on Vercel; this CI runs lint and schema-map drift only (no duplicate build)._ ### Role reports | Role | Status | | --- | --- | | Reviewer report | ⏳ pending | | A11y audit | ⏳ pending | | Design system audit | ⏳ pending | See individual comments above for details. This rollup updates automatically.
Sign in to join this conversation.
No description provided.