Fork me on GitHub
#biff
<
2022-02-07
>
Jacob O'Bryant05:02:37

I've pretty much finished rewriting the example project. it has the same features as before (a few crud text fields and a chat widget) but implemented with htmx. it was fun to set up actually. htmx has a nice websockets story. only thing left is to throw in an example of scheduling tasks with chime, then I'll move on to deployment/ops stuff probably. previously I finished authentication stuff including removing a login csrf vulnerability. also I'm now structuring the project into multiple "feature namespaces" which each expose the routes, static pages, TX listener fns etc for a particular feature. ("features" can have whatever level of granularity you want). everything defined in features is late-bound, so they can be redefined from the repl without needing to do a refresh/restart.

👍 2
Jacob O'Bryant05:02:41

see https://github.com/jacobobryant/biff/blob/dev/example/src/com/example/feat/app.clj for example of a feature namespace. also look for hx- attributes to see htmx in action. there's a bit of hyperscript too (look for :_ )

Jacob O'Bryant05:02:29

oh also I finished making some updates to the transaction format. in particular now you can do :xt/id [:db/lookup {:user/email ""}] and biff will do an upsert basically. I.e. it'll ensure the email is unique without using it for the user document's ID. (it's implemented by creating a separate {:xt/id {:user/email ""} :db/owned-by #uuid "..."} document).