How ganes-ha/turfmasters works
CricVault is a box-cricket scoring and tournament web app. Scorers configure a match, launch innings, record and revise deliveries, and review results; spectators can follow shared live matches. Tournament management, historical match records, analytics, and sharing are distinct supporting workflows. App.tsx is the main stateful controller, coordinating screens and cloud operations. The graph follows README capabilities and source-index references; unsampled implementation details are represented by their exact existing directories, and uncertain connections are omitted.
Main entry points: App.tsx App Controller · firebase.ts Cloud Service · TournamentScreen.tsx Tournament Screen · ScorecardScreen.tsx Scorecard & Stats
Components 20
Match Scoring
- App Controller
src/App.tsx - Match Setup
src/components/SetupScreen.tsx - New Match
src/components/NewMatchModal.tsx - Innings Setup
src/components/StartInningsModal.tsx - Live Scoring
src/components/LiveScoringScreen.tsx - Wicket Handling
src/components/WicketModal.tsx - Bowler Selection
src/components/ChangeBowlerModal.tsx - Cricket Rules
src/utils/cricketRules.ts - Default Squads
src/data/defaultSquad.ts
Tournament Management
- Tournament Screen
src/components/TournamentScreen.tsx - Tournament Setup
src/components/CreateTournamentModal.tsx - Tournament Engine
src/utils/tournamentEngine.ts
History & Sharing
- Scorecard & Stats
src/components/ScorecardScreen.tsx - Match History
src/components/HistoryScreen.tsx - Sharing & Posters
src/utils/socialGraphics.ts
Identity & Cloud
- Account Access
src/components/AuthModal.tsx - Cloud Service
src/services/firebase.ts - Firebase
Other components
- Scorer
- Spectator
Connections 26
- Scorer → App Controller: operates
README.md - Spectator → App Controller: views matches
README.md - App Controller → Match Setup: renders
src/App.tsx - App Controller → New Match: renders
src/App.tsx - App Controller → Innings Setup: renders
src/App.tsx - App Controller → Live Scoring: renders
src/App.tsx - App Controller → Wicket Handling: routes
src/App.tsx - App Controller → Bowler Selection: routes
src/App.tsx - App Controller → Cricket Rules: calculates with
src/App.tsx - App Controller → Default Squads: loads
src/App.tsx - Live Scoring → Cricket Rules: uses
src/components/LiveScoringScreen.tsx - App Controller → Tournament Screen: renders
src/App.tsx - App Controller → Scorecard & Stats: renders
src/App.tsx - App Controller → Match History: renders
src/App.tsx - App Controller → Account Access: renders
src/App.tsx - Tournament Screen → Tournament Engine: resolves fixtures
src/components/TournamentScreen.tsx - Tournament Screen → Tournament Setup: opens setup
src/components/TournamentScreen.tsx - Tournament Setup → Tournament Engine: creates tournament
src/components/CreateTournamentModal.tsx - Scorecard & Stats → Cricket Rules: uses analytics
src/components/ScorecardScreen.tsx - Scorecard & Stats → Sharing & Posters: generates graphics
src/components/ScorecardScreen.tsx - Account Access → Cloud Service: registers users
src/components/AuthModal.tsx - App Controller → Cloud Service: syncs matches
src/App.tsx - App Controller → Cloud Service: loads history
src/App.tsx - App Controller → Cloud Service: saves tournaments
src/App.tsx - Cloud Service → Firebase: reads and writes
src/services/firebase.ts - Cloud Service → Spectator: shares live updates
README.md