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

faust's avatar
Level 1

Optimal project folder structure for Laravel + Vue SPA

Hello

I recently got into Vue 3 as my first frontend framework and going through a few courses and tutorials, I noticed various ways different people structure their projects. Some create two folders (frontend - backend) and initialize Laravel/Vue separately, some create a Laravel project and inside it create a Vue folder and initialize it there, some simply create a folder inside Laravel's resources folder and put all Vue components there.

I know this may sound like a moot point but what would be the best way to structure my project and what good practices should I follow in terms of organizing/naming my project files?

Not sure if this is important but I'm planning to build a medium-sized e-commerce website, and I'm planning to use Vue's router

0 likes
2 replies
martinbean's avatar

@faust If I was building an e-commerce site, then moving the rendering completely to the client by building a SPA is not the way to go.

Online stores rely on fast-loading pages and strong SEO, both of which a traditional, server-rendered app is more suitable for than a SPA.

faust's avatar
Level 1

@martinbean This project isn't meant for a client, it's just something i want to build to showcase my knowledge and to put on my resume, but the point you've made is really helpful and will I definitely consider in the future when building websites.

In your opinion, what would be a good idea for a project to build as a SPA? Again, just to showcase one's knowledge of Vue and not a production-ready application.

Please or to participate in this conversation.