How deepkumar7106/baseball works
Baseoball is a browser-based baseball game with account registration/login, configurable innings, a toss, gameplay against a CPU, and persisted game outcomes and scores. The main path is Home → game setup and toss → game creation → gameplay → score/winner submission; authentication is a separate API flow that establishes browser session state. Profile, history, and scoreboard screens are also present. Some screen and backend wiring is unsampled, so the graph limits those connections to documented or excerpted relationships.
Main entry points: App.jsx Route shell · Game.jsx Gameplay · GameTweaker.jsx Game setup · Auth.jsx Auth screen
Components 19
Web application
- Route shell
frontend/src/App.jsx - Home
frontend/src/pages/Home.jsx - Game setup
frontend/src/components/GameTweaker.jsx - Ball selector
frontend/src/components/BallCountSelector.jsx - Toss and launch
frontend/src/components/home/Toss.jsx - Gameplay
frontend/src/pages/Game.jsx - Game rules
frontend/src/scripts/game.utils.js - Game API client
frontend/src/scripts/game.api.js - Auth screen
frontend/src/pages/Auth.jsx - Session state
frontend/src/context/AuthContext.jsx - Player profile
frontend/src/components/profile/PlayerProfile.jsx - Game history
frontend/src/components/profile/History.jsx - Scoreboard
frontend/src/pages/Scoreboard.jsx
Backend API
- Auth routes
backend/src/routes/auth.router.js - Game routes
backend/src/routes/game.routes.js
Persistence
- Database client
backend/src/lib/prisma.js - SQLite database
backend/prisma/schema.prisma
Other components
- Player
- Browser storage
Connections 20
- Player → Route shell: opens
frontend/src/App.jsx - Route shell → Home: routes to
frontend/src/App.jsx - Route shell → Gameplay: routes to
frontend/src/App.jsx - Route shell → Auth screen: routes to
frontend/src/App.jsx - Route shell → Player profile: routes to
frontend/src/App.jsx - Route shell → Scoreboard: routes to
frontend/src/App.jsx - Home → Game setup: renders
frontend/src/pages/Home.jsx - Game setup → Ball selector: renders
frontend/src/components/GameTweaker.jsx - Game setup → Toss and launch: renders
frontend/src/components/GameTweaker.jsx - Toss and launch → Game routes: creates game
frontend/src/components/home/Toss.jsx - Gameplay → Game rules: uses rules
frontend/src/pages/Game.jsx - Gameplay → Game API client: submits results
frontend/src/pages/Game.jsx - Gameplay → Session state: reads session
frontend/src/pages/Game.jsx - Auth screen → Auth routes: sends auth requests
frontend/src/pages/Auth.jsx - Auth screen → Session state: sets session
frontend/src/pages/Auth.jsx - Session state → Browser storage: persists session
frontend/src/context/AuthContext.jsx - Player profile → Game history: renders
- Auth routes → Database client: queries users
backend/src/routes/auth.router.js - Game routes → Database client: writes game data
backend/src/routes/game.routes.js - Database client → SQLite database: uses adapter