npm.io
0.1.5 • Published 20h ago

@thegeem/protocol

Licence
UNLICENSED
Version
0.1.5
Deps
1
Size
41 kB
Vulns
0
Weekly
259

@thegeem/protocol

The wire contract for Geem — jackbox.tv-style multiplayer trivia.

Shared zod schemas + TypeScript types for talking to the Geem game server over a single Socket.IO connection: ClientMsg in (validated), ServerMsg out (authoritative). This package is the source of truth every client (web + native) implements against.

The server is the referee (server-authoritative): clients send inputs and render the authoritative state the server pushes. There is no REST gameplay API — this protocol is the only gate.

import { ClientMsg, ServerMsg, PROTOCOL_VERSION } from '@thegeem/protocol';

// validate anything you send
const msg = ClientMsg.parse({ t: 'joinRoom', code: 'ABCD', name: 'Sara', pv: PROTOCOL_VERSION });

Versioning

PROTOCOL_VERSION is a breaking-change counter. Clients send pv on entry; the server rejects pv < PROTOCOL_VERSION with client_outdated. The npm package version is separate (normal semver for the package itself).

UNLICENSED — published for Geem's own clients; not for third-party use.

Keywords