Examples · examples/uptime
Status
An uptime monitor and its public status page: jobs check each service on schedule, incidents open and close themselves, subscribers get email, and the page updates live.
What it shows#
- Jobs, cron and email as plugins
- OpenTelemetry metrics from packages/otel's plugin: request times, check latency, each monitor up or down
- The admin's database tables and jobs page, behind a password and packages/auth's sessions
- Charts, and a channel for the live page
Screenshots#
What it's made of#
- Its browser half
- 328.3 KB
- wasm, brotli; 435.2 KB gzip
- Pages and endpoints
- 6 + 14
- route files' pages, and handlers
- Lines of Roc
- 3,308
- its own .roc and .rocx, blank lines left out
- Tests
- 115
- 102 expects, 13 node tests
- Weighs
- 328.3 KB of wasm, brotli (435.2 KB gzip, 1171.3 KB raw)
- Made of
- 6 pages · 14 endpoints · 3,308 lines of Roc · 102 expects · 13 node tests
- Uses
- SQLite, packages/admin, packages/auth, packages/charts, packages/crypto, packages/email, packages/jobs, packages/otel, 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/uptime && ../../bin/rocx devTo build it, check it and run its tests, from the repository's root:
just examples uptime
just examples-release uptime # as deployed: rocx build, then the tests against a server built --opt=speed