The back-end uses Java because the Kafka libraries for Java are solid and I didn't want to invest 6 months patching the NodeJS Kafka library to fill in the missing features. The front-end client-side web app relies on NodeJS to download dependencies, bundle, and minify. These features are frankly not well supported in the Java ecosystem: The Java minify plugin for Gradle has been historically under-maintained. NPM is the defacto repo for web libraries, and it is designed to work with Node, and not so much with Gradle (Seems having Gradle wrap Node is the most workable currently). Bundling appears to require quite a lot of custom Groovy/Kotlin in Gradle, and it's ugly, and currently I don't have it caching properly so it makes the build very slow. Splitting into two apps could help: perhaps in a mono-repo. Dealing with CORS has what has been stopping me. Deploying the two pieces behind a reverse proxy (like Apache HTTPD) could alleviate the CORS complexly, but complicates deployment, especially in Docker where it would likely require additional container.
The back-end uses Java because the Kafka libraries for Java are solid and I didn't want to invest 6 months patching the NodeJS Kafka library to fill in the missing features. The front-end client-side web app relies on NodeJS to download dependencies, bundle, and minify. These features are frankly not well supported in the Java ecosystem: The Java minify plugin for Gradle has been historically under-maintained. NPM is the defacto repo for web libraries, and it is designed to work with Node, and not so much with Gradle (Seems having Gradle wrap Node is the most workable currently). Bundling appears to require quite a lot of custom Groovy/Kotlin in Gradle, and it's ugly, and currently I don't have it caching properly so it makes the build very slow. Splitting into two apps could help: perhaps in a mono-repo. Dealing with CORS has what has been stopping me. Deploying the two pieces behind a reverse proxy (like Apache HTTPD) could alleviate the CORS complexly, but complicates deployment, especially in Docker where it would likely require additional container.