How claabs/epicgames-freegames-node works
Epic Games Store Weekly Free Games automates account login, discovers free offers, checks whether they can be claimed, and provides a prepopulated checkout link for the user to finish checkout. Scheduled runs can request device-code login through a web redirect, retain account sessions, handle EULA acceptance, and send notifications through configurable channels. The graph preserves these stages and the documented server/localtunnel and notifier capabilities. Unsampled modules are included where the README or source index establishes their role; edges are limited to documented workflow or visible calls.
Main entry points: index.ts Application workflow · device-login.ts Device login · free-games.ts Free-game discovery · notify.ts Notification dispatch
Components 20
Run orchestration
- Application workflow
src/index.ts - Configuration
src/common/config/setup.ts - Logging
src/common/logger.ts
Accounts and access
- Device login
src/device-login.ts - Device auth storage
src/common/device-auths.ts - Epic authentication
Offer discovery
- Store browser base
src/puppet/base.ts - Free-game discovery
src/puppet/free-games.ts - Store response models
src/interfaces/product-info.ts - Epic Store APIs
Checkout readiness
- EULA management
src/eula-manager.ts - Checkout link
src/purchase.ts
Web and notifications
- Login redirect server
src/common/server.ts - Localtunnel access
src/common/localtunnel.ts - Notification dispatch
src/notify.ts - Notifier adapters
src/notifiers/index.ts - Notifier contract
src/notifiers/notifier-service.ts - Notification services
Other components
- User
- Scheduled runner
Connections 23
- Scheduled runner → Application workflow: starts runs
- Application workflow → Configuration: loads settings
src/index.ts - Application workflow → Device login: orchestrates login
src/index.ts - Application workflow → Free-game discovery: orchestrates search
src/index.ts - Application workflow → EULA management: orchestrates EULAs
src/index.ts - Application workflow → Notification dispatch: orchestrates notices
src/index.ts - Device login → Login redirect server: registers redirects
src/device-login.ts - Device login → Localtunnel access: gets tunnel URL
src/device-login.ts - Device login → Notification dispatch: sends login notices
src/device-login.ts - Device login → Device auth storage: reads and saves tokens
src/device-login.ts - Device login → Epic authentication: requests device auth
src/device-login.ts - User → Login redirect server: follows login redirect
- User → Epic authentication: completes login
- Store browser base → Epic Store APIs: requests store data
- Free-game discovery → Store browser base: uses browser base
src/puppet/free-games.ts - Free-game discovery → Store response models: uses response types
src/puppet/free-games.ts - Free-game discovery → Epic Store APIs: queries free offers
src/puppet/free-games.ts - EULA management → Checkout link: generates login link
src/eula-manager.ts - EULA management → Notification dispatch: sends EULA notice
src/eula-manager.ts - User → Checkout link: finishes checkout
- Notification dispatch → Notifier adapters: selects adapters
src/notify.ts - Notifier adapters → Notifier contract: implements contract
src/notifiers/index.ts - Notifier adapters → Notification services: delivers notices