How bilal2417/cricket-rebirth works
This is a React cricket game, rather than the generic React/Vite template described by the README. Its main flow is navigation into game modes, selection and match play, then a result screen; it also includes tournaments, profiles, packs, shop and online play. The excerpts show routing, match-state handling, team data, scoreboard imports, and some Supabase and Netlify interactions. Several page and function implementations were not sampled, so their internal calls and some connections are left out.
Main entry points: App.jsx App routes · score.jsx Match engine · supabaseClient.js Supabase client · Toss.jsx Toss
Components 21
Application
- App routes
src/App.jsx - Home
src/pages/Home.jsx - Game modes
src/pages/Modes.jsx
Cricket gameplay
- Team selection
src/pages/Selection.jsx - Fixtures
src/pages/Fixtures.jsx - Tournament
src/pages/Tournament.jsx - Toss
src/pages/Toss.jsx - Match engine
src/components/score.jsx - Online match
src/components/scoreOnline.jsx - Match team data
src/components/data.jsx - Scoreboard themes
src/components - Match result
src/pages/Result.jsx
Player features
- Profile pages
src/pages/Profile.jsx - Card packs
src/pages/Opening.jsx - Shop
src/pages/Shop.jsx - Battle log
src/pages/Log.jsx
Backend services
- Supabase client
src/supabaseClient.js - Supabase
- Profile functions
netlify/functions - Netlify Functions
Other components
- Player
Connections 23
- Player → App routes: uses
- App routes → Home: routes to
src/App.jsx - App routes → Game modes: routes to
src/App.jsx - App routes → Profile pages: routes to
src/App.jsx - App routes → Card packs: routes to
src/App.jsx - App routes → Shop: routes to
src/App.jsx - App routes → Tournament: routes to
src/App.jsx - App routes → Battle log: routes to
src/App.jsx - App routes → Match engine: imports
src/App.jsx - Home → Supabase client: uses
src/pages/Home.jsx - Match engine → Match team data: loads
src/components/score.jsx - Match engine → Scoreboard themes: imports themes
src/components/score.jsx - Online match → Match team data: loads
src/components/scoreOnline.jsx - Online match → Supabase client: uses
src/components/scoreOnline.jsx - Toss → Supabase client: uses
src/pages/Toss.jsx - Match result → Supabase client: uses
src/pages/Result.jsx - Supabase client → Supabase: connects
src/supabaseClient.js - App routes → Netlify Functions: requests activity
src/App.jsx - Netlify Functions → Profile functions: dispatches
- Team selection → Fixtures: prepares match
- Fixtures → Toss: continues to
- Toss → Match engine: starts play
- Match engine → Match result: ends at