How pranav30r/cricket-tournament works
This is a cricket tournament management application: users browse tournaments, teams, matches and player statistics; authorized scorers record live ball-by-ball play, with scorecards and live updates as results. The React client calls an Express API backed by SQLite. Tournament/fixture management, scoring, authentication and roles, statistics, administration, reports, search, notifications, and CSV synchronization are represented as distinct capabilities. Several routes and frontend views are unsampled; their presence and some connections are supported by the source index or route registration, not inspected implementation details.
Main entry points: server.js HTTP server · App.jsx App routing · scoring.js Live scoring · db.js SQLite database
Components 28
Web client
- App routing
frontend/src/App.jsx - Authentication UI
frontend/src/components/auth/LoginPage.jsx - Dashboard
frontend/src/components/dashboard/Dashboard.jsx - Tournament views
frontend/src/components/tournaments/TournamentDetails.jsx - Scoring and scorecards
frontend/src/components/scoring/ScoringPanel.jsx - Player profiles
frontend/src/components/players/PlayerProfile.jsx - Statistics views
frontend/src/components/tournaments/StatsLeaderboard.jsx - Auth context
frontend/src/contexts/AuthContext.jsx - Socket context
frontend/src/contexts/SocketContext.jsx - API client
frontend/src/services/api.js
API and access
- HTTP server
backend/server.js - Auth routes
backend/routes/auth.js - Authentication and roles
backend/middleware/auth.js - Role checks
backend/middleware/rbac.js - Supporting routes
backend/routes - Realtime socket
backend/config/socket.js
Cricket operations
- Tournament management
backend/routes/tournaments.js - Teams and players
backend/routes/teams.js - Matches and fixtures
backend/routes/matches.js - Live scoring
backend/routes/scoring.js - Statistics engine
backend/services/statsEngine.js - Points table
backend/services/pointsTable.js - Fixture generator
backend/services/fixtureGenerator.js
Persistence and outputs
- SQLite database
backend/config/db.js - Domain schema
backend/models/schema.js - CSV synchronization
backend/services/csvSync.js - Report generation
backend/services/reportGenerator.js
Other components
- User
Connections 46
- User → App routing: uses
- App routing → Authentication UI: routes to
frontend/src/App.jsx - App routing → Dashboard: routes to
frontend/src/App.jsx - App routing → Tournament views: routes to
frontend/src/App.jsx - App routing → Scoring and scorecards: routes to
frontend/src/App.jsx - App routing → Player profiles: routes to
frontend/src/App.jsx - App routing → Statistics views: routes to
frontend/src/App.jsx - Authentication UI → Auth context: uses
frontend/src/components/auth/LoginPage.jsx - Auth context → API client: calls
frontend/src/contexts/AuthContext.jsx - Dashboard → API client: calls
frontend/src/components/dashboard/Dashboard.jsx - Tournament views → API client: calls
frontend/src/components/tournaments/TournamentDetails.jsx - Scoring and scorecards → API client: calls
frontend/src/components/scoring/ScoringPanel.jsx - Scoring and scorecards → Socket context: subscribes
frontend/src/contexts/SocketContext.jsx - Player profiles → API client: calls
frontend/src/components/players/PlayerProfile.jsx - Statistics views → API client: calls
- API client → HTTP server: HTTP requests
frontend/src/services/api.js - HTTP server → Auth routes: mounts
backend/server.js - HTTP server → Tournament management: mounts
backend/server.js - HTTP server → Teams and players: mounts
backend/server.js - HTTP server → Matches and fixtures: mounts
backend/server.js - HTTP server → Live scoring: mounts
backend/server.js - HTTP server → Supporting routes: mounts
backend/server.js - HTTP server → Realtime socket: sets up
backend/server.js - Auth routes → Authentication and roles: uses
backend/routes/auth.js - Auth routes → SQLite database: queries
backend/routes/auth.js - Matches and fixtures → Authentication and roles: uses
backend/routes/matches.js - Matches and fixtures → Role checks: checks roles
backend/routes/matches.js - Matches and fixtures → Fixture generator: generates fixtures
backend/routes/matches.js - Matches and fixtures → SQLite database: queries
backend/routes/matches.js - Live scoring → Authentication and roles: uses
backend/routes/scoring.js - Live scoring → Role checks: checks roles
backend/routes/scoring.js - Live scoring → Points table: updates
backend/routes/scoring.js - Live scoring → Fixture generator: uses
backend/routes/scoring.js - Live scoring → Realtime socket: emits updates
backend/routes/scoring.js - Live scoring → SQLite database: writes
backend/routes/scoring.js - Tournament management → Statistics engine: uses
backend/routes/tournaments.js - Tournament management → Points table: uses
backend/routes/tournaments.js - Tournament management → SQLite database: queries
backend/routes/tournaments.js - Teams and players → Statistics engine: uses
backend/routes/teams.js - Teams and players → SQLite database: queries
backend/routes/teams.js - Statistics engine → SQLite database: queries
backend/services/statsEngine.js - Domain schema → SQLite database: initializes
backend/server.js - HTTP server → Domain schema: initializes
backend/server.js - HTTP server → CSV synchronization: runs initial sync
backend/server.js - CSV synchronization → SQLite database: reads
backend/services/csvSync.js - Supporting routes → Report generation: may invoke