This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-08-22
Channels
- # aws (12)
- # babashka (24)
- # beginners (51)
- # biff (2)
- # cherry (4)
- # cider (2)
- # clj-kondo (4)
- # cljs-dev (19)
- # clojure (70)
- # clojure-australia (4)
- # clojure-europe (39)
- # clojure-nl (4)
- # clojure-norway (6)
- # clojure-spec (9)
- # clojurescript (21)
- # component (6)
- # cursive (18)
- # data-science (9)
- # datomic (18)
- # events (2)
- # expound (4)
- # fulcro (15)
- # graalvm (2)
- # graphql (5)
- # jobs (1)
- # juxt (2)
- # leiningen (8)
- # malli (4)
- # meander (21)
- # nrepl (3)
- # observability (14)
- # off-topic (49)
- # other-languages (1)
- # pathom (13)
- # pedestal (7)
- # rdf (5)
- # re-frame (10)
- # reitit (1)
- # sql (4)
- # squint (30)
- # tools-deps (1)
- # vim (11)
Please tell me there is a good Headless CMS implementation done with Clojure. I'm going absolutely nuts with these nodejs based implementations which all suck monkeyballs in one way or another and I'm getting sick of it. I'm more than happy for a library solution that gives me bunch of stuff for free and I can work from there
thanks for the mention, @U07FCNURX! Back-end is typescript and AWS only at the moment.. and it’s very (very) beta 😿 And I’m not sure if it covers the category “headless CMS”, as there are no tables and schema, it’s more of a “google docs with react components” type situation
Need a proper database, need (preferably) graphql endpoint and need to be able to run it on google cloud 🙂
I have a feeling I should do this myself but unfortunately I do not have time for that
yeah, that makes sense! Most people seems to mean tables and data structures with automated GUI when they say “Headless CMS”
Yeah. This is a proper use case for a headless CMS with multiple delivery channels and so on
there’s always the #1 in this space, Sanity. Not self-hostable though, but people have great success with web hooks that lets you store final output locally
The fact that it doesn't log almost anything (even when setting their logging settings to something sensible) doesn't really increase confidence for production usage
what use case lead you to the requirement of it being written in Clojure? In my experience, a headless CMS is usually a black box that you get data from via APIs and the implementation language is not really relevant
I suppose headless CMS is many things… I’m not that familiar with the node library versions of this. You’re looking for something with a programmatic API that you can embed in your own system?
Well, the story is a slightly more complex. Naturally, there's a tight(ish) deadline and need to get stuff out live by then. There's specific feature set that needs to be finished. Then there's the future vision and what is needed there
(I’m just asking for my own curiosity now, and not really making any attempt whatsoever at helping you find a good CMS 😇)
My current plan is to take a headless CMS and use that for the time being but most likely we'll write everything from scratch a bit later when we have more resources and time
GraphQL endpoint is preferable due to it's flexibility especially if one takes a blackbox kind of CMS implementation
This is a bit of a rant from my side and I guess I'll keep on working with Keystone for the time being but if there had been a really great alternative for Clojure I would have been tempted 🙂
sanity + webhooks is definitely worth looking into, at least! The CMS itself is a black box, but all changes gets posted to a webhook, where you can write any code you want in your preferred programming langauge, and extract data from Sanity through its APIs, and store locally in your own system whatever you need
I did look at sanity and didn't go with it, can't remember anymore what was the main reason for it
One of the things that bugs me a lot with all these nodejs implementations is their insistence on creating their own CLI tools for running those. Why? It's not like they are being setup by software development imbecils? Have they ever heard of IaC?
All of this brings me bad vibes from ORMs where they make easy things even easier and hard things impossible
haha yeah, having a good CLI UX and being fancy etc seems to be something the Node crowd enjoys 😄
You want to store images somewhere? Great. Provide out-of-the-box providers for S3 for example. But also provide an easy way to plug your own provider there that you can write if you have a different need
#xtdb + #juxt-site from #juxt may be of assistance - it's a GraphQL resource server that can be used as a headless CMS
But it is maybe a bit too much work right now. But I am going to take another look later when I hopefully have more time for this
We treat Sanity like a database with a really good editing interface, like @U0MKRS1FX mentioned
I was going to say https://www.hyperfiddle.net/ but I think it's still in development.
+1, currently I'm stuck with strapi because it has two main features: user login connectors and the ability to modify everything in the codebase per instance, aka I can white label strapi or add functionality easily. This is not available from Supabase etc
However it would be great if there's one in clojure so I can just use clojure instead of NodeJS
I sometimes wonder about the idea of writing changelogs for Clojure libs and apps in EDN. When properly formatted, EDN remains quite human readable and maybe it could lead to interesting tooling. E.g. A helper function that filters and outputs only known breaking changes. Does it make any sense? Or does it sound like crazy talk?
It would be easier to extend the normal markdown changelog conventions with more metadata than to make custom visualizers and/or editors for this new markdown format. So it doesn't seem worth it to me.
The only reason we use plaintext files for this kind of thing is because git is file centric and doesn't allow you to store structured data in it
I would much prefer to store changes to structured metadata about the code alongside the code; I wrote a bit of a rant about this a while back https://respatialized.net/against-metadata.html
In github markdown you can also add tables, diagrams, etc: https://github.blog/2022-02-14-include-diagrams-markdown-files-mermaid/
IMO we should stop storing important information about our code and its history in flat file formats where composition is impossible, consistency is not enforced, and you have no query capabilities, so I'd argue that EDN doesn't go far enough
But it's still an improvement over endless "update README.md" commits
It sound to me like too much effort that will result in little adoption anyway
You can use the fanciest changelog format and still screw up :) i.e. it all comes from a human.
In the end there a couple things that don't lie:
• Diffs, e.g. I post https://github.com/seancorfield/next-jdbc/compare/v1.2.780...v1.2.796 when suggesting an upgrade at work
• Specs/Schemas (sadly there's nothing even close to standarization in ... so no automated tooling would shine today)
It wouldn't be too crazy to build today a tool that compared the ASTs (or kondo analyses, w/e) of $lib v1 and v2. It could tell basic things like var changes, arglist changes.
I am afraid @U04V15CAJ beat us to that, again 🙂 https://github.com/borkdude/api-diff
What I'd like to have to support that is semantic diffs,think next level from structural diffs ala edit script
@UK0810AQ2 https://difftastic.wilfred.me.uk/ diffs on tree-sitter nodes/trees.
The clojure deps tool "outdated" will link to a github diff range of it can. I was thinking about trying to find and add change log data to that.
Edn would be an improvement, but not by much because that information is meant for humans to read mostly.
Like others have said, structural diffs would be the truest way to know changes, but that's too much effort for most users to go through to read. So your still going to want to have a high level overview.
Thanks for your opinions, very interesting I guess that beyond EDN, what I was really looking for is just better programmability and your answers go towards that.
Are there know “known” patterns for the kind of use cases where you would add meta data to a map, but where transients are used for performance purposes? Playing around in the repl, (with-meta (transient {:foo "bar"})) {:my-meta "foo"})
throws an error, and I can’t find any docs for adding meta data to transients.
Ah. Thanks. I’ll hunt down the with-meta
equivalent for mutable things. That’s a good steer. Thanks!
I also suggest considering the alternative to transients and metadata, things are usually better without them
I usually don’t use transients. This is a performance sensitive use case though, and it’s a significant penalty to use a plain map here.
If you look at into, it turns the collection into a transient, pours the values in, makes it persistent, then copies metadata