
stube: a Seaside-style component framework on top of Datastar (personal research project)
I just put the docs on a small Clojure framework I've been hacking on, **stube**. It's a personal research project, not a product — somewhere I'm working out an idea about web apps that has pulled at me for twenty years.
Short version: components are plain maps of pure functions, the conversation is a value, handlers return effects, and one component can *call* another and read its *answer* like a return value (Seaside / UCW lineage). The wire is Datastar (SSE + morph by id); the implementation is a small effect kernel over plain Clojure data.
(s/defcomponent :demo/save-or-cancel
:render (fn [self]
[:div (s/root-attrs self)
[:button (s/on self :click :as :save) "Save"]
[:button (s/on self :click :as :cancel) "Cancel"]])
:handle (fn [self {:keys [event]}]
(case event
:save [(s/call :ui/confirm {:question "Save changes?"} :on-confirmed)]
:cancel [(s/answer :cancelled)]))
:on-confirmed
(fn [self yes?]
[(s/answer (if yes? :saved :cancelled))]))
Built heavily with LLM assistants — wouldn't have shipped it this fast otherwise — but the shape, the namespace layout, and the choice of what to include and what to leave out is mine and reflects how I think about systems.
If you're a re-frame person and the conversation map feels familiar: yes, deliberately. The conversation here is closer in spirit to a re-frame app-db than to a Smalltalk image.
- Repo: https://github.com/zekzekus/stube
- Rationale (why this exists at all): https://github.com/zekzekus/stube/blob/master/docs/rationale.md
- Tutorial: https://github.com/zekzekus/stube/blob/master/docs/tutorial.md
Happy for feedback, war stories, "have you seen X" pointers.