r/Clojure • u/abogoyavlensky • Apr 09 '25
Introducing Clojure Stack Lite
https://stack.bogoyavlensky.com/A quick way to bootstrap your Clojure projects with a modern, lightweight Server-side Rendering stack that focuses on simplicity and developer productivity:
Integrant/Reitit/HoneySQL
SQLite persistence
HTMX-powered UI with TailwindCSS
CI/CD with Github Actions and Kamal
Linting, formatting and tests
deps.edn and Babashka Tasks for project management
Basic PWA support
This template lets you focus on writing your application logic rather than configuration.
Check out the documentation and get started!
4
u/maxw85 Apr 10 '25
That's super awesome 🥳 Thanks a lot for creating it and providing it under the MIT license.
5
1
1
u/wademealing Apr 18 '25 edited Apr 18 '25
Sadly, its still making me think about configuration.
When making the new clojure project based on the template:
clojure -Sdeps '{:override-deps {org.clojure/clojure {:mvn/version "1.12.0"}}}' -Tnew create :template io.github.abogoyavlensky/clojure-stack-lite :name foo/foo
Failed with (underlying error, possibly from Maven):
Failed to resolve version for io.github.abogoyavlensky:lein-template.clojure-stack-lite:jar:RELEASE: Could not find metadata io.github.abogoyavlensky:lein-template.clojure-stack-lite/maven-metadata.xml in local (/home/username/.m2/repository)
Execution error (ExceptionInfo) at clj-new.helpers/resolve-remote-template (helpers.clj:176).
Could not locate the artifact for template: io.github.abogoyavlensky/clojure-stack-lite
Tried coordinates:
{io.github.abogoyavlensky/clj-template.clojure-stack-lite #:mvn{:version "RELEASE"}}
\\\[io.github.abogoyavlensky/boot-template.clojure-stack-lite "RELEASE"\\\]
\\\[io.github.abogoyavlensky/lein-template.clojure-stack-lite "RELEASE"\\\]For more detail, enable verbose logging with :verbose 1, 2, or 3
I must have something broken in my local configuration, I just can't think what.
The neil command:
neil new io.github.abogoyavlensky/clojure-stack-lite myproject
As mentioned on the github does however work.
1
u/abogoyavlensky Apr 18 '25
Hi, thanks for the feedback, can you please create an issue on Github for the project with all the details? I will take a look.
2
u/wademealing Apr 18 '25
I have found the issue, it was a previous install of clj-new that I had installed incorrectly.
I have created the issue https://github.com/abogoyavlensky/clojure-stack-lite/issues/2 along with the resolution in case anyone trips over an issue with the same resolution.
Thanks again.
1
1
1
u/tclerguy Apr 21 '25
Looks like there's some kind of dependency issue, I followed the quick start, and I get this after the reset call (working through it myself now to find the missing dependency):
user=> (reset)
:reloading (lite-stack-sample.core lite-stack-sample.db lite-stack-sample.test-utils lite-stack-sample.home-test lite-stack-sample.views lite-stack-sample.handlers lite-stack-sample.routes lite-stack-sample.server user)
:error-while-loading lite-stack-sample.server
#error {
:cause "Could not locate ring/websocket__init.class, ring/websocket.clj or ring/websocket.cljc on classpath."
1
u/abogoyavlensky Apr 21 '25
Hi, thanks for trying the template and for reporting an error! I just went through the quickstart process again with the name of a project `lite-stack-sample` and couldn't reproduce the issue. Have you by chance modified any dependencies in the `deps.edn` file?
1
u/tclerguy Apr 21 '25
No - I had made no modifications to get the error. Adding the dep on ring core was the only thing I changed in order to fix the issue
1
u/abogoyavlensky Apr 21 '25
Makes sense. Did you add `ring/ring-core {:mvn/version "1.14.1"}` to fix the issue? I'll probably include it by default in the template.
2
u/tclerguy Apr 21 '25
Yep that’s the one I went with. It actually sounds like a dep issue on the ring side possibly (the dep on ring jetty adapter doesn’t seem to pull everything needed in). But I suppose it’s nice to explicitly define the core dep
1
u/tclerguy Apr 21 '25
I had to include an explicit dep on `ring/ring-core` for some reason ... FYI, you might need to include that
3
5
u/Responsible-Newt9241 Apr 10 '25
Why did you choose HTMX instead of https://data-star.dev/ ?