Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

larsiberg's avatar

Splitting frontend and backend

Hi Laravel devs,

I'm not a tech person but have some tech.knowledge and group of developers, until now we developed always monolith applications, means Frontend and Backend are within one same project but now we have strong requirement to split it.

To confirm developers thoughts I would like to ask in this community what's best practical approach to split frontend and backend?

Developers would like to use:

  • BE: Laravel with sanctum or passport, which one is better? We need user authentication for frontend app and we should keep the door open for mobile app
  • FE: VUE.JS, are there any specific plugins we should use?
  • Are there any specific security issues?

Thanks for everyone :)

1 like
3 replies
vincent15000's avatar

Hello,

Good idea to split the backend and the frontend if you need to keep the door open for mobile applications.

You need to work in API mode in the backend.

  • Sanctum or Passport ? It depends on your needs, in most cases Sanctum is a great solution.

  • VueJS for the frontend is also a good idea, are there specific plugins you would use ? It depends on your needs, but I think that VueJS router is essential.

  • Are there specific security issues ? Yes if you send sensitive informations, you must be aware of what datas you serialize before sending them to the frontend.

You can develop APIs in the backend and progressively migrate all the code from the controller to the API controllers (often not so much work to do).

For the web application frontend, you can keep VueJS in the same environment than Laravel, so you will have an easy integration of VueJS and no trouble with authentication.

So for the mobile application, you will have the APIs already ready to work and just have to develop the mobile application frontend.

If you want to develop the mobile application with React Native, it's perhaps a better choice to use React wor the web application.

If you need more details, please tell me ;).

V

martinbean's avatar

now we have strong requirement to split it.

@larsiberg And what is this “strong requirement”? Is the requirement to make development and deployment of features more complicated…? Because that’s what will happen.

1 like
kerelka's avatar

@martinbean Maybe they feel the need to manage the code separately between FE and BE. Sometimes, separating FE and BE is a good move, like for scalability, as it allows independent focus on each without affecting the other too much.

Also, they might have specialized developer skill sets for FE and BE to reduce the complexity of working across different areas, //i guess

1 like

Please or to participate in this conversation.