How ktaffy/rket works
$RKET is a community-driven rocket-dodging game: players vote for a lane, votes determine the rocket’s position, and the game loop advances obstacles and updates score and lives. The React game screen coordinates voting, gameplay, stats, and score and market-cap milestones; shared hooks synchronize votes and game state through Firebase. Market-cap milestones separately fetch token data from Dexscreener. Some component and hook excerpts were partial, so the graph shows documented composition and sampled integrations without inferring internal details of unsampled components.
Main entry points: Game.jsx Game coordinator · useSharedVoting.js Shared voting · useSharedGameLoop.js Shared game loop · VotingPanel.jsx Voting panel
Components 15
Application
- App entry
src/App.js
Game and voting
- Game coordinator
src/components/Game.jsx - Shared voting
src/hooks/useSharedVoting.js - Shared game loop
src/hooks/useSharedGameLoop.js - Voting panel
src/components/VotingPanel.jsx - Game canvas
src/components/GameCanvas.jsx - Obstacle display
src/components/Obstacle.jsx - Vote timer
src/components/VoteTimer.jsx - Game stats
src/components/GameStats.jsx
Progress milestones
- Market milestones
src/components/MarketCapMilestones.jsx - Score milestones
src/components/ScoreMilestones.jsx
External services
- Firebase setup
src/firebase.js - Firebase Realtime Database
- Dexscreener API
Other components
- Player
Connections 21
- Player → App entry: opens game
- App entry → Game coordinator: renders
- Player → Voting panel: chooses direction
- Game coordinator → Shared voting: reads votes
- Game coordinator → Shared game loop: runs game
- Shared voting → Game coordinator: returns position
- Shared game loop → Game coordinator: returns state
- Game coordinator → Voting panel: supplies vote data
- Voting panel → Game coordinator: submits vote
- Game coordinator → Game canvas: supplies game state
- Game coordinator → Game stats: supplies game state
- Game coordinator → Vote timer: renders
- Game coordinator → Obstacle display: renders
- Game coordinator → Market milestones: renders
- Game coordinator → Score milestones: supplies score
- Shared voting → Firebase setup: uses database
- Shared game loop → Firebase setup: uses database
- Firebase setup → Firebase Realtime Database: initializes
- Shared voting → Firebase Realtime Database: reads and updates votes
- Shared game loop → Firebase Realtime Database: syncs game state
- Market milestones → Dexscreener API: fetches market cap