A real-time multiplayer drawing and guessing game.
One player draws, everyone else races to guess the word.
- Rooms: create a room and share its 6-letter code. The host picks the number of rounds and the draw time, and can remove players.
- Live drawing: strokes stream to every player as they are drawn. The drawer has brush, eraser, undo, clear, sizes and colours.
- Guessing: players guess in chat. Near misses get a "close" hint, and letters are revealed as time runs out.
- Scoring: faster guesses earn more points, the drawer scores for every correct guess, and a leaderboard is shown at the end.
- Reliability: the server is authoritative and validates every event. Reconnects and players leaving mid-turn are handled.
- Solo mode: a practice sketchpad that works offline.
| Layer | Technology |
|---|---|
| Mobile | Expo, React Native, React Native Skia, Gesture Handler, Reanimated, Zustand |
| Realtime | Node.js, Socket.IO, Redis (optional; rooms can be held in memory) |
| API | Fastify, Drizzle ORM, PostgreSQL |
| Shared | TypeScript and Zod schemas for every socket event and API payload |
| Tooling | pnpm workspaces, Turborepo, Vitest, ESLint, Prettier, GitHub Actions |
apps/
mobile/ Expo app (screens, canvas, game store)
game-server/ Socket.IO game server
api/ REST API
packages/
shared/ Socket and API contract (Zod)
db/ Database schema and migrations
config/ Shared TypeScript config
Requirements: Node 22.12+, pnpm 10 (corepack enable), and for the app, Android Studio with JDK 17.
pnpm install
pnpm --filter @doodle/game-server dev:memory # game server on :4001, no database needed
pnpm --filter @doodle/mobile android # build and run the app on a device or emulatorDevelopment builds connect to the game server on the machine running Metro, so keep your phone on the same Wi-Fi network as your computer. Release builds connect to the hosted server.
Full setup with Postgres and Redis
cp .env.example .env
docker compose up -d
pnpm --filter @doodle/db db:migrate
pnpm build
pnpm --filter @doodle/api dev # http://localhost:4000/health
pnpm --filter @doodle/game-server dev # http://localhost:4001/healthAndroid setup on Windows
- Install Android Studio with Android SDK Platform 35 and Build-Tools 36.0.0, and JDK 17.
- Set
ANDROID_HOMEto%LOCALAPPDATA%\Android\Sdkand add itsplatform-toolsfolder toPath. - Enable long paths (
LongPathsEnabledin the registry andgit config --global core.longpaths true), and clone into a path without spaces, such asC:\dev\doodle. - Turn on USB debugging on your phone, then run
pnpm check:android.
| Command | Description |
|---|---|
pnpm test |
Run all test suites |
pnpm lint |
Lint every package |
pnpm typecheck |
Type-check every package |
pnpm format |
Format with Prettier |
The game server tests include a complete game played over real sockets, from creating a room to the final leaderboard.
- APK: the Release APK workflow builds a signed APK for 32-bit and 64-bit ARM phones. Run it from the Actions tab, or push a
v*tag to publish it as a GitHub Release. - Game server: a
Dockerfileand a Render blueprint (render.yaml) are included. On Render, choose New → Blueprint and select this repository.
- Shared contract:
packages/shareddefines every socket event with a Zod schema. Client and server types are derived from it, and the server validates every payload before handling it. - Game loop: each turn moves through
choosing → drawing → turn_endon server timers. Guess matching, hints and scoring are pure, unit-tested functions. - Concurrency: room updates take a per-room lock, so players can't overfill a room. Strokes for the current turn are kept in memory, so drawing never waits on the room lock.
- Canvas: strokes are built on the UI thread with gesture worklets and Skia, then normalised to 0–1 coordinates so they look the same on every screen size.