- Elm 83%
- CSS 16%
- JavaScript 1%
tomaslatal.cz — "Nothing Here" #
A personal site that looks like a 404 above the fold, then — on scroll —
reveals a live profile assembled at build time from my own
AT Protocol repo. No CMS: every section is a lens over
records I already publish elsewhere. The 404 is a costume — the page returns a
normal 200 OK and nothing in <head> says "404", so link previews read
cleanly.
It's AT Protocol most of the way down: hosted on wisp.place, where the files live as blobs in that same repo, with source and CI on tangled.
Built with elm-pages v3 — no backend, no database, no
client-side fetching, no custom JavaScript, readable with JS off. The avatar
and book covers are downscaled to inline WebP at build time (a sharp backend
task) and fonts are self-hosted, so the page makes no third-party runtime
requests.
How it works #
Everything runs in elm-pages' BackendTask at build time
(src/Atproto.elm): resolve the PDS from
https://plc.directory/<DID> (the host is never hardcoded), fetch collections
via com.atproto.repo.listRecords / getRecord with cursor pagination,
decode defensively so an unknown or absent field can't break the build, then
transform and render (app/Route/Index.elm). An
unreachable source renders that section's empty state rather than failing the
build.
Data sources #
| Section | Source | Collection (NSID) |
|---|---|---|
| Title / tagline / avatar (meta) | Bluesky | app.bsky.actor.profile |
| "Lately, out loud" (posts) | Bluesky | app.bsky.feed.post |
| "What I'm up to right now" | Sifa | id.sifa.profile.position + id.sifa.profile.involvement (open ones — no endedAt) |
| "Talks" | Sifa | id.sifa.profile.presentationDelivery |
| "Currently reading" / "Recently finished" | BookHive | buzz.bookhive.book (filtered by status) |
| "Lately, through a lens" (photo strip) | Grain | social.grain.gallery (+ grain's AppView for thumbnails) |
| Footer links (GitHub, LinkedIn) | Sifa | id.sifa.profile.externalAccount |
Photos are the one source that needs more than the PDS: grain's thumbnails sit
behind signed CDN URLs we can't compute, so the signed URLs come from
social.grain.unspecced.getGallery. That method is explicitly unstable, so if
it moves the strip renders empty rather than failing the build. The images
themselves are still downscaled to inline WebP at build time like every other
image here.
Identity is hardcoded in Atproto.elm: tomaslatal.cz /
did:plc:xolhw4alvk3vihixjxs4wazp. Decoder tests in tests/AtprotoTests.elm
use inline JSON from real responses, so schema drift is caught at build time.
Develop #
Node 24, pnpm, and the lamdera
compiler on your PATH (elm-pages compiles with lamdera, not elm).
pnpm install
pnpm start # dev server at http://localhost:1234
pnpm build # static build into dist/
pnpm test # decoder + transform unit tests (elm-test)
start and build prepend $PWD/node_modules/.bin to PATH so lamdera
resolves to an absolute path — elm-pages' internal elm-review can't use a
relative one as a compiler.
Design lives in style.css, ported essentially verbatim from the
original HTML prototype and token-driven, so a prefers-color-scheme: dark
block flips the whole page. Copy sits in constants atop app/Route/Index.elm.
Deploy #
A tangled spindle pipeline
(.tangled/workflows/build.yml) builds and
deploys on push to main, daily at 05:17 UTC, and on manual trigger — the
schedule is what keeps the "live" sections fresh. It uploads dist/ to
wisp.place with wispctl; the only secret needed is WISPCTL_APP_PASSWORD
(a Bluesky app password). The footer shows the build timestamp
(Pages.builtAt) so visitors can see how fresh the data is.
Add a new source #
- Add the NSID, record type and a defensive
Decoderinsrc/Atproto.elm(unknown/absent fields asMaybe). - Fetch it in
fetchFromPdsviafetchAllwrapped inrecover; add it toRawData/Data. - Add a transform if you need to filter or sort, plus a
view*function inapp/Route/Index.elm. - Add a decode test in
tests/AtprotoTests.elmwith real JSON.
Check what actually exists first:
GET {PDS}/xrpc/com.atproto.repo.describeRepo?repo={DID} → .collections.