Add detailed landing page development plan in docs/frontend_landing_plan.md: - Complete landing page structure (Hero, Problem/Solution, Features, Demo, CTA) - Design guidelines from downloaded skills (typography, color, motion, composition) - Security considerations (XSS prevention, input sanitization, CSP) - Performance targets (LCP <2.5s, bundle <150KB, Lighthouse >90) - Responsiveness and accessibility requirements (WCAG 2.1 AA) - Success KPIs and monitoring setup - 3-week development timeline with daily tasks - Definition of Done checklist Download 10+ frontend/UI/UX skills via universal-skills-manager: - frontend-ui-ux: UI/UX design without mockups - frontend-design-guidelines: Production-grade interface guidelines - frontend-developer: React best practices (40+ rules) - frontend-engineer: Next.js 14 App Router patterns - ui-ux-master: Comprehensive design systems and accessibility - ui-ux-systems-designer: Information architecture and interaction - ui-ux-design-user-experience: Platform-specific guidelines - Plus additional reference materials and validation scripts Configure universal-skills MCP with SkillsMP API key for curated skill access. Safety first: All skills validated before installation, no project code modified. Refs: Universal Skills Manager (github:jacob-bd/universal-skills-manager) Next: Begin Sprint 3 landing page development
56 lines
1.4 KiB
Markdown
56 lines
1.4 KiB
Markdown
# Vue & Nuxt 3 Architecture
|
|
|
|
**Status**: Definitive Guide
|
|
**Stack**: Vue 3 (Composition API), Nuxt 3
|
|
|
|
## 🏗 Architecture: Composition & Modules
|
|
|
|
### 1. Composition API Only
|
|
|
|
- **Ban**: Options API (`data`, `methods`).
|
|
- **Enforce**: `<script setup lang="ts">`.
|
|
- **Why**: Better TypeScript support, logic reuse via composables.
|
|
|
|
### 2. Nuxt Directory Structure
|
|
|
|
```
|
|
server/ # API routes (Nitro)
|
|
components/ # Auto-imported components
|
|
composables/ # Auto-imported logic
|
|
pages/ # File-based routing
|
|
layouts/ # Layouts
|
|
stores/ # Pinia definitions
|
|
```
|
|
|
|
## ⚡ Performance Patterns
|
|
|
|
### 1. Data Fetching
|
|
|
|
- **SSR-Friendly**: Use `useFetch` or `useAsyncData`.
|
|
- **Keying**: Always provide a unique key if parameters change.
|
|
- **Lazy**: `lazy: true` to prevent blocking navigation.
|
|
|
|
```ts
|
|
// ✅ GOOD
|
|
const { data, pending } = await useFetch("/api/posts", {
|
|
lazy: true,
|
|
server: false, // If client-only execution is needed
|
|
});
|
|
```
|
|
|
|
### 2. State Management (Pinia)
|
|
|
|
- **Setup Stores**: Use the function syntax (like `setup()`), not the object syntax.
|
|
- **Dedupe**: Don't put everything in store. Use `useState` for simple shared state.
|
|
|
|
### 3. Compute Stability
|
|
|
|
- Use `computed()` for derived state.
|
|
- Use `shallowRef()` for large objects that don't need deep reactivity.
|
|
|
|
## 🧪 Testing
|
|
|
|
- **Unit**: Vitest.
|
|
- **Component**: Vue Test Utils.
|
|
- **E2E**: Nuxt Test Utils (Playwright wrapper).
|