Skip to Content
BackendRecipesAdd a new game

Add a new game

Find a reliable data source

The data source must provide comprehensive card data including:

  • All card properties and attributes
  • Printing information for each card
  • Localized versions in different languages
  • High quality card images

The source should be either:

  • Official game data (e.g. cards.fabtcg.com for Flesh and Blood)
  • Well-maintained community source (e.g. mtgjson for Magic)
  • Reliable API provider (e.g. curiosa.com for Sorcery)

Ensure the data source is regularly updated as new cards are released

Create game configuration

Game configurations are located in packages/games/game-configuration/.

  1. Create a new folder under packages/games/game-configuration/src/lib/games/<game-name>/
  2. Define game-specific types in <game-name>.types.ts (enums for attributes like rarity, color, etc.)
  3. Create a game configuration file <game-name>.game.ts that implements GameConfiguration interface:
    • Define game metadata (name, slug, icon, image)
    • Configure all card attributes (name, type, rarity, etc.)
    • Specify basic and advanced filters
    • Define list presets and supported marketplaces
  4. Optionally create <game-name>.presets.ts for list presets
  5. Optionally create i18n/index.ts for game-specific translations
  6. Add the game configuration to Configurations object in game-configuration.ts
  7. Add the game to the SupportedGames enum in game-configuration.types.ts

Example game configuration files:

Create game importer

Game importers are located in packages/games/game-importer/.

  1. Create a new importer class that extends BaseImporter from packages/games/game-importer/src/base-importer.ts
  2. Implement the required abstract methods:
    • init(): Initialize data source (download files, setup connections, etc.)
    • getExpansionGroups(): Return list of expansion groups/series (if supported)
    • getExpansions(): Return list of card sets/expansions
    • getCards(): Return card data with attributes and printings
    • getGame(): Return basic game info (slug, name, logo)
  3. Handle game-specific logic for:
    • Downloading/parsing card data from the source
    • Mapping external data to platform attributes
    • Managing card images (source URLs and destination paths)
    • Supporting multiple languages/variants
    • Computing card counts and languages per expansion

The BaseImporter class provides:

  • Caching mechanism for downloaded data (readCache, writeCache, download)
  • History archiving to S3 (writeHistory)
  • Image downloading and processing integration
  • Diff generation for incremental updates
  • Event loop yielding to prevent blocking during large imports

Example importer implementations can be found at:

Register the game

  1. Add game to SupportedGames enum in packages/games/game-configuration/src/lib/game-configuration.types.ts
  2. Export the game configuration from packages/games/game-configuration/src/index.ts
  3. Register the importer in the game admin service
  4. Configure game routes and components in the frontend
  5. Add game assets (icons, images) to the appropriate location
  6. Update the Game Importers — Source Registry Notion page (under the Catalog hub)

After adding a game — or whenever an existing game’s data source changes (e.g. External API → Google Sheet) or a game is removed — update the Game Importers — Source Registry  page in Notion: add/move the game’s row (category, importer path, primary source, staging + sealed flags) and fix the counts.

Last updated on