Skip to main content

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.

Every environment variable used by the Sightscreen backend, organized by category. All variables are read at startup unless noted otherwise.

Quick reference

VariableRequiredDefaultPurpose
PORTNo3000HTTP server port
NODE_ENVNoproductionEnvironment mode. Set to development for dev mode auth bypass
CORS_ALLOWED_ORIGINSNo*Comma-separated list of allowed CORS origins
VariableRequiredDefaultPurpose
AWS_REGIONYesAWS region for all services (DynamoDB, etc.)
AWS_ACCESS_KEY_IDNoExplicit credentials. Omit to use instance role / default credential chain
AWS_SECRET_ACCESS_KEYNoExplicit credentials. Omit to use instance role / default credential chain
In production (ECS/EC2), use IAM roles instead of explicit credentials. The AWS SDK automatically discovers them.
VariableRequiredDefaultPurpose
COGNITO_USER_POOL_IDYesCognito User Pool ID for JWT validation
COGNITO_CLIENT_IDYesCognito App Client ID for audience validation
VariableRequiredDefaultPurpose
ADMIN_API_KEYYesStatic API key for server-to-server admin access
Treat this like a password. Rotate it if compromised.
VariableRequiredDefaultPurpose
SPORTMONKS_API_TOKENYesAPI token for SportMonks cricket data API
SPORTMONKS_SEASON_IDYesThe season ID to query for fixtures and scores
All table names default to the values shown. Override them to use custom table names (e.g., per-environment prefixes).
VariableDefaultPurpose
DYNAMODB_USERS_TABLEsightscreen-usersUser profiles
DYNAMODB_MATCHES_TABLEsightscreen-matchesMatch/fixture metadata
DYNAMODB_SCORES_TABLEsightscreen-scoresLive score data
DYNAMODB_LEAGUES_TABLEsightscreen-leaguesLeague definitions
DYNAMODB_TEAMS_TABLEsightscreen-teamsTeam data and overrides
DYNAMODB_DEVICES_TABLEsightscreen-devicesAPNs device tokens
DYNAMODB_SUBSCRIPTIONS_TABLEsightscreen-subscriptionsMatch follow subscriptions
DYNAMODB_REPLAY_MATCHES_TABLEsightscreen-replay-matchesActive replay match state
DYNAMODB_TAPES_TABLEsightscreen-tapesRecorded match tapes for replay
DYNAMODB_APP_CONFIG_TABLEsightscreen-app-configApp configuration (version, maintenance)
VariableRequiredDefaultPurpose
LIVE_ACTIVITIES_TABLEYesDynamoDB table for Live Activity records (tokens, state, match association)
ACTIVE_MATCHES_TABLEYesDynamoDB table for actively orchestrated matches (distributed lock, poll state)
MARQUEE_LEAGUE_IDNoLeague ID to identify marquee matches for priority orchestration
LA_DISMISSAL_DELAY_MINUTESNo5Minutes to wait after user dismisses a LA before ending it server-side
VariableRequiredDefaultPurpose
APNS_KEY_IDYesThe Key ID from your Apple Developer account
APNS_TEAM_IDYesYour Apple Developer Team ID
APNS_BUNDLE_IDYesApp bundle identifier (e.g., com.sightscreen.app)
APNS_KEY_PATHYesAbsolute path to the .p8 private key file
APNS_ENVIRONMENTNoproductionproduction or sandbox
For local development, set APNS_ENVIRONMENT=sandbox and use the sandbox APNs endpoint.
VariableRequiredDefaultPurpose
MIN_APP_VERSIONNo1.0.0Minimum supported app version. Clients below this are force-updated
STORE_URLNoApp Store URL shown in the force-update prompt
MAINTENANCE_MODENofalseSet to true to show maintenance screen on all clients
VariableRequiredDefaultPurpose
DISABLE_LIVE_SCORE_JOBNofalseDisable the LiveScoreJob (ScorePoller for live matches)
DISABLE_FIXTURE_SYNC_JOBNofalseDisable the FixtureSyncJob
DISABLE_REPLAY_SCORE_JOBNofalseDisable the ReplayScoreJob (ScorePoller for replay)
LIVE_SCORE_POLL_INTERVAL_MSNo2500ScorePoller interval when matches are live
IDLE_SCORE_POLL_INTERVAL_MSNo5000ScorePoller interval when idle
FIXTURE_SYNC_INTERVAL_MSNo60000FixtureSyncJob interval
VariableRequiredDefaultPurpose
MOCK_SPORTMONKS_URLNoURL of the mock SportMonks server. Setting this enables mock mode
MOCK_SPORTMONKS_TOKENNoAuth token for the mock server
Never set mock mode variables in production. They redirect all SportMonks calls to the mock server.
These variables are no longer used by the refactored backend but may still be referenced in infrastructure configs. Remove them after Phase 9 cleanup.
VariablePreviously used by
DYNAMODB_ACTIVITY_SUBSCRIPTIONS_TABLEActivityPushJob
DYNAMODB_PREMATCH_NOTIFICATIONS_TABLEPrematchNotificationJob
MATCH_PROCESSING_STATE_TABLELegacy score processing
STATE_HASHES_TABLEActivityPushJob hash comparison
DISPLAY_CACHE_TABLELegacy display cache
DISABLE_ACTIVITY_PUSH_JOBActivityPushJob (deleted)
DISABLE_PREMATCH_NOTIFICATIONSPrematchNotificationJob (deleted)
Do not add these to new deployments. They exist only for backward compatibility during the Phase 9 transition.