ladder99 icon indicating copy to clipboard operation
ladder99 copied to clipboard

Revise the repository structure

Open tukusejssirs opened this issue 2 years ago • 4 comments

You seem to have multiple packages in a single repository, but the repository structure is a bit confusing. Below is a suggested structure:

  • apps/:
    • services/ seem to be separate apps, therefore I suggest to rename that folder to apps/, probably using Nx;
    • all apps (and microservices) should go in here;
    • shell/ is just another app (or a collection of apps?), thus it (they all?) should be moved into separate folder(s) within apps/:
      • consider moving from BASH to JS/TS; consider using Commander.js;
  • docs/:
    • design/ seems to be part of documentation, therefore it should be moved (or merged) into docs/ (see #215);
  • libs/:
    • all libraries should go in here;
  • example/:
    • I am not sure if setups/ should be part of the codebase, maybe we should move it to docs/ and there might not be needed example/ folder at all;
    • I think we should remove/move this folder;
  • volumes/:
    • I am not sure what is volumes/ used for, however, it seems to be just some Grafana config, thus consider moving it in that app (in apps/) that needs this.
    • I think we should remove/move this folder;

If we want to use Nx, it has a distinction between apps and libraries. AFAIK, most of the apps (like drivers) we have, are libraries actually, therefore those would reside in libs/ folder under Nx. Other apps (or microservices) would live under apps/.

I really like Nx monorepo. I understand that this change is quite fundamental and @bburns would need to learn a new tool (actually, a few of them: ESLint, Nx, potentially Nest), however, I really think it would ease are work in the long-term. Currently, Brian does all the hard work, however, why should we do something that is already created for us. Moreover, this tooling helps us generate some boilerplates, helps with testing, structuring, validating the code, building CRUD methods, APIs, etc. Currently, it is a bit of a mess (structurally and codewise too). On the other, Brian seem to do well, which means he’s an experienced programmer. :wink:

tukusejssirs avatar Dec 15 '22 11:12 tukusejssirs