StratusSports Mockup · tonight's slate
IPTC Sport Schema 1.1 · JSON-LD · SS* records · StratusTasks

One vocabulary

The package's core types follow the IPTC Sport Schema, the RDF successor to SportsML. Betting odds have no open standard, so prices take The Odds API's shape. Everything can be exported as JSON-LD on the IPTC context.

Mapping

Swift type → IPTC class

Status and outcome codes are IPTC NewsCodes; statistics are keyed by IPTC Core Statistics and sport-module names, so a stat line means the same thing in every product.

Package typeIPTCNotes
Competition, CompetitionPhasespsch:Competition, spsch:CompetitionPhaseLeague, season, tournament, series or meet; phases nest.
SportsEventspsch:EventStatus from speventstatus (pre-event, mid-event, post-event, postponed…); outcome from speventoutcome.
Team, Athlete, Associate, Officialspsch:Team, spsch:Athlete, spsch:Associate, spsch:OfficialAgents; membership links athletes and staff to teams.
Membershipspsch:MembershipRoster entry with status, role and dates.
Participation, ParticipationSplitspsch:ParticipationAlignment (home/away/neutral), score, outcome, rank, stat line.
Sitespsch:SiteVenue with geography, capacity, surface.
GameActionspsch:ActionPlay-by-play: period, clock, agent, result, points.
StatKey, StatLine, Standingspstat:*, spamfstat:*, spbkbstat:* …Core and sport-module statistics; x: prefix for the gaps.
Market, Outcome, BookmakerOdds—No open standard for prices; The Odds API's de facto shape.
SportSchema.jsonLD

Exported from tonight's data

Three documents straight from the package: a final event with its venue, the top standing, and a team.

Event

Standing

Team

Package.swift

Modules

StratusSports

Vocabulary, odds maths, parlays, standings, JSON-LD, provider protocols, prediction models, evaluator, value finder, wagers, grader, ledger, fantasy.

no dependencies · server, iOS, web
StratusSportsModels

18 SS* Mongo records: sport, team, competition, athlete, site, event (with external ids), event link, odds snapshot, standing, prediction, rating, sync run, wager, player game stat, fantasy league/team/matchup/projection.

MongoTypes
StratusSportsOddsAPI

The Odds API v4 client with quota headers and conformances to the provider protocols. The production data path.

URLSession
StratusSportsESPN

ESPN's public site API, raw JSON: scoreboard, teams, summary. Development and backfill source.

URLSession
StratusSportsNFLverse

nflverse's open NFL releases (CC-BY 4.0): weekly player and team box scores, the schedule with closing lines and ESPN/PFR ids, the player id crosswalk.

URLSession
StratusSportsServerKit

Sync, query, rating, prediction, betting, fantasy and event-crosswalk services over Mongo; indexes; fingerprinted snapshots; props settle through the links.

MongoDriver
StratusSportsTasks

sports.sync, sports.stats and sports.models handlers for a project's StratusTasks worker, with a distributed lock.

StratusTasks, StratusTasksMongo
Sources

Where the data can come from

The package is vendor-neutral by design. The catalog of every API, data release and SDK considered, with tiers, limits and adoption status, lives in the repo at Resources/API_AND_SDK.md.

SourceSportsTierFit
The Odds API v4odds, all majors + soccer + MMAfree tier → paidadopted: prices, scores, events
ESPN site APINFL, NBA, MLB, NHL, NCAA, soccerkeyless, undocumentedscaffolded: development scores and box scores
nflverseNFLopen data, CC-BY 4.0adopted: box scores, schedule, ids for the crosswalk
MLB Stats APIMLBofficial, keylessschedules, live box scores
NHL Web APINHLofficial, keylessschedules, box scores, standings
SleeperNFL fantasyfree, non-commercialplayer ids, injuries, trending
CollegeFootballDataNCAAFfree keygames, stats, lines
SportsDataIO, Goalserve, Sportradarall majorspaidif a product needs guaranteed uptime or official licensing
Storage

SS* records in Mongo

Events carry their latest prices; snapshots carry the history, de-duplicated by fingerprint. Scores sync never regresses odds; odds sync never regresses status or scores.

Jobs

StratusTasks on stratus-services

Recurring work is a TaskHandler on a cron schedule in the project's worker, guarded by a Mongo distributed lock. Never EventBridge.

This site

Static, generated

S3 + CloudFront with a pretty-URL edge function. swift run StratusSportsDemo writes data/site.json; the pages render it in the browser. Graphics were rendered with FLUX.1-schnell on the stratus-gpu box.