How iamrealcitizen/project_client works
CrewCheck is a Unity WebGL real-time social-deduction game client. Players authenticate, discover or create rooms, configure and join a lobby, then play server-authoritative night/day/vote rounds and view the result. The README documents the major capabilities; the tree identifies their source modules, but most runtime files were not excerpted, so edges are limited to explicit README relationships and sampled source references. REST, WebSocket signaling, and the browser social-auth bridge are represented separately.
Main entry points: GameScreen.cs Game Screen · ApiClient.cs REST Client · GameController.cs Game Controller · AuthUIController.cs Sign-in UI
Components 25
Identity & Community
- Sign-in UI
Assets/02_Scripts/Auth/AuthUIController.cs - Authentication
Assets/02_Scripts/Auth/AuthService.cs - Social Provider
Assets/02_Scripts/Auth/WebGLSocialAuthProvider.cs - Profile
Assets/02_Scripts/Profile/LobbyProfileController.cs - Friends
Assets/02_Scripts/Friend/FriendUIController.cs
Lobby & Rooms
- Lobby
Assets/02_Scripts/Lobby/LobbyUIController.cs - Room API
Assets/02_Scripts/Lobby/RoomApi.cs - Room Session
Assets/02_Scripts/Lobby/RoomSession.cs - Waiting Room
Assets/02_Scripts/Room/RoomUIController.cs
Game Lifecycle
- Role Setup
Assets/02_Scripts/Game/Core/RoleSetupRules.cs - Game Controller
Assets/02_Scripts/Game/GameController.cs - Game Session
Assets/02_Scripts/Game/Core/GameSession.cs - Game Rules
Assets/02_Scripts/Game/Core/AbilityRules.cs - Phase & Clock
Assets/02_Scripts/Game/Core/PhaseTracker.cs
Client Presentation
- Game Screen
Assets/02_Scripts/Game/Screen/GameScreen.cs - Game HUD
Assets/02_Scripts/GameUI/DayRoundTableView.cs - Voting UI
Assets/02_Scripts/Vote/VotePanelController.cs - Chat
Assets/02_Scripts/Chat/GameChatController.cs - Result Sequence
Assets/02_Scripts/GameUI/GameResultSequence.cs - Audio & Display
Assets/02_Scripts/Common/Audio_System/AudioSystemManager.cs
Networking
- REST Client
Assets/02_Scripts/Network/ApiClient.cs - Realtime Client
Assets/02_Scripts/Network/RealtimeClient.cs - WebSocket Transport
Assets/02_Scripts/Network/Realtime/BrowserWebSocketTransport.cs
Other components
- Player
- Game Server
Connections 27
- Player → Sign-in UI: signs in
README.md - Sign-in UI → Authentication: requests auth
- Authentication → REST Client: uses REST
- Sign-in UI → Social Provider: starts social login
README.md - Social Provider → Game Server: sends auth code
README.md - Player → Lobby: browses rooms
README.md - Lobby → Room API: requests rooms
- Room API → REST Client: uses REST
- Player → Waiting Room: joins room
README.md - Waiting Room → Room Session: updates session
- Waiting Room → Role Setup: configures roles
- Game Controller → Game Session: controls session
- Game Session → REST Client: requests state
README.md - Game Session → Realtime Client: subscribes signals
README.md - Realtime Client → WebSocket Transport: uses transport
- WebSocket Transport → Game Server: receives signals
README.md - Realtime Client → REST Client: triggers refresh
README.md - Player → Game Screen: plays rounds
README.md - Game Screen → Game Controller: submits actions
- Game Controller → Game Rules: checks abilities
- Game Controller → Phase & Clock: tracks phases
- Game Screen → Game HUD: shows game state
- Game Screen → Voting UI: presents voting
- Game Screen → Chat: presents chat
- Game Screen → Result Sequence: shows outcome
- Player → Audio & Display: adjusts settings
README.md - REST Client → Game Server: sends REST requests
README.md