Real-time word duel platform

Lexpair

Two players, two letters, one winning word.

A real-time competitive word duel ecosystem. Players race head-to-head or practice solo against an AI bot to submit valid words starting and ending with given letter pairs under accelerating timers. Features live WebRTC video and audio calls, on-device Vosk speech recognition, embedded bilingual English and Russian dictionaries, and an authoritative low-latency Go backend on Google Cloud Run.

  • Kotlin Multiplatform
  • Compose Multiplatform
  • Go 1.25
  • Google Cloud Run
  • WebSockets
  • WebRTC / LiveKit
  • Vosk ASR
License: Proprietary
WebSocket Protocol (Submit Word)
{
  "type": "word_submitted",
  "room_code": "ABC123",
  "pair": ["S", "T"],
  "word": "SMART",
  "client_time_ms": 1729555200000,
  "input_mode": "voice"
}

What it does

01

Two Letters, One Winner

Letter pairs (e.g. S...T, C...T) are revealed simultaneously. The first player to speak or type a valid dictionary word wins the round point.

02

Word Rally & Blitz Rush

Sudden-death "Hot Potato" volley rounds under an accelerating ticking fuse, alongside 60-second rapid-fire solo Blitz Rush.

03

Offline Voice Recognition

Embedded Vosk speech recognition model runs completely on-device with zero network latency and no external speech API dependencies.

04

Three-Tier Bilingual AI VAR

Validates words against 274k+ English and 116k+ Russian embedded words, a persistent semantic cache, and cloud LLM adjudication for living slang.

05

Portrait Match Recording

Composes camera video, opponent tracks, live scoreboards, and mixed audio directly into sharable portrait MP4 match recordings.

06

Cross-Platform Parity

Shared Compose Multiplatform UI across Android, Web (Wasm), and Desktop (Windows & Linux Steam build) communicating over real-time WebSockets.

How it's built

A multiplatform client ecosystem connected to an authoritative Go backend on Google Cloud Run:

  1. Client Runtimes

    Compose Multiplatform (Android, Web/Wasm, Desktop) with shared state controllers, Ktor HTTP/WebSockets, and offline Vosk ASR.

  2. Edge & Routing

    Google Front End (GFE) custom domain mapping at lexpair.sosnovich.com terminating TLS and streaming WebSockets directly.

  3. Authoritative Server

    Single-binary Go server managing rooms, state-machine match flows, embedded dictionaries, and admin control plane.

  4. Media & Intelligence

    LiveKit WebRTC SFU for low-latency audio/video calls, and multi-tier LLM fallback for modern neologism validation.

Engineering highlights

  • Authoritative embedded dictionaries: over 274,000 English words and 116,000 Russian words embedded directly into the Go binary with <1µs lookup time.
  • Deterministic server state machine prevents client desync, adjudicating near-simultaneous answers, clock skew, and disconnect pause/resume flows.
  • Adheres to the "Three Saints" testing doctrine: offline unit tests, real network socket verification, and live production health probes.
  • Single-binary admin control plane (/admin) hosted directly by the Go server with dynamic feature flags and live room oversight.

More projects