larswoltersdev's avatar

Application architecture feedback

Dear all,

We are doing a rework of our current software platform at our company. At this point, it is a Vue.js front-end client with a Laravel back-end REST API. There are three kind of users (defined by permissions).

At this moment, the Vue.js front-end is very big and messy. There is a lot of complexity and clutter. For example: we are having the functionalities of all the three user types in one view file. Lot's of components and conditional based on the permissions of the user. The thing is: the functionalities have nothing to do with each other really. We have been brainstorming and we came up with the following idea:

We make three separate clients for each type of user: normal users, companies and admins. They all use the same back-end with different REST API endpoints (normal user endpoints, company endpoints and admin endpoints). There won't be 'double' maintenance, since all the three clients are very different from one another. Also, it can happen that one client may be updated frequently based on business needs, while the other one (such as the admin panel) may remain the same for a while.

Is this a good decision and approach? Or are there risks or issues that we are missing here?

0 likes
2 replies
bugsysha's avatar

Sounds like a very bad idea. Can you give more info on what is causing the clutter in the current implementation?

There are multiple videos here on Laracasts where a topic was that you shouldn't have a fat frontend and fat backend. It is better to keep everything on the backend and just do the presentation layer on the frontend.

martinbean's avatar

@larswolters If you’re having difficulty maintaining one Vue-based client, I really don’t know how you think trebling the number of clients is going to solve anything.

You say you have logic for these user types in a one view file, which suggests the clients have the same endpoints, but just show different things based on the user type. If you create three distinct clients, then that’s three separate codebases you’ve now got to maintain routing in, i.e. if you add a route in one client, you’ve now got to ensure that you add the same route for the other two clients.

It sounds like you just need to organise your existing Vue application better; not just create two more.

Also, is this the application you described on Laracasts a few months ago and I advised not building as a Vue-based SPA?

Please or to participate in this conversation.