hicommonwealth / commonwealth

A platform for decentralized communities
https://commonwealth.im
GNU General Public License v3.0
67 stars 44 forks source link

Kill shared folder #2584

Open CowMuon opened 1 year ago

CowMuon commented 1 year ago

As we continue to modullarise the app and decouple the front and back-ends, we need to kill off the /shared folder under server, which only encourages bad patterns.

We also have the common-common package and it's unclear to devs what should be in common-common and what should be in /shared.

In the near term, let's kill off /shared, ideally by moving what's there either into /server or /client. Anything that is currently still rilly needed by client should be moved into the common-common package for now. That will reduce the surface area going forward, and then we can circle back and deal with common-common at some point.

As far as what all's in there:

timolegros commented 1 year ago

Just to note but common-common is supposed to be stuff that is utilized by more than 1 package e.g. RabbitMQ + Redis controllers. While killing shared seems like a decent idea I would be hesitant to move all its contents to common-common since now we would have purely commonwealth package code inside common-common.