How jjoriping/kkutu works
Main Components Identification
The system consists of two primary server components and several supporting services:
a. Game Server (Server/lib/Game/)
• Handles game logic and real-time gameplay
• Manages different game modes (classic, crossword, typing, etc.)
• Controls robot players and shop functionality
b. Web Server (Server/lib/Web/)
• Manages user interface and authentication
• Handles static assets and client-side resources
• Provides REST APIs for game operations
c. Supporting Services
• PostgreSQL Database (for persistent storage)
• Redis (optional, for rankings and sessions)
• Multiple OAuth providers for authentication
Client Layer
• Web Browser
• Mobile Browser (indicated by m_* files)
Frontend Layer (Server/lib/Web/public/)
• CSS Styles
• JavaScript Components
• Media Assets
• Views (Pug templates)
Application Layer
• Web Server Cluster
• Authentication Module
• Route Handlers
• WebSocket Manager
• Game Server Cluster
• Game Modes
• Room Management
• Player Management
Data Layer
• PostgreSQL Database
• Redis Cache (optional)
External Services Layer
• OAuth Providers
• Others
Key Architectural Patterns to Highlight
a. Clustering Architecture
• How the game server uses clustering for scalability
• Master-slave relationship in game servers
b. Real-time Communication
• WebSocket connections between clients and game server
• Internal communication between web and game servers
c. Authentication Flow
• Multiple OAuth provider integration
• Session management
Use the following visual elements:
• Rectangles: Server components
• Clouds: External services
• Hexagons: Client applications
b. Connection Types:
• Blue: Core server components
• Green: Database systems
• Orange: External services
• Purple: Client-side components
Important Details
a. Port Configurations:
• Reserved IP (127.0.0.2) for internal communication
• Public-facing ports
b. Game Logic Flow:
• Room creation and management
• Player interactions
• Game state management
c. Data Flow:
• User authentication process
• Game state updates
• Score and ranking updates