Small web apps with Babashka: Luminus guestbook-reagent example

The project bb-web shows that it is possible to code a SPA web app in Clojure without having to install Java/Clojurescript. The heavy load is carried by Babashka and its Small Clojure Interpreter (SCI).

bb-web makes use of a preliminary Babashka release with http-kit included, which gives a very lightweight back-end compared to the JVM. Using SCI in the front-end significantely improves the error messages compared to self hosted Clojurescript.

The only project-immanent ingredient is a 50 loc Clojurescript file (precompiled to 1MB) which makes Reagent and cljs-ajax availabe to SCI.

On can readily start changing the example. It is delibarately taken from the guestbook-reagent code of the Luminus book, itself being a main go-to place for learning how to develop web-apps in Clojure. bb-web is meant to lower the bar even further to enter that road. The project description is especially directed towards MS-Windows™ users.

9 Likes

Just gotta say, this is awesome. I can see this being a Babashka pilot-study laying groundwork for great things in the future.

Thank you @Webdev_Tory. To show the possibilities, I added an example using Ring middleware, Reitit routing, Muutaja encoding and Selmer templating. A custom-buildt Babashka-fork executable for MS-Windows is provided.