A real-time multiplayer game server template for creating interactive big-screen experiences with TouchDesigner visuals and mobile phone controllers.
Built with Express, Socket.io, and React (Mantine UI).
[TouchDesigner - Big Screen] <──WebSocket──> [Game Server] <──WebSocket/REST──> [Phone Controllers]
- Players connect via their phone browsers — they get a joystick + buttons to control the game
- The server manages all game state in memory, batches player inputs, and syncs stats
- TouchDesigner renders the game on a big screen / LED wall, sending back scores, lives, and game events
- Leaderboards track daily and all-time high scores via SQLite
- Real-time WebSocket communication with Socket.io
- REST API for player management and leaderboards
- In-memory game state with SQLite persistence
- Mobile-friendly player controller (joystick + buttons)
- Auto-pilot and manual control modes
- Leaderboard with daily and all-time rankings
- Optional character image upload
- Docker containerization
npm install --legacy-peer-deps
npm run dev:fullOpen http://localhost:3032 for the React app.
The Express server runs on http://localhost:3031.
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up --build| Method | Endpoint | Description |
|---|---|---|
POST |
/api/character/upload |
Upload image + create player session |
POST |
/api/player |
Create player without image |
GET |
/api/character/:id |
Get player session info |
POST |
/api/character/:id/username |
Set player username |
GET |
/api/leaderboard/daily |
Daily leaderboard |
GET |
/api/leaderboard/alltime |
All-time leaderboard |
Connect via Socket.io with query params:
| Param | Value | Description |
|---|---|---|
clientType |
mobile |
Client type identifier |
characterId |
<id> |
Player session ID |
username |
<name> |
Player display name |
| Command | Description |
|---|---|
npm run dev:full |
Start Express + React dev servers |
npm run dev |
Express only (with nodemon) |
npm run client:dev |
React dev server only |
npm run build |
Production build (React) |
npm start |
Production server |
npm test |
Run tests |
npm run lint |
Run ESLint |
npm run format |
Run Prettier |
