A multiplayer coding game: one challenge, one clock, the best coder takes the crown.
See the codeA multiplayer coding game. I made it because my friends and I wanted a good coding game to play in our spare time.
Play it at coderoyale.app.

| Lobby | Playing |
|---|---|
![]() | ![]() |
| Results | Everyone's code |
|---|---|
![]() | ![]() |
browser ──http, Socket.IO──▶ backend ──▶ Piston (runs the code)
│
▼
Redis (rooms, rounds, timers)
▲
──websocket────────▶ lsp service (autocomplete)
| Part | What it is | Stack |
|---|---|---|
| frontend | the game's pages | React, TypeScript, Vite, Monaco |
| backend | rooms, rounds, judging | Node, TypeScript, Fastify, Socket.IO, Redis |
| lsp | a language server per editor | Go, Redis |
| deploy | Docker Compose for the whole thing | Docker, Piston, Redis |
Player code runs in Piston, self hosted.
| Layer | Technology |
|---|---|
| Languages | TypeScript (backend, frontend), Go (lsp) |
| Frontend | React 19 + Vite, React Router |
| Editor | Monaco, with autocomplete over the Language Server Protocol |
| Look | Rough.js and Rough Notation (hand-drawn), Motion, Radix UI |
| Backend | Node 24, Fastify |
| Realtime | Socket.IO, with the Redis adapter across instances |
| State | Redis: rooms, rounds, timers, locks |
| Code runner | Piston, self hosted |
| Language servers | pyright, typescript-language-server, gopls, clangd, rust-analyzer, jdtls |
| Containers | Docker Compose, nginx for the frontend |
| CI | GitHub Actions, images on Docker Hub |
You need Docker with Compose v2 and about 12 GB of disk.
cd deploy
cp .env.example .env # set LSP_SECRET: openssl rand -hex 32
docker compose up -d --build
The first start takes a few minutes while Piston installs the languages. Then open http://localhost:8080.
To work on the code, run Piston in Docker and the services on your machine. deploy/README.md has the steps, and each part's README covers its own settings.
backend/ # game server; challenges/ holds the challenge files
frontend/ # web client
lsp/ # language server service
deploy/ # compose files and Piston config
docs/ # code guidelines and images
.github/ # CI: tests, and images for Docker Hub
VERSION # release version, used in the image tags
Add a json file to backend/challenges/ with a statement, examples and
hidden tests. The format is in
backend/README.md.
cd deploy && docker compose -f docker-compose.yaml \
-f docker-compose-dev.yaml up -d redis # backend and lsp tests need it
cd backend && npm test
cd frontend && npm test
cd lsp && go test ./...
CI runs them on every pull request and again on every merge to main.
New challenges, fixes and ideas are welcome. Start with CONTRIBUTING.md; to report a vulnerability, see SECURITY.md.
A multiplayer coding game: one challenge, one clock, the best coder takes the crown.
See the codeA multiplayer coding game. I made it because my friends and I wanted a good coding game to play in our spare time.
Play it at coderoyale.app.

| Lobby | Playing |
|---|---|
![]() | ![]() |
| Results | Everyone's code |
|---|---|
![]() | ![]() |
browser ──http, Socket.IO──▶ backend ──▶ Piston (runs the code)
│
▼
Redis (rooms, rounds, timers)
▲
──websocket────────▶ lsp service (autocomplete)
| Part | What it is | Stack |
|---|---|---|
| frontend | the game's pages | React, TypeScript, Vite, Monaco |
| backend | rooms, rounds, judging | Node, TypeScript, Fastify, Socket.IO, Redis |
| lsp | a language server per editor | Go, Redis |
| deploy | Docker Compose for the whole thing | Docker, Piston, Redis |
Player code runs in Piston, self hosted.
| Layer | Technology |
|---|---|
| Languages | TypeScript (backend, frontend), Go (lsp) |
| Frontend | React 19 + Vite, React Router |
| Editor | Monaco, with autocomplete over the Language Server Protocol |
| Look | Rough.js and Rough Notation (hand-drawn), Motion, Radix UI |
| Backend | Node 24, Fastify |
| Realtime | Socket.IO, with the Redis adapter across instances |
| State | Redis: rooms, rounds, timers, locks |
| Code runner | Piston, self hosted |
| Language servers | pyright, typescript-language-server, gopls, clangd, rust-analyzer, jdtls |
| Containers | Docker Compose, nginx for the frontend |
| CI | GitHub Actions, images on Docker Hub |
You need Docker with Compose v2 and about 12 GB of disk.
cd deploy
cp .env.example .env # set LSP_SECRET: openssl rand -hex 32
docker compose up -d --build
The first start takes a few minutes while Piston installs the languages. Then open http://localhost:8080.
To work on the code, run Piston in Docker and the services on your machine. deploy/README.md has the steps, and each part's README covers its own settings.
backend/ # game server; challenges/ holds the challenge files
frontend/ # web client
lsp/ # language server service
deploy/ # compose files and Piston config
docs/ # code guidelines and images
.github/ # CI: tests, and images for Docker Hub
VERSION # release version, used in the image tags
Add a json file to backend/challenges/ with a statement, examples and
hidden tests. The format is in
backend/README.md.
cd deploy && docker compose -f docker-compose.yaml \
-f docker-compose-dev.yaml up -d redis # backend and lsp tests need it
cd backend && npm test
cd frontend && npm test
cd lsp && go test ./...
CI runs them on every pull request and again on every merge to main.
New challenges, fixes and ideas are welcome. Start with CONTRIBUTING.md; to report a vulnerability, see SECURITY.md.