Currently, it's a spreadsheet where cells:
- run user Clojure code async and in parallel
- reactively re-run when upstream cells update
- can run on schedule (e.g. "every 5 seconds")
- can render hiccup, VegaLite and other UI elements like buttons etc.
In active development and used every day in production at Lumber. Tesserae acts as a dashboard to provide overviews over employee utilization, project hours and finances. It also acts as a slack notifier sending daily project summaries to employees.
That said, the current code is sparsely documented.
A few incompatible changes have landed since the demo code has been pushed.
These are minor changes overall but we're not currently focused on maintaining demo data.
An earlier commit should work and provide a similar experience to master.
Try this in your deps.edn and follow the steps below:
lumberdev/tesserae {:git/url "https://github.com/lumberdev/tesserae"
:sha "fcfabb928a44ba72b56c091725c3b564614eca91"}
Run
clojure -X:demo:dev/cljs tesserae.serve/demo
then visit http://localhost:3900
npm install
Start a clojure repl with the :dev/cljs alias.
Go to tesserae.serve
, load the file. Shadow-cljs should start up.
Run (-main)
or (mount/start)
to boot up the server, db, listeners etc.
Injecting user code into the eval context:
Custom namespaces and bindings can be added on startup using mount args.
The values of namespaces
map, if they're symbols, have to be on the classpath and will automatically be required.
The values of the bindings
map will be required and resolved if they are fully qualified symbols
or otherwise left as their identity.
For example:
(-> (mount/with-args
{:tesserae.db/dir "folder-in-project-root/data/datalevin/db"
:tesserae.eval/namespaces {'walk 'clojure.walk
'my-ns {'my-fn (fn [x] (println :foo x))}}
:tesserae.eval/bindings {'println `println
'debug (fn [& args] (apply println ::dbg args))}})
(mount/start))
Used internally in prod at Lumber but also very alpha!
- improve code entering experience, e.g. by adding codemirror with clojure mode
- cell functions and UI plugin system. Users should be able to extend Tesserae with their own code.
- UI additions: multiple sheets, search, users, permissions... the whole shebang!
As of this commit Tesserae is a lean 1766 LoC! This made possible largely thanks to Hyperfiddle's Electric, Borkdude's sci and Juji's Datalevin.
Copyright © 2023 Dennis Heihoff, Lumber LLC