Open CowMuon opened 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
.
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:
/adaptors
- This should never had been put here to begin with. Refactor into common-common for now./analytics
- This is straight up Mixpanel and should be handled client side.permissions.ts
- This should go into new permissions module.substrate.ts
- :munch_scream:types.ts
- Interfaces are part of API surface area and need to be refactored as such or imported.utils.ts
- Misc. grab bag of stuff, move into common-common and then we'll need to clean up this toolbox.