I'm starting to get into web development a little more. Currently I use the Spark Framework along with Vue for the few apps I've made. While this certainly works it's not ideal.
The project is built with Maven (and NPM for Vue) and the build process looks something like this.
- Maven packages the Spark Framework Java application
- Maven (with the frontend-maven-plugin) downloads node/npm and builds the Vue frontend
- Maven copies the compiled resources into the jar as static assets
So the filesystem looks something like this
/src/main/java (Spark Framework)
/src/main/resources (Vue)
This leads to a couple of annoyances.
- Everything is in one repository. Ideally I'd be able to have a separate repo for each layer of the project (One for Java, one for Vue)
- Development workflow isn't ideal. If I just want to test the Java part of the app, I still spend time compiling the frontend (Vue)
- A minor issue, but while working in an IDE, I'm dealing with deeply nested folders. Anytime I want to edit the frontend, my folder structure looks something like /src/main/resources/project-vue/
Here's one of my projects that uses this model
So my question is: What's a better way to structure my application?