Skip to Content
Game ImportersStar Wars: UnlimitedArchitecture Decision RecordsRename star-wars-unlimited to swu Slug Convention

Rename star-wars-unlimited to swu Slug Convention

Date2026-03-31
StatusAccepted
Decision Makers@benjaminW78

Context and Problem Statement

All game files and directories in the CardNexus monorepo are named after the game’s slug — the short identifier used in SupportedGames. For example:

GameSlugFile pattern
Magic: The Gatheringmtgmtg.game.ts, mtg-importer.ts
Flesh and Bloodfabfab.game.ts, fab-importer.ts
One Pieceonepieceonepiece.game.ts, onepiece-importer.ts
Pokemonpokemonpokemon.game.ts, pokemon-importer.ts

Star Wars: Unlimited was the only game using its full hyphenated name (star-wars-unlimited) instead of its slug (swu) for file and directory naming. This created inconsistency across the codebase and made it harder to predict file locations by convention.

Decision Drivers

  • Every other game uses the slug for file naming — SWU was the only exception
  • Developers expect to find game files at games/{slug}/ by convention
  • Longer file names add noise to imports and git diffs
  • Image assets (game-logos/star-wars-unlimited.png) were also inconsistent with other games (game-logos/fab.png)

Considered Options

  1. Rename everything to swu — Align with the convention used by all other games
  2. Keep star-wars-unlimited — Maintain the current naming, accept the inconsistency
  3. Rename only new files — Use swu for new files, leave existing files as-is

Decision Outcome

Chosen option: “Rename everything to swu”, because consistency across all games is more valuable than avoiding a large rename diff. The rename is mechanical and low-risk, and doing it all at once avoids a confusing mixed state.

Scope of Changes

Directories renamed

Old pathNew path
packages/games/game-configuration/src/lib/games/star-wars-unlimited/packages/games/game-configuration/src/lib/games/swu/
packages/games/game-importer/src/star-wars-unlimited/packages/games/game-importer/src/swu/
apps/internal-doc/src/content/game-importers/star-wars-unlimited/apps/internal-doc/src/content/game-importers/swu/

Files renamed (examples)

Old nameNew name
star-wars-unlimited.game.tsswu.game.ts
star-wars-unlimited.types.tsswu.types.ts
star-wars-unlimited-importer.tsswu-importer.ts
star-wars-unlimited.schema.tsswu.schema.ts
game-logos/star-wars-unlimited.pnggame-logos/swu.png

What was NOT renamed

  • Class and type names — StarWarsUnlimitedImporter, StarWarsUnlimitedFinish, etc. remain unchanged. These are internal identifiers, not file paths, and renaming them would add churn with no practical benefit.
  • Display names — "Star Wars: Unlimited" in user-facing strings stays as-is.
  • External API identifiers — TCGPowertools game key star-wars-unlimited is an external identifier, not a file path.
  • Variable names — starWarsUnlimitedFilters, starWarsUnlimitedSeoConfig, etc. remain unchanged.

Consequences

Positive

  • All games now follow the same {slug} naming convention for files and directories
  • Developers can reliably predict file locations: games/{slug}/{slug}.game.ts
  • Image assets are consistent: game-logos/{slug}.png
  • Internal doc routes are consistent: /game-importers/{slug}/

Negative

  • Large rename diff in one PR — git history for these files has a rename boundary
  • GitHub links in existing documentation needed updating (handled in same PR)
  • S3 bucket keys in LocalStack still contain old star-wars-unlimited/ prefix from previous imports (harmless, will be superseded by swu/ keys)

More Information

  • Convention established by existing games: mtg, fab, onepiece, pokemon, lorcana, sorcery, etc.
  • The SupportedGames enum already used swu as the slug — only file names were inconsistent
Last updated on