A CS2 (Counter-Strike 2) trade-up contract calculator and scanner. It syncs skin prices and listing counts from the Steam Community Market, then computes which trade-up contracts are actually worth it once you account for the ~15% Steam Market sale fee — instead of the misleading gross numbers most calculators show.
- Suggestions — for every synced collection and rarity, finds the cheapest input against the possible outputs of the next rarity and reports best-case / expected / worst-case return, loss risk, and a "break-even in 10 runs" metric.
- Manipulated — searches mixes of two or three different input units (different wears and/or skins, optionally across collections) that beat the plain "buy 10 of the cheapest" strategy by steering the average input float into a cheaper-to-reach range.
- History — a permanent, append-only log of every manipulated contract ever found by a recalculation run, even after it drops off the live list.
- Manual comparator — lets you enter a contract by hand (cost + possible outcomes) and get the same risk/return breakdown.
- Collections & Prices — browse synced collections item by item, with an inline trade-up preview per item.
Pricing is intentionally conservative: a contract is only shown if every possible output has a directly verified price for its predicted wear, with no interpolation or estimation. Output float is computed deterministically from the normalized average float of the 10 inputs, not guessed.
The UI defaults to English and USD, with a language (English/Portuguese) and currency (USD/BRL) switcher in the header.
- Backend: Node.js + Express, SQLite (
node:sqlite, no ORM), a worker thread for the expensive "exhaustive" manipulated-contract search. - Frontend: React + Vite, Recharts for the risk/return scatter plots, lucide-react for icons.
npm run install:all # installs backend + frontend dependencies
npm run dev # runs backend (:8787) and frontend (:5173) togetherThen open http://localhost:5173. The Vite dev server proxies /api requests to the backend.
To run each side on its own:
npm run dev --prefix backend # API on http://localhost:8787
npm run dev --prefix frontend # UI on http://localhost:5173The database starts empty. From the Collections & Prices tab, sync the list of collections from Steam, then fetch prices for at least one collection (or use "Sync all collections" from the Suggestions tab) — trade-up suggestions need prices for two consecutive rarities within the same collection before they can compute anything.
- The Steam Market is rate-limited, so price fetching is deliberately paced — syncing a collection can take anywhere from a few seconds to about a minute.
- The SQLite database file is created under
backend/on first run and is not committed to the repo.