A small multi-user bookshelf — register with Google, build your shelf, browse
others — served end-to-end by ClojureWasm
(cljw), a from-scratch Clojure runtime in Zig, no JVM. It is a "serverless-style"
demo: one self-contained binary serving an SPA + JSON API, with SQLite and
book-cover colours running in-process through cljw's WebAssembly FFI — no
external database, no JVM, no Babashka.
- Frontend (
src/, ClojureScript + shadow-cljs) — the SPA; the optimized release bundle is committed atresources/public/js/main.js. - Backend (
server/, ClojureWasm) —bookshelf.serverserves the SPA + API;bookshelf.dbtalks to SQLite via(wasm/run "wasm/sqlite3.wasm" …);bookshelf.covercomputes cover colours via a Rust Wasm module;bookshelf.authverifies Google ID tokens. - Wasm modules (
wasm/) — SQLite (vendored amalgamation + a first-party wrapper) and a hand-written Rust cover-colour module. Origins inPROVENANCE.md. - Storage —
data/books.db, created + seeded on first run; persisted on fly.io by a volume.
cp .envrc.example .envrc # fill in GOOGLE_CLIENT_ID, then `direnv allow`
./run_local.sh # builds cljw from source on first run, serves http://localhost:8090Config (incl. the GOOGLE_CLIENT_ID secret) comes from the environment — locally
via direnv, on fly.io via fly secrets set. Deploy details (volume, secrets,
repo-select deploy) are in DEPLOY.md. The repo is self-contained:
only cljw is built from source (Zig); the SPA and Wasm modules are committed.
See the ClojureWasm project for runtime licensing. Demo sources here are provided as-is for illustration.