Again, just like when structuring cross-domain app directories, the following is our holistic view for Nuxt and our PHP API:
// Nuxt app
front-end
├── package.json
├── nuxt.config.js
└── pages
├── index.vue
└── ...
// PHP API
backend
├── composer.json
├── vendor
│ └── ...
├── ...
└── ...
Individually, the directory structure for Nuxt remains the same. We only have to make a slight change to the API directory's structure, as follows:
// PHP API
backend
├── composer.json
├── middlewares.php
├── routes.php
├── vendor
│ └── ...
├── public
│ └── index.php
├── static
...