How arkanbeta/flip7-se-sec-1- works
Flip 7 Online is a browser-based multiplayer card game: players sign in with Google, create or join private rooms by code, play Flip 7 in real time, and can view profiles, match history, and rules. The graph follows that user journey through the React client, Express services, in-memory room/game state, and MySQL persistence. README documents the full product scope; some unsampled frontend and backend subsystem links are therefore documented rather than source-verified.
Main entry points: gameManager.js Live game manager · app.js API composition · authService.js Auth workflow · roomService.js Room service
Components 23
Browser client
- React app
frontend/src/app/App.jsx - Sign-in pages
frontend/src/features/auth - Lobby
frontend/src/features/lobby/LobbyPage.jsx - Room screen
frontend/src/features/rooms/RoomPage.jsx - Game board
frontend/src/features/game/GameBoard.jsx - Profile and rules
frontend/src/features/profile - HTTP client
frontend/src/services/api.js - Socket client
frontend/src/services/socket.js
Identity and profiles
- Auth state
frontend/src/app/AuthProvider.jsx - Auth endpoints
backend/src/controllers/authController.js - Auth workflow
backend/src/services/authService.js - Google OAuth
backend/src/services/googleOAuthService.js - User and profile services
backend/src/services/userService.js
Rooms and realtime
- Room service
backend/src/services/roomService.js - Room state
backend/src/realtime/roomManager.js - Socket server
backend/src/realtime/socketServer.js - API composition
backend/src/app.js
Gameplay and records
- Flip 7 rules
backend/src/game/flip7Game.js - Live game manager
backend/src/game/gameManager.js - Match records
backend/src/services/matchService.js - MySQL
backend/src/db/pool.js
Other components
- Player
Connections 24
- Player → React app: uses
README.md - React app → Auth state: wraps
frontend/src/app/App.jsx - Auth state → HTTP client: loads identity
frontend/src/app/AuthProvider.jsx - Player → Google: signs in
README.md - Auth endpoints → Auth workflow: delegates to
backend/src/controllers/authController.js - Auth workflow → Google OAuth: verifies with
backend/src/services/authService.js - Google OAuth → Google: exchanges code
backend/src/services/googleOAuthService.js - Auth workflow → User and profile services: looks up users
backend/src/services/authService.js - Player → Lobby: creates or joins
README.md - Lobby → HTTP client: requests rooms
README.md - Room service → Room state: updates room state
backend/src/services/roomService.js - API composition → Room service: configures
backend/src/app.js - API composition → Room state: creates
backend/src/app.js - API composition → Live game manager: creates
backend/src/app.js - Socket server → Room service: serves room events
README.md - Room screen → Socket client: joins live room
README.md - Player → Room screen: manages room
README.md - Player → Game board: plays match
README.md - Game board → Socket client: sends game actions
README.md - Live game manager → Flip 7 rules: runs rules
backend/src/game/gameManager.js - Live game manager → Room state: updates match state
backend/src/game/gameManager.js - Live game manager → Match records: reports results
backend/src/app.js - Match records → MySQL: writes records
README.md - Player → Profile and rules: views history and rules
README.md