ladder99
ladder99 copied to clipboard
Revise the repository structure
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 toapps/
, 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) withinapps/
:- 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) intodocs/
(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 todocs/
and there might not be neededexample/
folder at all; - I think we should remove/move this folder;
- I am not sure if
-
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 (inapps/
) that needs this. - I think we should remove/move this folder;
- I am not sure what is
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: