I would like to create a monorepo example as a demo for my boss with several frontend and backend projects. Currently we have mostly Spring APIs and Angular on the front-end. We are using Swagger-Codegen to generate client apis for connecting our Angular apps with our APIs. Everything is deployed to a kubernetes cluster. I plan to use the same technologies in this demo.
Right now we are using Sonatype Nexus as an NPM & Maven repository. It is a great tool and I would consider using it in a monorepo style project but I also like the idea of committing the generated libs direct to the monorepo. In my mind, the advantage to committing these to source control is that we can be sure the front-ends always transpile with the latest client libs and there is no mucking about with permissions and extra jenkins jobs pushing to a repository manager.
The current structure I have in mind
backend/ shared-lib/ api-core/ api-two/ parent-pom.xml frontend/ api-core-codegen/ api-two-codegen/ shared-angular-components/ angular-frontend-1/ angular-frontend-2/ lerna.json package.json
My questions are:
- How should I include the generated client libraries in the project? (commit in git or store externally in something like Nexus)
- How can I build only the parts that have changed in a tool like Jenkins? (tools like Bazel sound very cool but I don't really want to learn a whole new toolset if it's possible to do with just Maven, NPM, Jenkins...)
- How would you structure things differently (sorry if too general to answer)?