Roc Solid
Markup in Roc · pages on a native server · components in WebAssembly

Examples · examples/quiz

Pinwheel

A live quiz for a room full of phones. The host puts a room on a big screen, everyone joins with its code, the quickest right answers score most, and the leaderboard turns after each question.

SourceREADMEAll the examples

What it shows#

Screenshots#

The big screen's lobby: the room's code, and who has joined
The big screen, waiting for the room
Joining a room on a phone: its code and a name
Joining, on a phone

What it's made of#

Its browser half
387.5 KB
wasm, brotli; 510.7 KB gzip
Pages and endpoints
5 + 7
route files' pages, and handlers
Lines of Roc
3,629
its own .roc and .rocx, blank lines left out
Tests
100
92 expects, 8 node tests
Weighs
387.5 KB of wasm, brotli (510.7 KB gzip, 1375.7 KB raw)
Made of
5 pages · 7 endpoints · 3,629 lines of Roc · 92 expects · 8 node tests
Uses
SQLite, packages/audio, packages/charts, packages/forms, packages/presence

Measured on 2026-11-29 at commit 74eec5b. The wasm is the app's browser half, built with --opt=size; every page also loads start.js, the page's JavaScript, 22.8 KB brotli. All the examples says how they're measured.

Run it#

With the toolchain set up (just setup), start it from its own directory: it builds, serves at http://127.0.0.1:8080 and builds again when you save. Its README says what to look at.

cd examples/quiz && ../../bin/rocx dev

To build it, check it and run its tests, from the repository's root:

just examples quiz
just examples-release quiz   # as deployed: rocx build, then the tests against a server built --opt=speed