Skip to main content
InterviewHubPRO
Section Overview
Q2

Question 2 of 50

Part 1: Nuxt 3 Fundamentals (Junior / Entry-Level)

4%
Nuxt & Universal SSR (50 Qs)•Part 1: Nuxt 3 Fundamentals (Junior / Entry-Level)

Explain the Nuxt 3 standard directory structure.

mid LevelVue & Nuxt

In Simple Words: Nuxt uses convention-over-configuration directories where file placement automatically generates behavior without boilerplate configuration files.

Key Directories:

  • pages/: File-based routing. Creating pages/about.vue automatically creates the /about route. (If this folder exists, Nuxt imports Vue Router automatically).
  • components/: Vue components placed here are automatically imported anywhere in the project without import statements.
  • composables/: Custom composition functions (e.g. useAuth.ts) placed here are auto-imported globally.
  • layouts/: Reusable page layouts (default.vue, admin.vue) wrapping <slot />.
  • server/: Backend server code powered by Nitro. Contains server/api/, server/routes/, and server/middleware/.
  • public/: Static files served directly at root URL (e.g. public/favicon.ico -> /favicon.ico).
  • assets/: Raw assets (CSS, SCSS, images, fonts) processed and hashed by Vite.
  • app.vue: The top-level component that runs for every page view.
  • nuxt.config.ts: Central configuration file for modules, runtime config, and nitro presets.