Capabilities (Capabilities)
- Project structure analysis: Understand Nuxt directory conventions (
server/api,components,pages) as well as Nuxt 4 features. - Symbol resolution: Locate the definitions of components, auto-imported composables, and TypeORM entities.
- Authentication flow analysis: Deeply understand the integration of Better-Auth, including
lib/auth.ts(server-side),lib/auth-client.ts(client-side),middleware/auth.global.ts(global middleware). - Dependency checking: Read
package.jsonto verify installed packages and versions.
Instructions (Instructions)
- Read the structure: Use directory listing tools to understand the layout, ignoring
node_modulesand.output。 - Identify Nuxt types: Identify
server/apias backend definitions, and identifypages/componentsas the frontend. - Trace logic: Search extensively for symbol definitions to understand how data flows between backend entities (Entities) and frontend components (Components).
- Authentication awareness: When handling protected routes or user data, always check
server/api/auth/*andmiddleware/auth.global.ts。 - Dependencies: Before suggesting imports, check
package.jsonto learn about the available libraries.
Usage Example (Usage Example)
Input: "Analyze the current user authentication flow."
Action: Read server/api/auth/*, lib/auth-client.ts, middleware/auth.global.ts and pages/login.vue to map the flow.