The Problem
Finding the best game deal across Steam, GOG, Humble Bundle, and Epic Games means checking multiple stores, comparing regional prices, and tracking price history manually. Dealve-tui puts that workflow in a terminal: it queries IsThereAnyDeal's API, filters deals by platform and region, and renders results in a Ratatui-based interface.
What This Does
Dealve-tui is a Rust workspace with three crates: core/ for shared domain types, api/ for the IsThereAnyDeal client, and tui/ for the terminal application. The tui/src/main.rs entry point launches an interactive UI with onboarding, search, filtering, and price history views.
The API layer (api/src/endpoints.rs) exposes get_deals, search_games, get_game_info, and get_prices_for_games. The UI layer (tui/src/update.rs, tui/src/model.rs) handles state transitions and rendering. Configuration lives in ~/.config/dealve/config.json, managed by tui/src/config.rs.
How It Is Wired
Execution starts at main in tui/src/main.rs:26, which reaches 49 functions. It calls run (line 60), which initializes the terminal, loads config, and enters the event loop. handle_event in tui/src/events.rs dispatches keys to handle_key, handle_platform_key, and handle_options_key.
The update function in tui/src/update.rs is the hub: it calls none 38 times, select 18 times, with_selection_changed 17 times, and with_reload 8 times. It routes through filtered_deals and save_to_config (7 calls each). The five most-called functions—accent (16), text_primary (14), palette (13), primary_light (12), text_dimmed (8)—are all theme helpers in tui/src/view/styles.rs, so changing the color system breaks the most code.
File responsibilities by call volume:
tui/src/model.rs— 38 functions, 15 types, called from 8 files; owns UI state and selection logic.tui/src/view/styles.rs— 23 functions, called from 10 files; the theme system.core/src/models.rs— 12 functions, 10 types; shared domain models.tui/src/config.rs— 21 functions; config load/save and platform grouping.api/src/types.rs— 14 types; API response shapes.
Network effects: api/src/client.rs (ItadClient) holds the API key and base URL; api/src/endpoints.rs makes the HTTP calls. No database—state is in-memory plus the JSON config file.
How To Use It
git clone https://github.com/kurama/dealve-tui
cd dealve-tui
cargo install --locked --path tui
dealve
First launch runs onboarding (tui/src/onboarding.rs) to collect an IsThereAnyDeal API key, stored in ~/.config/dealve/config.json. Copy .env.example to .env if you want to set the key via environment variable instead.
Real-World Use
A gamer who wants a weekly Steam sale check runs dealve, searches for a title, filters by platform, and views the price chart to decide whether to buy now or wait. The same binary works for regional price comparison across the configured regions.
Code Health & Issues
Static analysis found 7 findings (2 high, 5 medium, 0 low):
- High — Deep nesting in
tui/src/onboarding.rs,tui/src/update.rs,tui/src/tasks.rs: max indentation depth 9 makes control flow hard to follow. Fix with early returns and guard clauses. - Medium — Oversized files:
tui/src/onboarding.rs(666 lines),tui/src/update.rs,tui/src/view/popups.rs. Split by responsibility.
Additional SDLC observations from the file structure:
- High — No test suite: 21 source files, zero test files. Add tests per public entry point and a CI step.
- High — Third-party GitHub Actions pinned to tags (
dtolnay/rust-toolchain@stable,Swatinem/rust-cache@v2), not commit SHAs. Tags can be moved; pin to SHAs. - Medium — No
permissionsdeclaration in workflows;GITHUB_TOKENinherits repo defaults. Setcontents: read. - Medium — No Dependabot/Renovate config; add
.github/dependabot.yml. - Medium — No dependency vulnerability scan in CI; add
dependency-review-actionorosv-scanner. - Medium —
persist-credentialsnot disabled on checkout; set tofalse. - Low — No
timeout-minuteson workflow jobs; add realistic bounds.
The Bottom Line
Dealve-tui is a well-structured Rust workspace with clean crate separation and a real API integration. The UI layer carries the complexity—the theme system and update.rs are where changes ripple widest. It's usable today for anyone comfortable with cargo install, but the missing test suite and unpinned CI actions are the first things to fix before relying on it in production.