fulcro

sheluchin 2026-02-24T13:32:54.945369Z

I'd like to use statecharts with bb to define devops workflows. Sometimes I find charts get a little bit hard to understand by just reading the source. What's the cheapest way to get some viz for this kind of thing?

sheluchin 2026-03-10T15:57:30.363669Z

I tried to give Claude the statecharts visualizer repo and my toggle chart above and have it using the POST route. Didn't give it much guidance beyond that. It wasn't able to pull it off. I haven't had time to dig in.

sheluchin 2026-02-28T01:29:26.820839Z

@naomarik768 here's a small demo

tony.kay 2026-02-25T18:04:01.855499Z

Have you got statecharts working in BB?

sheluchin 2026-02-25T18:04:21.686659Z

Yes

❤️ 1
tony.kay 2026-02-25T18:04:36.740749Z

I hadn’t tried

tony.kay 2026-02-25T18:05:19.071799Z

The easiest thing to do is ask AI to make a fulcro webapp that uses the existing visualization, where bb can POST it as application/edn (with lambdas stripped). The it would serve the UI on line port 8091 and you can view them in a browser…get a bit more fancy and post “current configuration” for a chart and you can have live updates…e.g. “instrument” your BB event queue to send updates to the chart viz server 😄

sheluchin 2026-02-25T18:09:26.441499Z

Ty I'll have a shot at that. I think the only gotcha was using the promesa version which adds bb support. The sc releases include a promesa version that doesn't have bb support.

tony.kay 2026-02-25T18:10:27.791669Z

ah..ok, so you have to override.

sheluchin 2026-02-25T18:11:37.572739Z

Yep

Omar 2026-02-25T22:24:12.743289Z

@alex.sheluchin can you gimme a minimum working example? i love this idea for bb + statecharts for certain tasks.

Omar 2026-02-25T22:26:24.238769Z

what's much harder is figuring out what a bunch of bashscripts are trying to do and figuring out whether they get you into the state you'd want

tony.kay 2026-02-25T22:37:21.584609Z

I’m pushing a branch on the statecharts lib, and also a new repo with visualization tools…nothing finalized yet, but might be useful (the standalone app is intended to open a POST REST API where you could send your chart, or you could co-locate your chart in source and it can do namespace scanning…mostly AI-written and not reviewed yet, but might be useful, or perhaps you can contribute. The viz2 branch on the statecharts repository (some viz improvements, which I’ve pushed as 1.4.0-RC3-SNAPSHOT)

tony.kay 2026-02-25T22:42:52.188649Z

https://github.com/fulcrologic/statecharts-visualizer is the standalone visualizer…untested (ai written) but should be close…I’ll try it out as I have time, but you’re welcome to give it a shot. The README won’t work yet as I have not pushed it to clojars…you’ll have to use :local/root instead

tony.kay 2026-02-25T22:47:18.454209Z

Just glancing at it, it looks like it is assuming that the statecharts resources is going to be on the classpath, which isn’t true…so it’s got an issue or two

tony.kay 2026-02-25T22:49:48.880329Z

I’m having AI fix that now…

sheluchin 2026-02-25T23:04:12.342959Z

I've got a killer headache but I'll post a minimal implementation tomorrow. Looking forward to following up on the ideas posted here as well as your viz2 impl. While we're at it, another useful angle might be to see about getting sc working in sci because that might open up a totally different lightweight pathway for viz.

tony.kay 2026-02-25T23:51:02.447529Z

This is working now:

clojure -Sdeps '{:deps {com.fulcrologic/statecharts-visualizer {:mvn/version "1.0.0-SNAPSHOT"}}}' -M -m com.fulcrologic.statecharts.visualizer.standalone
and I had it do the namespace scanning for demos included with the project and that worked…

tony.kay 2026-02-25T23:51:18.007649Z

so if you add it as “extra deps” to an existing project, it should be able to find the charts

tony.kay 2026-02-26T00:03:28.038739Z

If you do it like this (say in the statecharts project where the routing-demo2 has a CLJC chart):

clojure -Sdeps '{:aliases {:viz {:extra-deps {com.fulcrologic/statecharts-visualizer {:mvn/version "1.0.0-SNAPSHOT"}}}}}' -A:viz:dev:cljs:test -M -m com.fulcrologic.statecharts.visualizer.standalone
• Click Simulation in the UI • Scan namespaces should activate • Type in com.fulcrologic.statecharts.routing-demo2.chart and it should find a chart • Select it in the dropdown

tony.kay 2026-02-26T00:05:10.194099Z

scanning only works on CLJ/CLJC files, of course.

tony.kay 2026-02-26T00:07:20.611309Z

needs some polish, but better than nothing for sure.

tony.kay 2026-02-24T19:17:32.807849Z

There’s already viz

tony.kay 2026-02-24T19:19:29.885939Z

It’s CLJS ELK-based stuff…right now the rendering is wrapped in Fulcro components…I have exported it into Fulcro Inspect when using that integration, but there’s also CLJ-based code that makes a server that can serve any CLJC chart to the UI as a visualization…the ELK library isn’t in bb, though. There is a JVM and JS version of ELK, I just didn’t write any adapter yet.

sheluchin 2026-02-24T20:14:30.004749Z

I managed to get a simple terminal rendering with bb and https://github.com/AlexanderGrooff/mermaid-ascii but mermaid doesn't actually have great sc support and my current implementation won't scale well to more complex charts.