Vue Application Structure

Vue Application Structure

Guides an AI agent to structure Vue 3 applications with the Composition API, composables, Pinia stores, organised components and TypeScript.

Skill files7 files

references/

templates/

SKILL.md90 lines
1
---
2
name: vue-application-structure
3
description: >
4
Structure Vue 3 applications using Composition API, component organization,
5
and TypeScript. Use when building scalable Vue applications with proper
6
separation of concerns.
7
---
8
9
# Vue Application Structure
10
11
## Table of Contents
12
13
- [Overview](#overview)
14
- [When to Use](#when-to-use)
15
- [Quick Start](#quick-start)
16
- [Reference Guides](#reference-guides)
17
- [Best Practices](#best-practices)
18
19
## Overview
20
21
Build well-organized Vue 3 applications using Composition API, proper file organization, and TypeScript for type safety and maintainability.
22
23
## When to Use
24
25
- Large-scale Vue applications
26
- Component library development
27
- Reusable composable hooks
28
- Complex state management
29
- Performance optimization
30
31
## Quick Start
32
33
Minimal working example:
34
35
```typescript
36
// useCounter.ts (Composable)
37
import { ref, computed } from 'vue';
38
39
export function useCounter(initialValue = 0) {
40
const count = ref(initialValue);
41
42
const doubled = computed(() => count.value * 2);
43
const increment = () => count.value++;
44
const decrement = () => count.value--;
45
const reset = () => count.value = initialValue;
46
47
return {
48
count,
49
doubled,
50
increment,
51
decrement,
52
reset
53
};
54
}
55
56
// Counter.vue
57
<template>
58
<div class="counter">
59
<p>Count: {{ count }}</p>
60
<p>Doubled: {{ doubled }}</p>
61
// ... (see reference guides for full implementation)
62
```
63
64
## Reference Guides
65
66
Detailed implementations in the `references/` directory:
67
68
| Guide | Contents |
69
|---|---|
70
| [Vue 3 Composition API Component](references/vue-3-composition-api-component.md) | Vue 3 Composition API Component |
71
| [Async Data Fetching Composable](references/async-data-fetching-composable.md) | Async Data Fetching Composable |
72
| [Component Organization Structure](references/component-organization-structure.md) | Component Organization Structure |
73
| [Form Handling Composable](references/form-handling-composable.md) | Form Handling Composable |
74
| [Pinia Store (State Management)](references/pinia-store-state-management.md) | Pinia Store (State Management) |
75
76
## Best Practices
77
78
### ✅ DO
79
80
- Follow established patterns and conventions
81
- Write clean, maintainable code
82
- Add appropriate documentation
83
- Test thoroughly before deploying
84
85
### ❌ DON'T
86
87
- Skip testing or validation
88
- Ignore error handling
89
- Hard-code configuration values
90

© AJ Geddes · MIT · source · posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 13,696 prompts

More by @OpenSourceBuffGuy

See all
Nine panel morning routine photo dump carousel prompt image

Nine panel morning routine photo dump carousel

Makes a 3x3 Instagram-style collage of one woman's messy, candid morning routine, panel by panel, with a negative prompt to avoid glamour and plastic skin.

image-prompt, nano-banana, negative-prompt, character-consistency, collage, multi-panel, social-media-graphic, candid, photorealistic, smartphone-photo, natural-light, soft-lighting, woman, muted-colors, selfie, square-format, instagram, for-content-creators, text-rendering, long-form, beauty, cozy, portrait

Three frame underwater movie poster of sinking man prompt image

Three frame underwater movie poster of sinking man

Draws a cinematic three-frame underwater movie poster of a man sinking, moving from close-up to wide shot with light beams, bubbles and a short title.

image-prompt, nano-banana, poster, ocean, cinematic, multi-panel, close-up, medium-shot, wide-shot, dramatic-lighting, photorealistic, moody, bokeh, text-rendering, vertical-format, man, portrait, blue-hour, soft-lighting, muted-colors, for-filmmakers, for-designers, short-film

A summer evening in Seoul, shot like a home video prompt image

A summer evening in Seoul, shot like a home video

Generates a 30-second home-video style clip of a young woman on a summer evening in a Seoul neighborhood, shot like early-2000s camcorder footage with small accidents and natural sound only.

video-prompt, home-video, vlog, handheld, film-grain, candid, korea, multi-shot, ugc-video, lip-sync, guardrails, seedance, long-form, natural-light, vintage, muted-colors, cityscape, for-content-creators, sound-effects, structured-output, summer, timed-beats

Reviews

Loading reviews…

Discussion

Loading comments…