Hello, my question is if there is any difference between building a project with embedded laravel/react stack (using laravel ui) and building two separated projects that connect together with these technologies. We are currently working with the first option and we see no big difference yet but want to know more about this topic. TY for your answers.
If you know your app is only going to be used in the browser, I personally think having one project/repo is easier to code/maintain. You can use tools like Inertia to make the UX feel like a single-page app and the end-user won't notice the difference.
If your app can be used outside of a browser (like a mobile app), it makes sense to split out the project into multiple repos. A repo for each client (web app as a single page app, mobile app) and a repo for the backend API. This approach can also be beneficial for large teams that are separated into backend and frontend teams.
I'm personally more comfortable with the first option, as most of the apps I build are just CRUD-based and live in the browser only.
@palldev If you separate the front-end and back-end into separate repositories, then you’ll just make developing and deploying your project more complicated for no gain.
Consider developing a feature. Features usually require some changes to both the front-end and the back-end. IF you split these into separate repositories then you’ve now got to make two branches in two repositories, and coordinate the merging and deploying of these two branches and two repositories.
If you just keep it in the one repository, then you can work on both the front- and back-end changes in a single branch, create a single PR for the feature, and merge that single PR and then deploy the application.