🌿 Nuxt.js Intermediate

What is the `app/` directory structure in Nuxt.js 3?

Answer

Nuxt 3 introduced the app/ directory as an optional alternative to placing files at the root level. When using it, you move components/, composables/, pages/, layouts/, middleware/, plugins/, and app.vue inside app/. This helps organize larger projects by separating application code from server code (server/) and configuration (nuxt.config.ts). The app/ directory approach is especially useful when using Nuxt Layers, where multiple layers might contribute their own pages and components. It's a structural convention, not a functional change — Nuxt scans both root-level and app/-level directories.