---
description: Nuxt + Vue conventions
globs: ["**/*.vue", "composables/**/*.ts", "server/**/*.ts"]
---

# Nuxt 3 / Vue 3

- Always `<script setup lang="ts">` with the Composition API. No Options API in new code.
- Type props with `defineProps<{...}>()` and emits with `defineEmits<{...}>()`.
- Data fetching with `useFetch`/`useAsyncData` (SSR-safe); never fetch in `onMounted` for initial page data.
- Rely on Nuxt auto-imports for components, composables and Vue APIs; don't add redundant imports.
- Shared logic in `composables/useX.ts`; global state in Pinia stores under `stores/`.
- Server endpoints in `server/api/*.ts` with `defineEventHandler`; validate input with zod (`readValidatedBody`).
- SEO per page with `useSeoMeta`.
- Run `npx nuxi typecheck` and `npm run lint` before finishing.
