Welcome to the Krmx documentation!

What is Krmx?

Krmx is a network protocol for realtime multi-user interactions.

Let's break that down.

Krmx is a network protocol. A network protocol defines a set of rules and conventions for exchanging messages between a client and a server. Krmx uses WebSockets to achieve realtime and bidirectional connections.

Krmx is a multi-user protocol. An application using Krmx always consists of one or more clients that create connections to a single server. Once a client established a connection to the server, it can link its connection to a user. Connections that are linked to users will receive realtime information about all users on the server and can send custom messages to the server.

Krmx lets you build interactions. As the application designer you extend the Krmx protocol with custom messages that are sent between server and client over the connections. These custom messages define the interactions your users have with the server (and each-other).

Krmx FAQ

The Krmx FAQ is a collection of useful questions and answers. If you have a question that isn't answered here, then please open an issue (opens in a new tab).

Why Krmx?

Krmx is the right solution if you're building a (web) application that is designed for users to interact with each other in realtime during a session. A great example of this is multiplayer (board)games, which is the use case around which Krmx was initially designed.

Where can I find examples?

When learning Krmx, it can help to take a look at some example projects. You can find examples in reference implementations.

Why are the Krmx reference implementations written in TypeScript?

Krmx provides two reference implementations of its protocol. One for a server and one for a client. As the Krmx protocol is language agnostic, the reference implementations of the Krmx protocol could have been written in any language. So, why TypeScript?

Almost everyone has access to a browser and since WebSockets are supported by all major web browsers nowadays, it made sense for the reference implementation of the client to be browser-based. The client reference implementation has been written in TypeScript as that is the recommended language for the web. For consistency and type reusability, the server has also been written in TypeScript.

In theory, nothing is stopping you from using the Krmx protocol in another language. If you decide to build your own Krmx compatible implementation of a server or a client, then feel free to add that as a reference implementation to this repository by opening a pull request (opens in a new tab).


krmxthe protocol used for realtime multi-user interactions
serveran application running a krmx server
clientan application (f.e. React App) that connects to a krmx server
connectiona websocket connection between a server and a client
useran client controlled entity on the server that a connection can link to
(un)linkingthe act of linking or unlinking a connection to or from a user
applicationthe complete system formed by a server and clients to serve interactive functionality to users