Skip to Content
Game ImportersIntroduction

Game Importers

Game importers fetch card data from official game APIs and third-party sources, normalize it into our data model, and create products in the CardNexus database. Each supported game has a dedicated importer that extends BaseImporter.

General Import Flow

Every game importer follows the same lifecycle:

  1. init — Connect to data sources (APIs, TCGCSV, TCGPowertools)
  2. getExpansions — Fetch and normalize expansion/set data
  3. getCards — Fetch cards, transform attributes, match marketplace IDs
  4. generateDiff — Compare with existing DB state, generate add/modify/remove diff
  5. applyDiff — Apply approved changes to the database

Common Data Sources

SourcePurposeUsed By
TCGCSVTCGPlayer product IDs and pricing dataAll TCGPlayer games
TCGPowertoolsCardmarket IDs, translationsPokemon, SWU, FAB
Game-specific APIsOfficial card data, art, attributesSWU, Pokemon, MTG (Scryfall)

Code Locations

ComponentLocation
Base importerpackages/games/game-importer/src/base-importer.ts
TCGCSV servicepackages/games/game-importer/src/lib/tcg-csv/tcg-csv.service.ts
Game configurationspackages/games/game-configuration/src/lib/games/
Last updated on