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.
What it shows#
- A typed Markdown collection from content/, checked at build
- Two languages with packages/intl, Atom feeds and a sitemap
- Server-only pages (<NoHydration>) with two parts that hydrate
- Kv and packages/guard: reactions, a rate limit, security headers
- A typed JSON API with its OpenAPI page
Screenshots#
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 devTo 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