Overview
leagues is the source repository for league metadata, team canonical records, branding assets, and sync-triggered updates consumed by d-sports-api and d-sports-engage-native.
Repository structure
- Country/league folders store league logos, color tokens, and accessibility reports.
teams/teams.canonical.jsonstores normalized team records and aliases.teams/rosters.jsonstores starters-and-bench player snapshots keyed by the sameslug.teams/assets/*stores canonical team logo files by league and slug.- Official teams include D-Sports and House of Doge. ICEHL now includes HC Milano.
.github/workflows/sync.ymltriggers the backend webhook-based sync path.
Canonical teams dataset
Team normalization is driven byteams/teams.canonical.json and includes:
- Stable slug and canonical name
- League code and alias support
- Branding metadata and source confidence
- Official team records (including D-Sports-owned teams)
- Optional roster join via
teams/rosters.jsonon the sameslug
Logo and branding assets
Branding files are committed in-repo underteams/assets/<leagueCode>/<slug>/logo.<ext> and are consumed by backend sync jobs that publish assets to storage and update API-facing team/logo data.
Sync triggers and downstream consumers
Pushes that touch team, image, or json assets trigger workflow sync:leaguesGitHub Action sends webhook tod-sports-apid-sports-apiruns league/team sync servicesGET /api/teamsandGET /api/leaguesreflect synced values- Native and web clients consume refreshed data
Contributor workflow
- Update canonical records and assets in
leagues - Validate schema assumptions and path conventions
- Merge to
mainand confirm webhook trigger success - Verify downstream values via backend/admin pages and APIs
