deckhearth/pages/api
Randall Stillwell 67073aab7f feat(catalog): Scryfall bulk data import + Tagger community tags
Add full Scryfall bulk data pipeline:

- Migration: 13 new columns on `cards` (oracle_id, illustration_id,
  color_identity, keywords, legalities, flavor_text, artist, released_at,
  layout, edhrec_rank, reserved, reprint, finishes) with GIN indexes
  for JSONB search.
- Migration: `tags` + `card_tags` tables for Tagger community data.
- Script: `bulk-import-scryfall.js` — downloads Oracle Cards bulk file
  (168 MB) and upserts all 36k+ MTG cards with rich metadata.
- Script: `import-scryfall-tags.js` — imports oracle tags (4.5k tags,
  227k taggings) and art tags (11k tags, 458k taggings).
- Lib: `bulk-sync.js` — runtime bulk sync callable from the admin API.
- Admin UI: mode toggle (incremental vs bulk) on catalog sync panel.

Enables Commander deck validation (color_identity), format legality
checks, keyword search, EDHREC popularity ranking, and functional
card tagging ("removal", "ramp", "draw") for deck building assistance.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-14 07:51:39 -05:00
..
admin feat(catalog): Scryfall bulk data import + Tagger community tags 2026-06-14 07:51:39 -05:00
auth Vocabulary cleanup follow-up (#55) 2026-05-29 10:01:03 -05:00
cards feat(scanner): rebuild as mobile-first three-phase flow 2026-06-13 08:42:58 -05:00
collections feat(scanner): condition, foil, quantity, and ownership badge (Brief 2) (#43) 2026-05-27 13:54:33 -05:00
community fix(security): drop wildcard CORS + redundant OPTIONS from 24 API routes (P0 #5) 2026-05-24 20:41:38 -05:00
cron feat(catalog): weekly Vercel Cron sync for MTG and Pokémon sets (#48) 2026-05-27 14:59:59 -05:00
decks feat(scanner): condition, foil, quantity, and ownership badge (Brief 2) (#43) 2026-05-27 13:54:33 -05:00
invite fix(security): drop wildcard CORS + redundant OPTIONS from 24 API routes (P0 #5) 2026-05-24 20:41:38 -05:00
public fix(security): drop wildcard CORS + redundant OPTIONS from 24 API routes (P0 #5) 2026-05-24 20:41:38 -05:00
scan feat(scanner): persist scan captures to Blob (Brief 3) (#44) 2026-05-27 13:57:26 -05:00
user feat(security): rate-limit search/upload/import + gate import routes (P0 #6 - closes last P0) 2026-05-24 22:59:59 -05:00
users feat(security): rate-limit search/upload/import + gate import routes (P0 #6 - closes last P0) 2026-05-24 22:59:59 -05:00
auth-utils.js refactor(db): collapse @neondatabase/serverless onto @vercel/postgres + delete lib/database.js (#30) 2026-05-26 22:54:01 -05:00
collections.js fix(security): drop wildcard CORS + redundant OPTIONS from 24 API routes (P0 #5) 2026-05-24 20:41:38 -05:00
decks.js Major Scanner Improvements 2025-07-29 14:19:48 -05:00
favorites.js fix(security): drop wildcard CORS + redundant OPTIONS from 24 API routes (P0 #5) 2026-05-24 20:41:38 -05:00
health.js Clean slate: Remove React traces and create pure Next.js setup 2025-07-23 09:32:31 -05:00
user-cards.js fix(api): validate quantity on POST /api/user-cards (#46) 2026-05-27 14:25:20 -05:00