How inspedralbes/tr1-type-racer-royale-tr1-grup-6 works
Project type and purpose
• From the README, “Type Racer Royale” is a real-time, multiplayer typing game.
• This is a full-stack web application requiring:
• A client (browser or mobile) for the game UI
• A server to coordinate games, track progress, and persist data
• Real-time messaging (game state updates, chat)
• A database for user profiles, game histories, and leaderboards
File structure
• At present the repo only contains:
• .github/ for workflows (CI/CD hooks, issue templates)
• LICENSE, README.md
• doc/README.md as a placeholder for documentation
• client/ or frontend/
• server/ or backend/
• shared/ or common/ (for types, models, protocol definitions)
• config/ (environment and deployment manifests)
• tests/ and scripts/
README for additional insights
• The README describes project members, its planning phase, and external tools (Taiga, Penpot).
• No deployment URLs or existing architecture notes, so we must propose a typical real-time game stack.
a. Main components
• Game Client (browser or mobile app)
• Game Server (Node.js, Go, or similar)
• Real-time messaging layer (WebSocket or Socket.IO)
• Authentication & API Gateway (REST/GraphQL)
• Database (e.g., PostgreSQL or MongoDB)
• Cache / Pub-Sub (Redis)
• Static asset store / CDN for game assets
• External services (OAuth providers, analytics)
b. Relationships & interactions
1. Client ↔ Authentication API (login/register)
2. Client ↔ API Gateway for fetching game data, user profile
3. Client ↔ Game Server over WebSocket for real-time updates (race progress, opponent positions, chat)
4. Game Server ↔ Database for persistence (sessions, scores, leaderboards)
5. Game Server ↔ Redis for session state, matchmaking queue, pub/sub to broadcast game state
6. API Gateway ↔ External services (email, OAuth, analytics)
c. Architectural patterns and design principles
• Client-Server separation
• Publish-Subscribe for broadcasting real-time events
• CQRS: separate read models (leaderboards) from write models (game state)
• Horizontal scalability for Game Server instances behind a load balancer
• Environment isolation (dev, staging, prod)
d. Relevant technologies (examples)
• Frontend: React or Vue, WebSocket client, TypeScript
• Backend: Node.js + Express or NestJS, Socket.IO or ws library
• Database: PostgreSQL or MongoDB
• Cache/Pub-Sub: Redis
• Infrastructure: Docker, Kubernetes or ECS, Nginx/ALB, Cloud provider (AWS, GCP)
Detail without overcomplicating
• Logical subsystems rather than every file or module
• How data and control flow through the system end-to-end
• Asynchronous or stateful interactions (e.g., matchmaking queue, game ticks)