Files
caro/client
tiennm99 ecc617790e refactor(client): typed protobuf binary websocket on port 1999
Phase 04 of the WebSocket protobuf migration:
- Add protobufjs@7.5.4 runtime dep and protobufjs-cli@1.1.3 devDep
- Add proto:gen npm script that runs pbjs + pbts against server/src/main/proto/
- Commit static-module output at client/src/generated/protocol.{js,d.ts}
- Rewrite connection-service.js:
  * Set binaryType='arraybuffer' and default URL to ws://localhost:1999/ratel
  * Replace string-keyed send(code, data) with 13 typed send helpers
    (sendNickname, sendGameMove, sendCreatePveRoom, ...)
  * Decode incoming BinaryWebSocketFrame via Response.decode and map
    each oneof case to a ClientEventCode for the event bus
- Update 14 call sites across menu-ui, game-ui, game-scene
- game-state-service CLIENT_CONNECT now reads data.clientId
- menu-ui NICKNAME_SET toast only triggers when invalidLength > 0
- Drop ServerEventCode enum from protocol-constants.js
2026-04-11 08:25:20 +07:00
..

Gomoku Web Client

Phaser 3 web client for the Gomoku game server.

Setup

npm install
npm run dev

Open http://localhost:5173 in your browser.

Requirements

  • Node.js 22+
  • Game server running on localhost:1024 (WebSocket on port 1025)

Server Connection

The client connects via WebSocket to ws://localhost:1025/ratel by default. To connect to a remote server, update the URL in src/services/connection-service.js.

Scripts

Command Description
npm run dev Start development server with HMR
npm run build Build for production (dist/)
npm run preview Preview production build locally

Tech Stack

  • Phaser 3 — HTML5 game engine
  • Vite — build tool
  • Vanilla JavaScript with JSDoc annotations