--- name: vue-application-structure description: > Structure Vue 3 applications using Composition API, component organization, and TypeScript. Use when building scalable Vue applications with proper separation of concerns. --- # Vue Application Structure ## Table of Contents - [Overview](#overview) - [When to Use](#when-to-use) - [Quick Start](#quick-start) - [Reference Guides](#reference-guides) - [Best Practices](#best-practices) ## Overview Build well-organized Vue 3 applications using Composition API, proper file organization, and TypeScript for type safety and maintainability. ## When to Use - Large-scale Vue applications - Component library development - Reusable composable hooks - Complex state management - Performance optimization ## Quick Start Minimal working example: ```typescript // useCounter.ts (Composable) import { ref, computed } from 'vue'; export function useCounter(initialValue = 0) { const count = ref(initialValue); const doubled = computed(() => count.value * 2); const increment = () => count.value++; const decrement = () => count.value--; const reset = () => count.value = initialValue; return { count, doubled, increment, decrement, reset }; } // Counter.vue