DEVELOPMENT OF THE CLIENT-SIDE PART OF A MULTIPLAYER KEYBOARD TRAINER USING REACT AND WEBSOCKET TECHNOLOGIES

Main Article Content

Oleksii TKACHENKO
Ruslan DIDKOWSKY
Oleksandr PISKUN

Abstract

Introduction. The increasing volume of digital communication and the spread of
remote work and learning enhance the importance of keyboard typing skills. This competence is
essential not only for IT professionals but for a wide range of users: students, office workers,
journalists, and researchers. Specialized typing trainers with feedback on speed and accuracy are a
proven tool for developing this skill. However, most available solutions either focus exclusively on
individual practice without a social component or provide multiplayer mode without comprehensive
session analytics and personalized interface. From a technical perspective, a real-time multiplayer
trainer presents challenges not present in individual trainers: synchronous state transmission with
minimal latency, correct handling of player connections and disconnections, concurrent server
resource access, and a responsive interface.
Purpose. The aim of this work is to develop the client-side part of a multiplayer keyboard
trainer using the technology stack of React.js, TypeScript, TailwindCSS, and ActionCable/WebSocket,
enabling real-time competitions, user authentication, and session result analytics.
Results. A comparative analysis of three popular keyboard trainer web applications –
TypingClub, Nitro Type, and 10FastFingers – was conducted. The analysis revealed that none of these
solutions combines real-time multiplayer, detailed session analytics in graphical form, personalized
interface with theme switching, and modern authentication mechanisms. Based on this, the
requirements for the developed application were defined.
The client-side is implemented as a Single Page Application (SPA) using React.js with hooks
and the Context API for state management. TypeScript provides compile-time type safety, which is
especially important for WebSocket message structures. TailwindCSS enables dynamic theme
switching across five color schemes without separate CSS files. ActionCable over the WebSocket
protocol (RFC 6455) ensures low-latency bidirectional communication between game participants.
Two authentication flows are implemented: JWT-based (RFC 7519) and Google OAuth2. The
GameRoom component supports both offline practice and online multiplayer modes, determined by
the presence of the room_id route parameter; character-by-character accuracy tracking and speed
synchronization via WebSocket are implemented. The LeaderBoard component provides search and
bidirectional sorting by accuracy and speed. The MultiplayerRoom component enables browsing and
creating game rooms with sorting by password status, player count, and lock status.
Conclusion. The developed application combines real-time multiplayer functionality, detailed
session analytics, flexible interface personalization, and standard-based authentication mechanisms –
a combination absent in any of the analyzed existing solutions. The technology stack ensures code
reliability at compile time (TypeScript), minimal latency in multiplayer synchronization (WebSocket,
RFC 6455), component reusability and predictable state management (React with one-way data flow),
and styling flexibility (TailwindCSS). Directions for further development include adaptive text
selection algorithms based on user skill level, support for group competitions with more than two
participants, and server-side rendering for improved initial load performance.

Article Details

How to Cite
TKACHENKO, O., DIDKOWSKY, R., & PISKUN, O. (2024). DEVELOPMENT OF THE CLIENT-SIDE PART OF A MULTIPLAYER KEYBOARD TRAINER USING REACT AND WEBSOCKET TECHNOLOGIES. Cherkasy University Bulletin: Applied Mathematics. Informatics, (1). https://doi.org/10.31651/2076-5886-2024-1-90-102
Section
Інформатика
Author Biographies

Oleksii TKACHENKO, Bohdan Khmelnytsky National University of Cherkasy

Student, Department of Applied Mathematics and Informatics, The Bohdan Khmelnytsky National
University of Cherkasy, Ukraine

Ruslan DIDKOWSKY, Bohdan Khmelnytsky National University of Cherkasy

Doctor of Technical Sciences, Associate Professor, Department of Informatics and Applied
Mathematics, The Bohdan Khmelnytsky National University of Cherkasy, Ukraine

Oleksandr PISKUN, Bohdan Khmelnytsky National University of Cherkasy

Candidate of Technical Sciences, Associate Professor, Head of Department of Applied Mathematics
and Informatics, Bohdan Khmelnytsky National University of Cherkasy

References

TypingClub [Electronic resource]. Access: https://www.typingclub.com (accessed: 20.05.2024).

Nitro Type [Electronic resource]. Access: https://www.nitrotype.com (accessed: 20.05.2024).

10FastFingers [Electronic resource]. Access: https://10fastfingers.com (accessed: 20.05.2024).

React – A JavaScript library for building user interfaces [Electronic resource]. Access: https://reactjs.org

(accessed: 29.04.2024).

React State and Lifecycle [Electronic resource]. Access: https://reactjs.org/docs/state-and-lifecycle.html

(accessed: 29.04.2024).

WebSocket API [Electronic resource] / MDN Web Docs. Access: https://developer.mozilla.org/enUS/docs/Web/API/WebSocket (accessed: 19.05.2024).

How to use Action Cable with React and Rails [Electronic resource]. Access:

https://medium.com/swlh/how-to-use-action-cable-with-react-and-rails-3129a554c7d (accessed:

05.2024).

TypeScript [Electronic resource]. Access: https://www.typescriptlang.org (accessed: 29.04.2024).

Tailwind CSS [Electronic resource]. Access: https://tailwindcss.com (accessed: 29.04.2024).

React Context API [Electronic resource]. Access: https://reactjs.org/docs/context.html (accessed:

04.2024).

Introduction to JSON Web Tokens [Electronic resource]. Access: https://jwt.io/introduction (accessed:

05.2024).

React Router [Electronic resource]. Access: https://reactrouter.com (accessed: 29.04.2024).

Framer Motion [Electronic resource]. Access: https://www.framer.com/motion (accessed: 29.04.2024).

Fette I., Melnikov A. (2011) The WebSocket Protocol. RFC 6455. IETF. Access:

https://datatracker.ietf.org/doc/html/rfc6455.

Jones M. et al. (2015) JSON Web Token (JWT). RFC 7519. IETF. Access:

https://datatracker.ietf.org/doc/html/rfc7519.

Most read articles by the same author(s)

1 2 > >>