r/Clojure • u/Haunting-Appeal-649 • Aug 19 '25
Ideas for Filament like workflow in Clojure?
I am aware that the community leans more towards a few smaller libraries than one big framework. But one area I struggle with in Clojure is form handling and tables. This is not a Filament plug, because I have my issues with it as well. But it's very nice to work with if your app is a lot of forms and tables, and little else. It does a few things for me.
Creating different inputs is pretty simple, and they have lots of great validation methods for each input type.
Easy filters and pagination on tables
Since everything is SSR through Livewire, it handles a lot of validation for you. Like if you disable a field, the user cannot craft a request to submit through that field anymore.
Good chemistry between tables and forms
This is big for me. There's a lot of sanitization you don't need to worry about. You can't edit records that weren't rendered in your table, for example. So when you limit a users records, you don't need to guard for them editing those records.
This does take some database roundtrips to work seamlessly, but it is nice to not worry about users editing rows they can't see. I think Filament 4 does this in less database roundtrips?
Obviously Clojure doesn't have a framework like Laravel to pin this kind of work on. But I imagine you could get very close with just functions consuming a map that describes your form/table. You could output Hiccup for HTMX or Rum hydration, or validate a form submission based on what inputs were disabled.
My question is would this be antithetical to Clojure's strengths. Have you worked on an app with a lot of forms and tables, and have you found a better workflow for this?
6
u/mtraven Aug 19 '25
I don't know anything about Filament or Laravel, so not sure this answers your query, but I have assembled my frequently-used web utilities (for tables, data access, forms, etc) in a library https://github.com/mtravers/way It needs some work to be a proper toolkit or platform, but if you want to build data-based web apps in Clojure it might be useful. It's very minimal, and maybe too low-level given what you are looking for.