How gamehub-vinix7/web-gamehub works
GameHub lets players browse game deals and prices, inspect platform-specific details and price history, and manage wishlists; admins can inspect synchronization status. The main flow is browser pages calling Laravel API routes, whose controllers query game, price, platform, and wishlist data and return JSON resources. Scheduled deal fetching and platform-price synchronization are documented by the command, job, and service paths, but their source was not sampled, so their internal calls are not asserted. The graph preserves those product stages while limiting edges to relationships evidenced by excerpts, the source index, or route declarations.
Main entry points: api.php API routes · Game.php Games · Platform.php Platforms · api.ts API client
Components 31
Player web app
- Browse games
frontend/app/page.tsx - Game details
frontend/app/games/[id]/page.tsx - Wishlist page
frontend/app/wishlist/page.tsx - Sync dashboard
frontend/app/admin/page.tsx - Game cards
frontend/components/GameCard.tsx - Navigation
frontend/components/HeaderNav.tsx - API client
frontend/lib/api.ts - Auth state
frontend/lib/auth.tsx
HTTP API
- API routes
backend/routes/api.php - Game endpoints
backend/app/Http/Controllers/GameController.php - Filter options
backend/app/Http/Controllers/PlatformController.php - Wishlist endpoints
backend/app/Http/Controllers/WishlistController.php - Authentication
backend/app/Http/Controllers/AuthController.php - Sync log endpoint
backend/app/Http/Controllers/AdminSyncLogController.php - Game responses
backend/app/Http/Resources/GameResource.php - Detail responses
backend/app/Http/Resources/GameDetailResource.php - Sync log responses
backend/app/Http/Resources/SyncLogResource.php
Game catalog and prices
- Games
backend/app/Models/Game.php - Platforms
backend/app/Models/Platform.php - Current prices
backend/app/Models/Price.php - Price history
backend/app/Models/PriceHistory.php
Accounts and administration
- Wishlist records
backend/app/Models/Wishlist.php - Users
backend/app/Models/User.php
Deal synchronization
- Sync records
backend/app/Models/SyncLog.php - Fetch game deals
backend/app/Console/Commands/FetchGameDeals.php - Sync prices command
backend/app/Console/Commands/SyncPrices.php - Platform price sync
backend/app/Jobs/SyncPlatformPrices.php - CheapShark client
backend/app/Services/CheapSharkApiService.php
Other components
- Player
- Admin
- CheapShark
Connections 39
- Player → Browse games: views
frontend/app/page.tsx - Player → Game details: opens
frontend/app/games/[id]/page.tsx - Player → Wishlist page: manages
frontend/app/wishlist/page.tsx - Admin → Sync dashboard: reviews
frontend/app/admin/page.tsx - Browse games → API client: requests
- Game details → API client: requests
- Wishlist page → API client: requests
- Sync dashboard → API client: requests
- API client → API routes: calls
- Auth state → API client: uses
frontend/lib/auth.tsx - API routes → Game endpoints: routes
backend/routes/api.php - API routes → Filter options: routes
backend/routes/api.php - API routes → Wishlist endpoints: routes
backend/routes/api.php - API routes → Authentication: routes
backend/routes/api.php - API routes → Sync log endpoint: routes
backend/routes/api.php - Game endpoints → Games: queries
backend/app/Http/Controllers/GameController.php - Game endpoints → Platforms: filters
backend/app/Http/Controllers/GameController.php - Game endpoints → Game responses: serializes
backend/app/Http/Controllers/GameController.php - Game endpoints → Detail responses: serializes
backend/app/Http/Controllers/GameController.php - Filter options → Platforms: reads
backend/app/Http/Controllers/PlatformController.php - Filter options → Games: reads genres
backend/app/Http/Controllers/PlatformController.php - Wishlist endpoints → Wishlist records: reads and writes
backend/app/Http/Controllers/WishlistController.php - Wishlist endpoints → Games: loads games
backend/app/Http/Controllers/WishlistController.php - Authentication → Users: authenticates
backend/app/Http/Controllers/AuthController.php - Sync log endpoint → Sync records: reads
backend/app/Http/Controllers/AdminSyncLogController.php - Sync log endpoint → Sync log responses: serializes
backend/app/Http/Controllers/AdminSyncLogController.php - Games → Current prices: has prices
backend/app/Models/Game.php - Games → Platforms: relates platforms
backend/app/Models/Game.php - Games → Price history: has history
backend/app/Models/Game.php - Platforms → Current prices: has prices
backend/app/Models/Platform.php - Platforms → Price history: has history
backend/app/Models/Platform.php - Platforms → Sync records: has sync logs
backend/app/Models/Platform.php - Users → Wishlist records: has wishlists
backend/app/Models/User.php - Fetch game deals → CheapShark client: uses
- CheapShark client → CheapShark: requests deals
backend/app/Services/CheapSharkApiService.php - Sync prices command → Platform price sync: dispatches
- Platform price sync → Current prices: updates prices
- Platform price sync → Price history: records history
- Platform price sync → Sync records: records status