Fork me on GitHub
#polylith
<
2022-11-13
>
Victor Vollbrecht11:11:07

Hello, I'd like to know how to structure files and folders in a project that will only have a basic backend, Jetty + Ring, and Elm as frontend, inside the polylith architecture. Maybe two projects? Where should the folder for the Elm project live? in a resources folder, base/component src? It's basically a simple backend just serving static JS files created by Elm, and then it would behave as a SPA

furkan3ayraktar06:11:53

I haven’t worked with Elm before. However, I believe you should structure your project, as you mentioned, where the front end is served from the base and stored under a resources folder of the base or another component. However, you will not benefit from Polylith in the front end since cljs is not supported. At work, we keep two separate repositories for the Polylith backend and a regular shadow-cljs frontend.

Hukka11:11:54

We keep them in the same repository, but frontend is a folder in the same level as bases, components and projects. Build process compiles and bundles the frontend code, and copies to resources before making the jar. Could as well go to some static file CDN.

👍 1