Fork me on GitHub

hi everyone in a polylith architecture is it considered bad practice to have two projects that use the same database? I was thinking of having bases/rest-api and bases/graphql-api and a project for each one where the database is the same WDYT ?


That is totally good. We have more than two projects that use the same database.


great, thanks a lot

👍 2

hi again 🙂 when I create a component with poly create component name:name, the resources directory is the only one that is not created with top-namespace, should it be created with the same src and test structure ?

$ poly info

Warning 205: Non top namespace name was found in name.
resources/name/config.clj --> no top-namespace (throw Warning 205) src/{top-namespace}/name/interface.clj --> top-namespace test/{top-namespace}/name/interface_test.clj --> top-namespace if I modify it to the same src and test structure using the top-namespace the warning disappears


The rule is to not put source code (files ending with .cljor .cljc) in the resources directory. The only exception is described in issue. I would recommend you putting the config.clj under the src directory. To make sure files under resources don’t collide with other resources directories, they are put under a sub directory, e.g. resources/invoicer where invoicer in this example is the component’s interface name.


got it - thanks a lot gratitude

👍 2