Skip to main content
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_PUSH_STATE_TABLEsightscreen-push-stateLast pushed hash per match/device
DYNAMODB_NOTIFICATIONS_TABLEsightscreen-notificationsNotification dedup tracking
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)
DYNAMODB_CIRCUIT_BREAKER_TABLEsightscreen-circuit-breakerCircuit breaker state persistence
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
DISABLE_ACTIVITY_PUSH_JOBNofalseDisable the ActivityPushJob
DISABLE_PREMATCH_NOTIFICATION_JOBNofalseDisable the PrematchNotificationJob
DISABLE_FIXTURE_SYNC_JOBNofalseDisable the FixtureSyncJob
DISABLE_REPLAY_SCORE_JOBNofalseDisable the ReplayScoreJob
LIVE_SCORE_POLL_INTERVAL_MSNo2500LiveScoreJob polling interval when matches are live
IDLE_SCORE_POLL_INTERVAL_MSNo60000LiveScoreJob polling interval when no matches are live
FIXTURE_SYNC_INTERVAL_MSNo21600000FixtureSyncJob interval (default: 6 hours)
PREMATCH_NOTIFICATION_WINDOW_MINUTESNo30How many minutes before match start to send notification
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.