How ofir01/game-on-next-react works
This repository is a game-discovery and play portal, with account features, community interactions, administration, and several auxiliary experiences. The main visitor workflow is browsing or filtering games, opening a game page, and starting play; logged-in users can also manage a library or wishlist and contribute ratings and comments. Server services and Sequelize models form the internal data layer. The README also describes a Classroom feature and an AI assistant. Many routes and dashboard modules were not sampled, so their detailed call paths are not asserted here.
Main entry points: index.js Application database · page.jsx Game search · useGame.js Game data hook · gameSessionService.js Game sessions
Components 24
Game discovery
- Home page
app/page.jsx - Game search
app/Search/page.jsx - Game details
app/[Slug]/page.jsx - Game data hook
app/hooks/useGame.js - Game card
app/Component/Card/Card.jsx - Game editor
app/Component/Card/EditingGame.jsx
Accounts and community
- Game comments
app/Component/Comment/GameComments.jsx - Auth context
app/Context/AuthContext.jsx - Auth client
services/client/authService.js
Server and data
- API client
lib/api-client.js - Auth service
services/server/AuthService.js - Game service
services/server/GameService.js - Game sessions
services/server/gameSessionService.js - Session API
app/api/game-session/route.js - AI assistant API
app/api/chat/route.js - Application database
db/models/index.js
Administration
- Admin dashboard
app/dashboard - Admin APIs
app/api/admin - News management
app/dashboard/NewsManager/page.jsx
Other experiences
- Classroom
app/other/Classroom/page.jsx - CookJoy
app/other/CookJoy/page.jsx - MovieNest
app/other/MovieNest/page.jsx - Weather app
app/other/WeatherApp/page.jsx
Other components
- Visitor
Connections 17
- Visitor → Home page: opens
app/page.jsx - Visitor → Game search: searches
app/Search/page.jsx - Game search → Game data hook: loads games
app/Search/page.jsx - Game search → Game card: renders results
app/Search/page.jsx - Game details → Game data hook: loads game
app/[Slug]/page.jsx - Game details → Game comments: shows comments
app/[Slug]/page.jsx - Game data hook → Game service: uses service
app/hooks/useGame.js - Auth context → Auth client: uses service
app/Context/AuthContext.jsx - Auth client → API client: sends requests
services/client/authService.js - Auth service → Application database: reads and writes
services/server/AuthService.js - Auth service → Game sessions: creates session
services/server/AuthService.js - Game service → Application database: queries data
services/server/GameService.js - Session API → Game sessions: delegates
app/api/game-session/route.js - Game sessions → Application database: updates sessions
services/server/gameSessionService.js - AI assistant API → Application database: queries data
app/api/chat/route.js - Admin dashboard → Admin APIs: manages records
- News management → Admin APIs: manages news