How hwamil/fairgame works
FairGame is an Amazon stock-monitoring and automated-purchasing bot. The main workflow starts at the CLI, loads product and account settings, checks configured ASIN groups sequentially against Amazon, and attempts checkout and order placement when an item meets configured conditions. Notifications provide a separate user-feedback path; CLI commands also support notification testing and endpoint diagnostics. The sampled sources establish the CLI, configuration, credential, notification, and Amazon components; some Amazon internals and CLI wiring are only partially shown, so uncertain links are omitted.
Main entry points: cli.py CLI commands · globalconfig.py Global config · notifications.py Notification handler · amazon.py Amazon monitor and checkout
Components 18
Application entry
- App bootstrap
app.py - CLI commands
cli/cli.py
Configuration and credentials
- Global config
common/globalconfig.py - FairGame settings
config/fairgame.conf - Amazon product settings
config/amazon_config.template_json - Amazon credentials
- Credential encryption
utils/encryption.py
Amazon purchasing
- Amazon monitor and checkout
stores/amazon.py
Feedback and diagnostics
- Notification handler
notifications/notifications.py - Apprise settings
config/apprise.conf_template - Notification sounds
notifications - Discord presence
utils/discord_presence.py - HTTP client utilities
utils/http.py - DNS endpoint diagnostics
cli/cli.py
Other components
- User
- Amazon
- Apprise services
- Discord
Connections 20
- User → App bootstrap: starts
- App bootstrap → CLI commands: dispatches
- User → CLI commands: runs commands
- CLI commands → Global config: loads settings
- Global config → FairGame settings: reads
- Global config → Amazon credentials: loads or creates
- Global config → Credential encryption: uses
- CLI commands → Notification handler: initializes
- CLI commands → Amazon monitor and checkout: starts monitoring
- CLI commands → Global config: loads Amazon settings
- Global config → Amazon product settings: reads
- Amazon monitor and checkout → Amazon: checks stock and orders
- Amazon monitor and checkout → Notification handler: sends alerts
- CLI commands → Notification handler: tests notifications
- Notification handler → Apprise settings: loads
- Notification handler → Apprise services: sends alerts
- Notification handler → Notification sounds: plays
- Discord presence → Discord: updates status
- CLI commands → DNS endpoint diagnostics: runs diagnostics
- DNS endpoint diagnostics → HTTP client utilities: uses utilities