How bechiixd/keydrop-cases-simulator works
Keydrop Simulator is a local, single-user CS2 case-opening strategy tool: users browse imported case data, run batch or realistic openings, and inspect outcomes they can verify through a shared provably-fair chain. It also supports battle simulations, inventory and upgrade flows, plus fake-balance/history management. The graph follows documented routes and indexed imports; several UI implementations were not sampled, so their internal wiring is omitted where it cannot be established.
Main entry points: route.ts Scrape API · caseEngine.ts Opening and batch engine · cache.ts Case cache · SimPageClient.tsx Simulation mode selector
Components 26
Case catalog
- Case browser and detail
components/HomeCasesClient.tsx - Case detail page
app/cases/[slug]/page.tsx - Case management and paste
components/ManageCasesClient.tsx - Scrape API
app/api/scrape/route.ts - Keydrop fetch
lib/scraper/keydrop.ts - Case normalization
lib/scraper/normalize.ts - Case cache
lib/scraper/cache.ts - Image mirror
lib/mirror.ts
Simulations
- Simulation mode selector
components/SimPageClient.tsx - Batch simulator
components/SimClient.tsx - Realistic opening
components/OpenRealistic.tsx - Battle simulator
components/BattleClient.tsx - Battle calculation
lib/battleEngine.ts
Fairness and engines
- Opening and batch engine
lib/caseEngine.ts - Fair ticket and picks
lib/provablyFair.ts - SHA-256 and HMAC
lib/sha256.ts - Drop verification API
app/api/provably-fair/route.ts - Drop verifier
components/SimVerifier.tsx
Local economy
- Balance and history
components/BalanceClient.tsx - Inventory
app/inventory/page.tsx - Inventory upgrader
components/UpgraderClient.tsx - Upgrade calculation
lib/upgrader.ts - Inventory storage
lib/inventory.ts - Browser localStorage
lib/storage.ts
Other components
- User
- Keydrop
Connections 34
- User → Case browser and detail: browses
- User → Simulation mode selector: simulates
- User → Battle simulator: runs battles
- User → Balance and history: manages balance
- Keydrop → Keydrop fetch: supplies case data
- Scrape API → Keydrop fetch: fetches
- Scrape API → Case normalization: normalizes input
app/api/scrape/route.ts - Keydrop fetch → Case normalization: uses
lib/scraper/keydrop.ts - Scrape API → Case cache: reads and writes
app/api/scrape/route.ts - Scrape API → Image mirror: runs mirror
app/api/scrape/route.ts - Case browser and detail → Case cache: loads cases
app/page.tsx - Case detail page → Case cache: loads case
app/cases/[slug]/page.tsx - Case management and paste → Scrape API: manages cases
- Simulation mode selector → Batch simulator: selects mode
components/SimPageClient.tsx - Simulation mode selector → Realistic opening: selects mode
components/SimPageClient.tsx - Simulation mode selector → Case cache: loads cases
app/sim/page.tsx - Batch simulator → Opening and batch engine: runs batches
components/SimClient.tsx - Realistic opening → Opening and batch engine: opens case
- Battle simulator → Battle calculation: runs battle
components/BattleClient.tsx - Battle calculation → Opening and batch engine: runs batches
lib/battleEngine.ts - Opening and batch engine → Fair ticket and picks: computes ticket and picks
lib/caseEngine.ts - Fair ticket and picks → SHA-256 and HMAC: hashes and signs
lib/provablyFair.ts - Batch simulator → Drop verifier: renders verifier
components/SimClient.tsx - Drop verifier → Drop verification API: requests verification
- Drop verification API → Case cache: loads case data
app/api/provably-fair/route.ts - Drop verification API → Opening and batch engine: recomputes drop
app/api/provably-fair/route.ts - Drop verification API → Fair ticket and picks: verifies ticket
app/api/provably-fair/route.ts - Balance and history → Browser localStorage: reads and writes
components/BalanceClient.tsx - Inventory → Inventory storage: manages items
app/inventory/page.tsx - Inventory upgrader → Inventory storage: uses inventory
components/UpgraderClient.tsx - Inventory upgrader → Upgrade calculation: calculates upgrades
components/UpgraderClient.tsx - Inventory storage → Browser localStorage: persists items
lib/inventory.ts - Batch simulator → Browser localStorage: stores balance and history
components/SimClient.tsx - Battle simulator → Inventory storage: records outcomes
components/BattleClient.tsx