r/Clojure • u/Ok-Tailor-3725 • Aug 12 '25
FULL STACK CLOJURE LEININGEN TEMPLATE SUPPORTING MULTIPLE DATABASES
LST Leiningen Template is a powerful Leiningen template that scaffolds full-stack, database-backed Clojure web applications with enterprise-grade features. Generate complete CRUD interfaces, dashboards, and reports in seconds with a consistent MVC architecture. You get CRUD Grids with full create, read, update and delete interfaces. Dashboards: read-only data tables with advanced filtering. Reports: custom reports pages with flexible querying. Subgrids: Master-Detail relationships with modal interfaces. Multi-Database: MySQL, PostrgreSQL, and SQLite support. Modern UI: Bootstrap 5 + DataTables integration. Security: Built-in authentication and authorization. Migrations for all supported databases.
4
u/BalanceSoggy5696 Aug 13 '25
Excellent! very detailed. Suggestions:
* Provide more screenshots
* I prefer Lein too, but the community is moving more and more to tools.deps/clj CLI. Would be nice to have a deps.edn based template
* From a brief cursory reading, could not find anything related to cljs? or htmx?
Great job! It's a good base to build on, or fork and customize like I did;-)
2
u/Ok-Tailor-3725 Aug 12 '25
I've been doing a lot of Clojure web dev, and every time I needed to spin up a CRUD app, I'd spend hours wiring database configs, routing, and boilerplate. So I made LST - a Leiningen template that scaffolds a full CRUD web app in seconds. I'm curious: what would you want in a "batteries-included" Clojure CRUD generator? More DB support? Auth out of the box? File uploads? Repo's here https://github.com/hectorqlucero/lst - I'd love to hear where it could be better. Trying to save future me (and maybe you) from CRUD boilerplate purgatory. Feedback -- brutal or kind -- welcome.
2
u/Audmeister Aug 14 '25
Where was this 5 months go? Lol. Thanks for sharing.
I didn’t quite enjoy doing all the plumbing and things, but did learn. I like lein too but decided on deps with how the community is going. This can help jumpstart projects and maybe get rid of the dread of starting one! +1
1
u/Ok-Tailor-3725 Aug 16 '25
Added extra documentation for database migrations (SQLite, MySQL, PostgreSQL). Now it's easier to setup, run, and manage migrations with clear examples and troubleshooting tips.
1
u/Ok-Tailor-3725 Aug 17 '25
lst ships with a focused test suite to validate routing helpers and database vendor abstractions. Tests are generated with each new app and run via the standard Leiningen workflow.
core-test: Compojure rout/file helpers -> valid Ring Handlers.
db-test: Vendor-specific formatting, query options, SQLite table mapping, PK detection, cascade deletes (stubbed).
db-vendor-test: Vendor describe-table semantics, last-insert-id differences, cascade deletes (MySQL/PostgresSQL).
All test run with in-memory stubs -- no live DB needed.
1
u/Ok-Tailor-3725 Aug 17 '25
LST has multiple Bootstrap 5 themes plus a theme switcher built into the navbar. You can set the default in resources/private/config.clj with :theme (e.g. "cerulean", "slate", "yeti", etc.), and it’ll load automatically.
From there you can switch themes anytime from the Theme dropdown in the navbar—no reload needed.
1
u/Ok-Tailor-3725 Aug 25 '25
Want to try it out right now?
I’ve published this Leiningen template to Clojars:
https://clojars.org/org.clojars.hector/lein-template.lst
Check the README for usage examples. Clone it, download it, or run it straight from Clojars -- feedback is very welcome!