Skip to content
On this page

Architecture

Scottfree Sports is a data pipeline, API, web app, CLI, and MCP tool surface for sports model research.

High-Level Flow

text
Odds/results sources
  -> game-score files in GCS
  -> product and model pipelines
  -> prediction/result/summary artifacts in GCS
  -> FastAPI on Cloud Run
  -> web app, REST API, CLI, MCP

Core Components

ComponentLocationPurpose
Odds and game data pipelinecode/Updates canonical game-score files and repairs provider gaps
Model pipelinecode/, sflow/Generates prediction, result, summary, rolling, density, and team-form artifacts
Product pipelineProducts/, code/pipeline_product_daily.pyGenerates customer CSV snapshots and product release packages
API backendapi/FastAPI service, auth, rate limits, customer account, historical dataset refresh
Web appsflow-app/React app for Predictions, Results, Strategies, Account
CLI/MCPsflow-cli/Terminal and assistant tool access, included with every subscription
Documentationdocs/VitePress docs site

Data Storage

Primary storage is Google Cloud Storage bucket alphapy-sports.

Important object groups:

GroupPurpose
{SPORT}/{sport}_game_scores_1g.csvCanonical source game-score tape per sport
Prediction artifactsCurrent slate model probabilities
Live result artifactsRecent graded model results
Summary artifactsModel performance summaries
Rolling/density artifactsResults page visualization payloads
products/{sport}/...Historical dataset refresh CSVs and coverage sidecars

Firestore stores customers, API keys, subscription state, historical dataset ownership, usage counters, and operational audit records.

API Backend

Production API:

text
https://sports-api.scottfreellc.com

Main route groups:

Path familyPurpose
/api/v1/predictions/{sport}/{model_type}Current slate predictions
/api/v1/public/ml-picks/{sport}/{market}Free website ML table feed
/api/v1/odds/{sport}Current odds
/api/v1/results/{sport}/{model_type}Recent graded results
/api/v1/results/{sport}/{model_type}/rollingRolling results visualization payload
/api/v1/results/{sport}/{model_type}/densityResult distribution payload
/api/v1/results/{sport}/{model_type}/team-formCurrent-season team form
/api/v1/summary/{sport}/{model_type}Model summary
/api/v1/customers/meAccount
/api/v1/scottfree-sports-data/*Historical dataset refreshes

Legacy /picks/* and /edge-picks/* endpoints return empty compatibility payloads because no validated betting selector is active.

Customer Product

ProductBackend behavior
Scottfree Sports AIWeb app, REST API (200,000 monthly requests at up to 50 req/s), CLI/MCP, and historical dataset refresh (8/month for datasets purchased separately) — all included in the single ai tier.

Legacy subscribers on the retired Sports Data / Sports Basic / Sports Premium products keep working under a legacy-alias classification that grants the same ai-tier access.

CLI And MCP

The scottfree-sports-cli package is included with every Scottfree Sports AI subscription.

Entrypoints:

CommandPurpose
sfsCLI
sfs-mcpMCP server

The MCP server exposes 17 public customer data tools for subscriber assistant workflows.

Scheduled Jobs

JobPurpose
pipeline-game-oddsRefresh game files and repair recent source gaps
pipeline-modelsGenerate predictions/results/summary artifacts
pipeline-product-dailyGenerate product CSV snapshots
pipeline-orders-pollPoll SquareSpace orders and reconcile customers

Auth And Rate Limits

API keys can be sent by:

  • X-API-Key
  • Authorization: Bearer
  • api_key query parameter for quick tests

Monthly API quota:

PlanLimitRate
Scottfree Sports AI200,000 requests50 requests/second

Historical dataset refresh quota is separate: 8 refreshes per calendar month.

Current Product Stance

Scottfree Sports exposes model research, market-implied probabilities, line fields, current odds, results, summaries, and contextual data. It does not currently market or activate a validated betting selector, line-movement pick system, Kelly sizing system, or guaranteed profitable pick feed.

Sports model data and research tools