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

devchops's avatar

Planning a Vue.js Single Page App

So im building my first app with vue and laravel. I have previously built apps with php (plain html) and one node.js + angular app that consumed an existing rest api.

I have mapped out the requirements, database schema. I am wondering if I should start building the app by:

  • Creating a laravel API layer first and then tackle the frontend with Vue.js
  • Or Create the Vue.js & frontend app first, then build out my laravel API to handle requests?
  • Or Develop both Vue frontend + Laravel API in parallel?

What are the best practices when building a SPA app, which approach do you take and what are the benefits of doing so?

0 likes
4 replies
ptowl's avatar
ptowl
Best Answer
Level 4

you get as many answers as developers.

TLDR answer is: do whatever works best for you.

Long Answer: You should plan ahead what the app will do. Then plan what endpoints you might need. You'll need endpoints for content, for user interface, for exchange information. Either you plan to every last detail or just get a broad idea. But it's always a good idea to cover the majority of the functions and lay them by as groups. Put it in writing. Sometimes you realize you forgot something that would really impact down the line (it happens a lot).

Then do what feels right. I prefer to build them in parallel. That way you can see the app growing and take shape instead of writing a shedload of code without seeing it in real action. Some devs prefer to code in separate so they don't need to have two languages in the head and hop from one to the other all the time.

If you are going with the frontend first approach, be sure to have at least some mock code to provide you with live responses from the server. It get's really messy, really fast not having data.

At the end of the day is really up to you, what you feel right doing. If you're in a team, you have to decide with the approach that is more comfortable to everyone. On a team, some devs will work only on the UI and other only on the API blind code. But there's no real right answer to that one mate

1 like
devchops's avatar

Thanks for your detailed response.

I prefer to build them in parallel. That way you can see the app growing and take shape instead of writing a shedload of code without seeing it in real action.

In previous projects, I have also taken the same approach as yours, for mostly the same reasoning (Using angular, instead of vue). Im the only developer at the moment, so not in a team environment. So far, I've planned out the "modules" that the app will have (contacts, income, expenses etc) and also created the DB schema.

I appreciate the the reply, will probably build out both frontend and backend simultaneously to keep the data flow continuous from the DB, right to the frontend UI.

devchops's avatar

Thanks for the link ZetecVan - looks like a good starting point for a SPA app.

My original post was to find out which aspect of development most people tackle first, frontend(JS) or Backend(API), or do both in parallel.

Please or to participate in this conversation.