Examples · examples/tasks
Tasks
A small team's task lists: tasks with a due day and an assignee, filters, and reordering. The one to read first: it does the usual things the plain way, and its comments say why each piece is where it is.
What it shows#
- File routing, middleware, and a database with typed rows
- Forms that work without JavaScript, checked as you type
- Optimistic actions: a change shows at once and is undone if refused
- Drag and drop, rows that glide into place, and a prompt before leaving unsaved changes
Screenshots#
What it's made of#
- Its browser half
- 368.5 KB
- wasm, brotli; 484.1 KB gzip
- Pages and endpoints
- 4 + 10
- route files' pages, and handlers
- Lines of Roc
- 2,302
- its own .roc and .rocx, blank lines left out
- Tests
- 69
- 49 expects, 20 node tests
- Weighs
- 368.5 KB of wasm, brotli (484.1 KB gzip, 1282.7 KB raw)
- Made of
- 4 pages · 10 endpoints · 2,302 lines of Roc · 49 expects · 20 node tests
- Uses
- SQLite, packages/auth, packages/forms, packages/testing
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/tasks && ../../bin/rocx devTo build it, check it and run its tests, from the repository's root:
just examples tasks
just examples-release tasks # as deployed: rocx build, then the tests against a server built --opt=speed