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

Examples · examples/journal

Journal

A small publication in English and Polish: Markdown posts with typed frontmatter, compiled into the server. The server renders the pages; two small parts run in the browser: a search that follows the typing, and reactions kept in memory. Nothing kept in a database.

SourceREADMEAll the examples

What it shows#

Screenshots#

The journal's front page: the latest posts with their dates and tags
The front page
A post on a phone, with its reactions under it
A post, on a phone
The front page in Polish, on a phone
The same, in Polish

What it's made of#

Its browser half
298.0 KB
wasm, brotli; 382.6 KB gzip
Pages and endpoints
7 + 4
route files' pages, and handlers
Lines of Roc
2,779
its own .roc and .rocx, blank lines left out
Tests
101
80 expects, 21 node tests
Weighs
298.0 KB of wasm, brotli (382.6 KB gzip, 984.8 KB raw)
Made of
7 pages · 4 endpoints · 2,779 lines of Roc · 80 expects · 21 node tests
Uses
packages/guard, packages/intl, packages/markdown, 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/journal && ../../bin/rocx dev

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

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