
Directory Structure and Nginx Config for Integrating SPA with Laravel
This article was originally published on bmf-tech.com . Overview This is a brief note on modifying the directory structure of Laravel and the Nginx config file when implementing a SPA for the admin panel of an application built with Laravel. Since it was my first attempt, I decided to document it. Laravel Directory Structure I divided the directory into two main parts: backend-app for the backend and frontend-app for the frontend. The backend-app handles user-facing screens, APIs, and backend processing, while the frontend is responsible for the SPA admin panel. Although the user-facing screens might also fall under frontend-app , I will address that later. It might be better to move away from a full-stack framework if we are going to separate things like this... For now, I structured it in a way that makes it easier to manage the frontend and backend separately. This structure is based on common setups I found while searching for "Laravel SPA" or "Laravel React" on GitHub. . ├── backe
Continue reading on Dev.to React
Opens in a new tab


