This is the companion project for a talk at the Karlsruher Entwicklertag 2024 and the talk Fantastische Monorepos und wo sie zu finden sind.
This MonoRepo consist of 4 modules
- build-logic: Contains convention plugins and custom plugins
- server-api: Contains the api definition for the server module and generates the FE client
- server: Spring Application that implements the API
- web-angular: The Angular Frontend application calling the Server
This module contains any convention plugins and custom plugins. Convention plugins define logic that can be reused with other modules to simplify their setup. A Kotlin convention plugin could contain for example the target java version, formatting options and custom repositories.
The server api contains primarily the Json definition for the API. With the help of the OpenAPIGenerator we can generate a compatible angular frontend client.
The server module implements the API and provides your backend business logic. It also bundles the frontend application and serves it additionally to the RestControllers.
This is a standard angular project. It has additionally a build.gradle.kts
file to allow building and bundling the
frontend with gradle.
Build the project with ./gradlew assemble
. To bundle the frontend with the server run ./gradlew assemble -Pprod
.
This enables you to develop on the backend without having to build the frontend application.
To develop the frontend application use your standard Npm tools. Have a look at the Web-Angular-README
You can run the tests with ./gradlew check
. This will run checks against the current project format and execute the
specified tests.
To check if all files are correctly formatted run either ./gradlew check
or ./gradlew checkFormat
. If you want to
format files run ./gradlew format
.