Skip to content
Mohammad Oumari
← All projects
buildingbuildingtools2026source · private

PairKit

Phone-as-controller for game developers — engine-agnostic protocol, hosted relay, Unity SDK.

Role · Solo — protocol, relay, SDKs

TypeScriptC#UnityWebSocketsFly.ioVitepnpm

Unity SDK

0.4.0

Controller UI

<50 KB gzipped

Protocol

v1, versioned handshake

PairKit turns phones into controllers for games running somewhere else — a TV, a laptop, a projector at a party. A player scans a QR code, the browser opens a controller, and it's connected. No app install on the phone.

Engine-agnostic on purpose

The wire protocol is the product, not the Unity integration. TypeScript is the source of truth for the protocol and it generates the C# types, so the Unity SDK cannot drift from the specification — a mismatch becomes a build error rather than a runtime mystery.

Unity ships first because that's where the users are, but nothing in the protocol knows about Unity, which is what makes a Godot or Unreal SDK an additive job later.

packages/
  shared-protocol/   Engine-agnostic wire protocol — TS source of truth, generates C#
  sdk-client/        Phone-side TS SDK
  relay-server/      Node.js WebSocket relay on Fly.io
  web-controller/    Phone-side controller UI — vanilla TS + Vite, <50 KB gzipped
  test-harness/      End-to-end scenarios against the real protocol and relay
sdks/unity/          Unity SDK (com.pairkit.sdk)

The size budget

The web controller is vanilla TypeScript and Vite, held under 50 KB gzipped. That number is a product requirement, not an engineering vanity metric: the controller loads on a guest's phone, on a stranger's network, while four people watch. A framework bundle would spend the entire time budget before the first frame.

Versioning

The wire protocol carries PROTOCOL_VERSION = 1 and the flow schema FLOW_VERSION = 1. A breaking change bumps the version in the handshake, and incompatible peers reject cleanly with system.error protocol_version instead of failing in some interesting way three interactions later.