How chefnguyen/goiflow works
GoiFlow is a Japanese vocabulary-learning game with account/profile features, multiplayer rooms, live quiz rounds, Shiritori, history, leaderboards, and a vocabulary library. The main workflow is a player joining or creating a room, playing rounds, submitting answers, and viewing results. Source excerpts show parts of the game, auth, and vocabulary paths; other branches are represented from the repository tree, with unverified links marked dashed.
Main entry points: ActiveGamePlayService.java Live round engine · repository Relational data · GameSessionService.java Session lifecycle · GameSessionController.java Room and session API
Components 32
Web client
- Game screen
web/src/app/(app)/game/page.tsx - Shiritori screen
web/src/app/(app)/shiritori/page.tsx - History screen
web/src/app/(app)/history/page.tsx - Results screen
web/src/app/(app)/results/page.tsx - Leaderboard screen
web/src/app/(app)/leaderboard/leaderboard-client.tsx - Vocabulary library
web/src/app/(app)/library/library-client.tsx - Profile screen
web/src/app/(app)/(protected)/profile/page.tsx - Sign-up screen
web/src/app/(auth)/sign-up/page.tsx
Identity and profile
- Auth endpoints
api/src/main/java/com/goiflow/controller/AuthController.java - Auth service
api/src/main/java/com/goiflow/service/AuthService.java - OAuth integration
api/src/main/java/com/goiflow/security/CustomOAuth2UserService.java - Profile service
api/src/main/java/com/goiflow/service/ProfileService.java
Multiplayer gameplay
- Room and session API
api/src/main/java/com/goiflow/controller/GameSessionController.java - Session lifecycle
api/src/main/java/com/goiflow/service/GameSessionService.java - Live round engine
api/src/main/java/com/goiflow/service/ActiveGamePlayService.java - Shiritori rules
api/src/main/java/com/goiflow/service/ShiritoriService.java - Game history
api/src/main/java/com/goiflow/service/GameHistoryService.java - Results and ranking
api/src/main/java/com/goiflow/service/GameResultsService.java - Leaderboard service
api/src/main/java/com/goiflow/service/LeaderboardService.java - Shiritori endpoints
api/src/main/java/com/goiflow/controller/ShiritoriController.java
Learning and discovery
- Library service
api/src/main/java/com/goiflow/service/LibraryService.java - Content selection
api/src/main/java/com/goiflow/service/ContentSelectionService.java - Vocabulary endpoints
api/src/main/java/com/goiflow/controller/VocabularyController.java
Persistence and cache
- Relational data
api/src/main/java/com/goiflow/repository - Vocabulary entries
api/src/main/java/com/goiflow/entity/content/VocabularyEntryEntity.java - Game session data
api/src/main/java/com/goiflow/entity/game/GameSessionEntity.java - Participant data
api/src/main/java/com/goiflow/entity/game/GameParticipantEntity.java - Round data
api/src/main/java/com/goiflow/entity/game/GameRoundEntity.java - Answer submissions
api/src/main/java/com/goiflow/entity/game/GameSubmissionEntity.java - Redis cache
api/src/main/java/com/goiflow/service/RedisCacheService.java
Other components
- Player
- Email delivery
api/src/main/java/com/goiflow/service/EmailService.java
Connections 37
- Player → Game screen: plays in
- Game screen → Room and session API: calls
- Room and session API → Session lifecycle: delegates to
api/src/main/java/com/goiflow/controller/GameSessionController.java - Room and session API → Live round engine: delegates to
api/src/main/java/com/goiflow/controller/GameSessionController.java - Room and session API → Game history: delegates to
api/src/main/java/com/goiflow/controller/GameSessionController.java - Session lifecycle → Live round engine: resets play state
api/src/main/java/com/goiflow/service/GameSessionService.java - Session lifecycle → Relational data: reads and writes
api/src/main/java/com/goiflow/service/GameSessionService.java - Live round engine → Relational data: reads and writes
api/src/main/java/com/goiflow/service/ActiveGamePlayService.java - Live round engine → Content selection: formats vocabulary
api/src/main/java/com/goiflow/service/ActiveGamePlayService.java - Live round engine → Redis cache: caches entries
api/src/main/java/com/goiflow/service/ActiveGamePlayService.java - Live round engine → Vocabulary entries: loads entries
api/src/main/java/com/goiflow/service/ActiveGamePlayService.java - Session lifecycle → Game session data: persists sessions
api/src/main/java/com/goiflow/service/GameSessionService.java - Session lifecycle → Participant data: persists players
api/src/main/java/com/goiflow/service/GameSessionService.java - Live round engine → Round data: persists rounds
api/src/main/java/com/goiflow/service/ActiveGamePlayService.java - Live round engine → Answer submissions: records answers
api/src/main/java/com/goiflow/service/ActiveGamePlayService.java - Vocabulary endpoints → Content selection: delegates to
api/src/main/java/com/goiflow/controller/VocabularyController.java - Vocabulary endpoints → Redis cache: uses cache
api/src/main/java/com/goiflow/controller/VocabularyController.java - Content selection → Relational data: selects vocabulary
- Shiritori screen → Shiritori endpoints: calls
- Shiritori endpoints → Shiritori rules: delegates to
- Shiritori rules → Relational data: reads and writes
api/src/main/java/com/goiflow/service/ShiritoriService.java - Shiritori rules → Redis cache: uses cache
api/src/main/java/com/goiflow/service/ShiritoriService.java - Vocabulary library → Vocabulary endpoints: calls
- History screen → Game history: calls
- Results screen → Results and ranking: calls
- Leaderboard screen → Leaderboard service: calls
- Vocabulary library → Library service: calls
- Sign-up screen → Auth endpoints: submits credentials
- Auth endpoints → Auth service: delegates to
api/src/main/java/com/goiflow/controller/AuthController.java - Auth service → Relational data: stores accounts and OTPs
api/src/main/java/com/goiflow/service/AuthService.java - Auth service → Email delivery: sends OTP
api/src/main/java/com/goiflow/service/AuthService.java - Auth endpoints → OAuth integration: supports sign-in
- Profile screen → Profile service: calls
- Library service → Relational data: reads library data
- Game history → Relational data: reads game history
- Results and ranking → Relational data: reads results
- Leaderboard service → Relational data: reads rankings