I am very interested in the polylith architecture for many reasons. However I'm going to start working on a frontend project with clojurescript and I am unsure how polylith should be applied to a reagent, re-frame or other sort of project
It would also interesting to be able to share data definitions between frontend and backend using one or multiple components
I'm fairly new to clojure so there is alot to digest and figure out
At the moment, we havenāt done any efforts to support Polylith in frontend development. Joakim explained our reasoning in the first answer of the https://polylith.gitbook.io/polylith/conclusion/faq. However, we are open to hear more thoughts how/if we can/should add that support.
When it comes to sharing data definitions via a component, it should still be possible to do that if you are thinking to keep your frontend project in the same repo as your backend project. You can then reference them from the frontend project. We are currently working on an update to introduce deps.edn
files for each component and base (following Alex Millerās comments in https://github.com/polyfy/polylith/issues/66). In that case, you may be able to refer to specific components via :local/root
from outside of the polylith workspace. An important note here: I havenāt tried this approach myself and Iām not an expert when it comes to frontend development in Clojure.
allright, thanks
the way I look at Polylith is that it should contain all domain specific code for a company so that it would be easy to reuse components when starting a new project
also the strictness of components makes it easy to define tasks for developers to build a component
so I would like to keep all code in the same repository with some convention saying whats frontend only or backend only
but yeah, i realise that frontend is quite hard to do componentized since it's all context dependent
I think it could be solved with some tweaks, maybe with different ādevā namespaces? If you would like frontend and backend to share the same repo, I mean. The REPL would need to run in different contexts, right? Java and JavaScript as the runtimes. Shared code could be cljc
files. Iām only guessing here š
the base would define what environment the components would run in
the reason I ask is ofcourse that I don't really know> But I'm investigating the possibilities