Section 1: Lab: Structuring Large Nuxt 4 Projects
- The app, server and shared directories and what changed from Nuxt 3
- Split the system with Nuxt layers and extends
- Strict TypeScript, nuxt typecheck and @nuxt/eslint
- Lab: set up an online store project organised by feature
Section 2: Lab: Custom Layouts, Composables and UI
- Custom layouts and layouts that switch by user role
- Extract logic into clearly typed composables
- Nuxt UI with Tailwind CSS and a brand theme
- Fonts and icons with Nuxt Fonts and Nuxt Icon
- Lab: store and admin pages with separate layouts
Section 3: Handling Client and Server Errors
- A global error page with error.vue, useError and clearError
- Throw errors with createError, including status, statusText and data
- Errors in part of a page with NuxtErrorBoundary
- Log server errors with Nitro plugins and hooks
- Lab: a 404 page and recoverable error cards
Section 4: Utilities and Performance
- Optimise images with NuxtImg and modern file formats
- useState and composables from VueUse
- Lazy components and lazy hydration such as hydrate-on-visible
- Force client-side rendering for part of a page with ClientOnly
- Lab: a faster home page measured with Lighthouse
Section 5: Lab: Multilingual Sites with Nuxt i18n
- Install @nuxtjs/i18n with translation files in i18n/locales
- URL strategies such as prefix_except_default and a language switcher
- Named formatting, pluralisation, and number and date formats
- useLocalePath and per-language SEO with hreflang
- Lab: an online store in Thai and English