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

Allviinn's avatar

Laravel API and React App, best Practice

Hey Guys, So i'm building an app, that has a web admin Interface for administration of all data. For the front end, I want to make a react App (so that i could export to mobile apps later) that will consume my Laravel API.

I was wondering if there is any problem for having my Laravel web admin interface and my Laravel API on the same server, same App.

Should I make my react app on that same App (Having the API, web Admin Interface and, react App on that app) or should I Split all of that.

What would be the best practice ?

1 like
3 replies
tisuchi's avatar

@allviinn What I will do in your situation-

  • Write API fully via laravel.
  • Use Admin section on laravel by using Laravel API. Maybe AJAX or calling API..
  • Use React APP for front-end.

Now, if I have a chance, I may host the API and admin in one place. The frontend will be in a different place where it just consumes the API only.

4 likes
Allviinn's avatar

@tisuchi Ok so, you would have developped the Admin section via the API. Is there any problem having that admin section the "classic" way (not API, just synchrous web interface,) and make that app serve the data via the API ? I'm wondering what is the purpose if splitting everything, except for performance reasons if the app is too big. Is there any Laravel technical issues, or maybe some official recommendation to not make the same app host everything ? Or is it just personal preferences for the sake of organization and ease for maintenance ?

3 likes
tisuchi's avatar
tisuchi
Best Answer
Level 70

@allviinn well, there is no limitation. You can put everything together.

However, splitting apps separately instead of putting them together is a better mechanism in-terms of performance, management, usability, and maintainability. Therefore a term comes to play called Micro Services.

Again, it's not necessary to separate your apps unless it's already big enough or has a big future plan.

4 likes

Please or to participate in this conversation.