How suspect147/lucky-cubes works
Lucky Cubes is a browser-based idle cube game, presented in a Telegram-oriented context. Players roll the cube to gain XP and coins, progress through levels and Rainbow Mode, then use progression and currency across quests, skins, boosts, cases, and social features. The graph includes documented major features whose code was not sampled; their paths use supported enclosing directories. Edges are limited to relationships visible in excerpts or stated in the README, so several feature branches remain unconnected where wiring was not shown.
Main entry points: game.js Roll and rewards · api.js Authenticated API · loader.js Cube animations · inventory.js Inventory and cases
Components 21
Core gameplay
- Roll interaction
scr/js/game/events.js - Roll and rewards
scr/js/game/game.js - Cube animations
scr/js/game/loader.js - TGS skin assets
assets/UI/cubics
Progression
- XP and levels
scr/js/game/game.js - Rainbow Mode
scr/js/game/game.js
Game features
- Quests
scr/js/ui/quests.js - Daily rewards
scr/js/ui/daily-login.js - Shop and boosts
scr/js/ui/shop.js - Inventory and cases
scr/js/ui/inventory.js - Leaderboard
scr/js/ui/leaderboard.js - Squads
scr/js/ui/squads.js - Game menus
scr/js/ui/menu.js - Onboarding
scr/js/ui/onboarding.js
Platform services
- Authenticated API
scr/js/api.js - Game server
- Game configuration
scr/js/config.js - Wallet and top-ups
scr/js/wallet.js - Translations
scr/js/utils/lang.js - Backend client
scr/js/backend.js
Other components
- Player
Connections 24
- Player → Roll interaction: taps cube
scr/js/game/events.js - Roll interaction → Roll and rewards: invokes roll
scr/js/game/events.js - Roll and rewards → Authenticated API: requests roll
- Authenticated API → Game server: sends requests
scr/js/api.js - Game server → Authenticated API: returns state
scr/js/api.js - Roll and rewards → Cube animations: loads animations
- Cube animations → TGS skin assets: fetches TGS
scr/js/game/loader.js - Game configuration → Cube animations: configures assets
scr/js/game/loader.js - Roll and rewards → XP and levels: awards XP
README.md - Roll and rewards → Rainbow Mode: triggers mode
README.md - Player → Quests: views goals
- Player → Daily rewards: claims rewards
- Player → Shop and boosts: browses items
- Shop and boosts → Inventory and cases: updates owned skins
scr/js/ui/shop.js - Player → Inventory and cases: opens inventory
- Inventory and cases → Authenticated API: opens cases
scr/js/ui/inventory.js - Player → Leaderboard: views rankings
- Player → Squads: manages squad
- Player → Wallet and top-ups: connects wallet
- Wallet and top-ups → Authenticated API: submits donation
scr/js/wallet.js - Player → Game menus: navigates
- Player → Onboarding: starts game
- Translations → Game menus: translates interface
- Backend client → Game server: sends requests