Reputation: 3476
This is not a technical question, it is more architecture/structure issue I'm facing and it would be nice to hear more opinions until I find the best solution to my problem.
Currently my project has:
As you can imagine, this is a very old project that scaled up to be a huge mess and now I would like to find the best solution to restructure everything.
The main idea is to convert the Java project to be only an API and create a Front-End project to host the micro vuejs applications.
Now I would like to know your opinions on how to structure the front-end.
Actually my ideas are:
One thing to consider is that all micro front-ends has their own Vuex Store.
I would really appreciate any kind of help, opinion, solution, etc... Thanks
Upvotes: 1
Views: 158
Reputation: 1260
For the front end your right, maintaining one project is way more easier. I think you can achieve doing 1 project AND keeping the modularity/
We tend to organize our code in monolitic way like this
app
components
store
views
...
but you can also organize your code by feature
app
components (global components used everywhere in the app)
store (root state)
views (base architecture)
...
feature1
components
store
views
feature2
components
store
views
vuex allow the store to be splitted in multiple modules https://vuex.vuejs.org/guide/modules.html so each feature can keep it's own store
For the server part, it's a good idea to make your JAVA app API only. I tend to think that mixing front and back in a same project is less maintainable . In a second time (if you wish) you can host your nuxt app on a node server and do SSR
Upvotes: 2