Documentation Index
Fetch the complete documentation index at: https://285e39fd5e337e58f16290.sightscreen.app/llms.txt
Use this file to discover all available pages before exploring further.
System context diagram
This shows every system and external service in play, and the connections between them.How data flows
Ingest
Two pollers fetch data from SportMonks. ScorePoller polls all active matches on a schedule with Cockatiel resilience (timeout, circuit breaker, retry). MarqueePoller polls the marquee league at higher frequency with ball-by-ball data included.
Detect
Raw score data flows into MatchEventBus, which routes it through the event detection pipeline. Tier0EventDetector catches high-priority events (wickets, milestones). Tier1EventDetector catches routine updates (score changes, over completions). Events pass through CooldownFilter and StalenessFilter to suppress duplicates and stale data.
Build
DisplayStateBuilder constructs a UnifiedDisplayState from the current match data, ready for both API responses and APNs payloads.
Deliver
LACoordinator receives prioritized events and coordinates delivery through ApnsDeliveryService to all subscribed devices. Priority determines APNs priority header (5 vs 10).
Connection details
| Connection | Protocol | Auth | Notes |
|---|---|---|---|
| iOS to Backend | HTTPS REST | Cognito JWT in Authorization header | All endpoints require auth except health check |
| Pavilion to Backend | HTTPS REST | Cognito JWT | Admin-scoped token with elevated permissions |
| Backend to SportMonks | HTTPS REST | API key in query params | Rate-limited, polled on intervals with Cockatiel resilience |
| Backend to DynamoDB | AWS SDK | IAM role | All persistent storage goes here |
| Backend to Cognito | AWS SDK | IAM role | Token verification, user pool management |
| Backend to APNs | HTTP/2 | JWT-based APNs auth token | Delivered via LACoordinator through ApnsDeliveryService |
| mock-sportmonks | HTTPS REST | None | Local service that replays recorded SportMonks responses for testing |