claudeship 0.2.23 → 0.2.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/apps/server/dist/chat/chat.module.js +8 -1
  2. package/apps/server/dist/chat/chat.module.js.map +1 -1
  3. package/apps/server/dist/chat/chat.service.d.ts +5 -1
  4. package/apps/server/dist/chat/chat.service.js +35 -4
  5. package/apps/server/dist/chat/chat.service.js.map +1 -1
  6. package/apps/server/dist/chat/framework-detector.service.d.ts +17 -0
  7. package/apps/server/dist/chat/framework-detector.service.js +193 -0
  8. package/apps/server/dist/chat/framework-detector.service.js.map +1 -0
  9. package/apps/server/dist/chat/prompts/backend/django.d.ts +1 -0
  10. package/apps/server/dist/chat/prompts/backend/django.js +207 -0
  11. package/apps/server/dist/chat/prompts/backend/django.js.map +1 -0
  12. package/apps/server/dist/chat/prompts/backend/express.d.ts +1 -0
  13. package/apps/server/dist/chat/prompts/backend/express.js +260 -0
  14. package/apps/server/dist/chat/prompts/backend/express.js.map +1 -0
  15. package/apps/server/dist/chat/prompts/backend/fastapi.d.ts +1 -0
  16. package/apps/server/dist/chat/prompts/backend/fastapi.js +246 -0
  17. package/apps/server/dist/chat/prompts/backend/fastapi.js.map +1 -0
  18. package/apps/server/dist/chat/prompts/backend/index.d.ts +4 -0
  19. package/apps/server/dist/chat/prompts/backend/index.js +12 -0
  20. package/apps/server/dist/chat/prompts/backend/index.js.map +1 -0
  21. package/apps/server/dist/chat/prompts/backend/nestjs.d.ts +1 -0
  22. package/apps/server/dist/chat/prompts/backend/nestjs.js +270 -0
  23. package/apps/server/dist/chat/prompts/backend/nestjs.js.map +1 -0
  24. package/apps/server/dist/chat/prompts/frontend/expo.d.ts +1 -0
  25. package/apps/server/dist/chat/prompts/frontend/expo.js +208 -0
  26. package/apps/server/dist/chat/prompts/frontend/expo.js.map +1 -0
  27. package/apps/server/dist/chat/prompts/frontend/flutter.d.ts +1 -0
  28. package/apps/server/dist/chat/prompts/frontend/flutter.js +271 -0
  29. package/apps/server/dist/chat/prompts/frontend/flutter.js.map +1 -0
  30. package/apps/server/dist/chat/prompts/frontend/index.d.ts +4 -0
  31. package/apps/server/dist/chat/prompts/frontend/index.js +12 -0
  32. package/apps/server/dist/chat/prompts/frontend/index.js.map +1 -0
  33. package/apps/server/dist/chat/prompts/frontend/nextjs.d.ts +1 -0
  34. package/apps/server/dist/chat/prompts/frontend/nextjs.js +195 -0
  35. package/apps/server/dist/chat/prompts/frontend/nextjs.js.map +1 -0
  36. package/apps/server/dist/chat/prompts/frontend/react-native.d.ts +1 -0
  37. package/apps/server/dist/chat/prompts/frontend/react-native.js +224 -0
  38. package/apps/server/dist/chat/prompts/frontend/react-native.js.map +1 -0
  39. package/apps/server/dist/chat/prompts/frontend/react-vite.d.ts +1 -0
  40. package/apps/server/dist/chat/prompts/frontend/react-vite.js +187 -0
  41. package/apps/server/dist/chat/prompts/frontend/react-vite.js.map +1 -0
  42. package/apps/server/dist/chat/prompts/frontend/svelte.d.ts +1 -0
  43. package/apps/server/dist/chat/prompts/frontend/svelte.js +255 -0
  44. package/apps/server/dist/chat/prompts/frontend/svelte.js.map +1 -0
  45. package/apps/server/dist/chat/prompts/frontend/vue.d.ts +1 -0
  46. package/apps/server/dist/chat/prompts/frontend/vue.js +267 -0
  47. package/apps/server/dist/chat/prompts/frontend/vue.js.map +1 -0
  48. package/apps/server/dist/chat/prompts/index.d.ts +4 -0
  49. package/apps/server/dist/chat/prompts/index.js +20 -1
  50. package/apps/server/dist/chat/prompts/index.js.map +1 -1
  51. package/apps/server/dist/chat/prompts/prompt-builder.service.d.ts +15 -0
  52. package/apps/server/dist/chat/prompts/prompt-builder.service.js +177 -0
  53. package/apps/server/dist/chat/prompts/prompt-builder.service.js.map +1 -0
  54. package/apps/server/dist/chat/prompts/sections/core.d.ts +9 -0
  55. package/apps/server/dist/chat/prompts/sections/core.js +149 -0
  56. package/apps/server/dist/chat/prompts/sections/core.js.map +1 -0
  57. package/apps/server/dist/project/project.controller.d.ts +6 -0
  58. package/apps/server/dist/project/project.service.d.ts +6 -0
  59. package/apps/server/dist/tsconfig.tsbuildinfo +1 -1
  60. package/apps/server/package.json +1 -1
  61. package/apps/server/prisma/dev.db +0 -0
  62. package/apps/server/prisma/migrations/20260127071040_add_frontend_framework/migration.sql +24 -0
  63. package/apps/server/prisma/migrations/20260127071520_add_app_type_and_mobile/migration.sql +25 -0
  64. package/apps/server/prisma/schema.prisma +33 -5
  65. package/apps/web/.next/BUILD_ID +1 -1
  66. package/apps/web/.next/app-build-manifest.json +10 -8
  67. package/apps/web/.next/app-path-routes-manifest.json +2 -2
  68. package/apps/web/.next/build-manifest.json +2 -2
  69. package/apps/web/.next/cache/.previewinfo +1 -1
  70. package/apps/web/.next/cache/.rscinfo +1 -1
  71. package/apps/web/.next/cache/.tsbuildinfo +1 -1
  72. package/apps/web/.next/cache/config.json +3 -3
  73. package/apps/web/.next/cache/eslint/.cache_j3uhuz +1 -1
  74. package/apps/web/.next/cache/webpack/client-production/0.pack +0 -0
  75. package/apps/web/.next/cache/webpack/client-production/index.pack +0 -0
  76. package/apps/web/.next/cache/webpack/edge-server-production/index.pack +0 -0
  77. package/apps/web/.next/cache/webpack/server-production/0.pack +0 -0
  78. package/apps/web/.next/cache/webpack/server-production/index.pack +0 -0
  79. package/apps/web/.next/prerender-manifest.json +3 -3
  80. package/apps/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  81. package/apps/web/.next/server/app/_not-found.html +1 -1
  82. package/apps/web/.next/server/app/_not-found.rsc +2 -2
  83. package/apps/web/.next/server/app/index.html +1 -1
  84. package/apps/web/.next/server/app/index.rsc +3 -3
  85. package/apps/web/.next/server/app/page.js +2 -2
  86. package/apps/web/.next/server/app/page_client-reference-manifest.js +1 -1
  87. package/apps/web/.next/server/app/project/[id]/page.js +2 -2
  88. package/apps/web/.next/server/app/project/[id]/page_client-reference-manifest.js +1 -1
  89. package/apps/web/.next/server/app/settings/page.js +1 -1
  90. package/apps/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  91. package/apps/web/.next/server/app/settings.html +1 -1
  92. package/apps/web/.next/server/app/settings.rsc +2 -2
  93. package/apps/web/.next/server/app-paths-manifest.json +2 -2
  94. package/apps/web/.next/server/pages/404.html +1 -1
  95. package/apps/web/.next/server/pages/500.html +1 -1
  96. package/apps/web/.next/server/server-reference-manifest.json +1 -1
  97. package/apps/web/.next/static/chunks/18-22b1cf4231121555.js +1 -0
  98. package/apps/web/.next/static/chunks/700-75e1212e819e279c.js +1 -0
  99. package/apps/web/.next/static/chunks/app/page-6ea560755549086e.js +1 -0
  100. package/apps/web/.next/static/chunks/app/project/[id]/page-3e4777b355c4aec9.js +1 -0
  101. package/apps/web/.next/static/css/45ddb08a7b4470d5.css +3 -0
  102. package/apps/web/.next/trace +18 -18
  103. package/apps/web/package.json +1 -1
  104. package/apps/web/src/app/page.tsx +2 -5
  105. package/apps/web/src/components/project/CreateProjectModal.tsx +175 -80
  106. package/apps/web/src/components/project/ProjectCard.tsx +122 -31
  107. package/apps/web/src/stores/useProjectStore.ts +2 -1
  108. package/package.json +1 -1
  109. package/packages/shared/src/index.ts +1 -0
  110. package/packages/shared/src/types/project.ts +18 -3
  111. package/packages/shared/src/types/tech-stack.ts +74 -0
  112. package/apps/web/.next/static/chunks/700-a927807facd2c50d.js +0 -1
  113. package/apps/web/.next/static/chunks/app/page-93b78578e7896d90.js +0 -1
  114. package/apps/web/.next/static/chunks/app/project/[id]/page-e9304c25ba897608.js +0 -1
  115. package/apps/web/.next/static/css/70f2a13cf3d254d8.css +0 -3
  116. /package/apps/web/.next/static/{c-H9phuqk4ohtFNK0geg2 → IMWKpuHss3gLOeJ7K93sg}/_buildManifest.js +0 -0
  117. /package/apps/web/.next/static/{c-H9phuqk4ohtFNK0geg2 → IMWKpuHss3gLOeJ7K93sg}/_ssgManifest.js +0 -0
@@ -0,0 +1,255 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SVELTE_PROMPT = void 0;
4
+ exports.SVELTE_PROMPT = `## Frontend: SvelteKit + Tailwind CSS
5
+
6
+ You are building a SvelteKit application with Tailwind CSS.
7
+
8
+ ### Technology Stack (Frontend)
9
+
10
+ | Category | Technology | Notes |
11
+ |----------|------------|-------|
12
+ | Framework | SvelteKit | File-based routing |
13
+ | Language | TypeScript | Strict mode |
14
+ | Styling | Tailwind CSS | Use design tokens |
15
+ | State | Svelte stores | Built-in reactivity |
16
+ | Forms | Superforms + Zod | For validation |
17
+ | Icons | Lucide Svelte | Consistent iconography |
18
+
19
+ ### Project Initialization
20
+
21
+ \`\`\`bash
22
+ # Create SvelteKit project
23
+ npx sv create . --template minimal --types ts
24
+
25
+ # Install dependencies
26
+ npm install lucide-svelte clsx tailwind-merge
27
+ npm install sveltekit-superforms zod
28
+
29
+ # Setup Tailwind CSS
30
+ npx svelte-add@latest tailwindcss
31
+ \`\`\`
32
+
33
+ ### Project Structure
34
+
35
+ \`\`\`
36
+ src/
37
+ ├── routes/
38
+ │ ├── +layout.svelte # Root layout
39
+ │ ├── +page.svelte # Home page
40
+ │ ├── +error.svelte # Error page
41
+ │ ├── about/
42
+ │ │ └── +page.svelte
43
+ │ └── api/ # API routes
44
+ │ └── users/
45
+ │ └── +server.ts
46
+ ├── lib/
47
+ │ ├── components/ # Reusable components
48
+ │ │ └── ui/
49
+ │ ├── stores/ # Svelte stores
50
+ │ └── utils.ts # Utilities
51
+ ├── app.html # HTML template
52
+ ├── app.css # Global styles
53
+ └── app.d.ts # Type declarations
54
+ \`\`\`
55
+
56
+ ### Component Pattern
57
+
58
+ \`\`\`svelte
59
+ <!-- src/lib/components/UserCard.svelte -->
60
+ <script lang="ts">
61
+ import type { User } from '$lib/types';
62
+
63
+ export let user: User;
64
+ export let showEmail = true;
65
+
66
+ $: initials = user.name
67
+ .split(' ')
68
+ .map((n) => n[0])
69
+ .join('')
70
+ .toUpperCase();
71
+
72
+ import { createEventDispatcher } from 'svelte';
73
+ const dispatch = createEventDispatcher<{ select: User }>();
74
+
75
+ const handleClick = () => {
76
+ dispatch('select', user);
77
+ };
78
+ </script>
79
+
80
+ <div
81
+ class="p-4 border rounded-lg hover:border-primary cursor-pointer"
82
+ on:click={handleClick}
83
+ on:keypress={handleClick}
84
+ role="button"
85
+ tabindex="0"
86
+ >
87
+ <div class="flex items-center gap-3">
88
+ <div class="w-10 h-10 rounded-full bg-primary/10 flex items-center justify-center">
89
+ {initials}
90
+ </div>
91
+ <div>
92
+ <h3 class="font-medium">{user.name}</h3>
93
+ {#if showEmail}
94
+ <p class="text-sm text-muted-foreground">{user.email}</p>
95
+ {/if}
96
+ </div>
97
+ </div>
98
+ </div>
99
+ \`\`\`
100
+
101
+ ### Svelte Store
102
+
103
+ \`\`\`typescript
104
+ // src/lib/stores/userStore.ts
105
+ import { writable, derived } from 'svelte/store';
106
+ import type { User } from '$lib/types';
107
+
108
+ function createUserStore() {
109
+ const users = writable<User[]>([]);
110
+ const isLoading = writable(false);
111
+ const error = writable<string | null>(null);
112
+
113
+ const userCount = derived(users, ($users) => $users.length);
114
+
115
+ async function fetchUsers() {
116
+ isLoading.set(true);
117
+ error.set(null);
118
+ try {
119
+ const res = await fetch('/api/users');
120
+ if (!res.ok) throw new Error('Failed to fetch');
121
+ users.set(await res.json());
122
+ } catch (e) {
123
+ error.set(e instanceof Error ? e.message : 'Unknown error');
124
+ } finally {
125
+ isLoading.set(false);
126
+ }
127
+ }
128
+
129
+ return {
130
+ users,
131
+ isLoading,
132
+ error,
133
+ userCount,
134
+ fetchUsers,
135
+ };
136
+ }
137
+
138
+ export const userStore = createUserStore();
139
+ \`\`\`
140
+
141
+ ### Page Load Data
142
+
143
+ \`\`\`typescript
144
+ // src/routes/users/+page.server.ts
145
+ import type { PageServerLoad } from './$types';
146
+ import { db } from '$lib/server/db';
147
+
148
+ export const load: PageServerLoad = async () => {
149
+ const users = await db.user.findMany();
150
+ return { users };
151
+ };
152
+ \`\`\`
153
+
154
+ \`\`\`svelte
155
+ <!-- src/routes/users/+page.svelte -->
156
+ <script lang="ts">
157
+ import type { PageData } from './$types';
158
+ import UserCard from '$lib/components/UserCard.svelte';
159
+
160
+ export let data: PageData;
161
+ </script>
162
+
163
+ <div class="container mx-auto py-8">
164
+ <h1 class="text-2xl font-bold mb-6">Users</h1>
165
+ <div class="grid gap-4 md:grid-cols-2 lg:grid-cols-3">
166
+ {#each data.users as user (user.id)}
167
+ <UserCard {user} />
168
+ {/each}
169
+ </div>
170
+ </div>
171
+ \`\`\`
172
+
173
+ ### API Routes
174
+
175
+ \`\`\`typescript
176
+ // src/routes/api/users/+server.ts
177
+ import { json } from '@sveltejs/kit';
178
+ import type { RequestHandler } from './$types';
179
+ import { db } from '$lib/server/db';
180
+
181
+ export const GET: RequestHandler = async () => {
182
+ const users = await db.user.findMany();
183
+ return json(users);
184
+ };
185
+
186
+ export const POST: RequestHandler = async ({ request }) => {
187
+ const body = await request.json();
188
+ const user = await db.user.create({ data: body });
189
+ return json(user, { status: 201 });
190
+ };
191
+ \`\`\`
192
+
193
+ ### Form Actions
194
+
195
+ \`\`\`typescript
196
+ // src/routes/contact/+page.server.ts
197
+ import type { Actions } from './$types';
198
+ import { fail } from '@sveltejs/kit';
199
+
200
+ export const actions: Actions = {
201
+ default: async ({ request }) => {
202
+ const formData = await request.formData();
203
+ const email = formData.get('email') as string;
204
+ const message = formData.get('message') as string;
205
+
206
+ if (!email || !message) {
207
+ return fail(400, { error: 'All fields are required' });
208
+ }
209
+
210
+ // Process form...
211
+
212
+ return { success: true };
213
+ },
214
+ };
215
+ \`\`\`
216
+
217
+ \`\`\`svelte
218
+ <!-- src/routes/contact/+page.svelte -->
219
+ <script lang="ts">
220
+ import type { ActionData } from './$types';
221
+ import { enhance } from '$app/forms';
222
+
223
+ export let form: ActionData;
224
+ </script>
225
+
226
+ <form method="POST" use:enhance>
227
+ <input name="email" type="email" required />
228
+ <textarea name="message" required />
229
+ <button type="submit">Send</button>
230
+
231
+ {#if form?.error}
232
+ <p class="text-red-500">{form.error}</p>
233
+ {/if}
234
+ {#if form?.success}
235
+ <p class="text-green-500">Message sent!</p>
236
+ {/if}
237
+ </form>
238
+ \`\`\`
239
+
240
+ ### Svelte Best Practices
241
+
242
+ - **Use \`$:\` for reactive statements** - Svelte's reactivity is automatic
243
+ - **Prefer stores for shared state** - Use writable/readable/derived appropriately
244
+ - **Use \`{#each}\` with keys** - Always provide key for lists
245
+ - **Server load functions** - Fetch data on server when possible
246
+ - **Form actions** - Use SvelteKit form actions for mutations
247
+ - **\`use:enhance\`** - Progressive enhancement for forms
248
+
249
+ ### What NOT to Do (Svelte specific)
250
+
251
+ - Never use React/Vue patterns - Svelte has its own idioms
252
+ - Never forget to export props with \`export let\`
253
+ - Never mutate store values directly - use \`.set()\` or \`.update()\`
254
+ - Never skip \`$:\` for reactive statements`;
255
+ //# sourceMappingURL=svelte.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"svelte.js","sourceRoot":"","sources":["../../../../src/chat/prompts/frontend/svelte.ts"],"names":[],"mappings":";;;AAMa,QAAA,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4CA0Pe,CAAC"}
@@ -0,0 +1 @@
1
+ export declare const VUE_PROMPT = "## Frontend: Vue 3 + Vite + Tailwind CSS\n\nYou are building a Vue 3 application using Vite and the Composition API.\n\n### Technology Stack (Frontend)\n\n| Category | Technology | Notes |\n|----------|------------|-------|\n| Build Tool | Vite | Fast HMR and build |\n| Framework | Vue 3 | Composition API with `<script setup>` |\n| Language | TypeScript | Strict mode |\n| Styling | Tailwind CSS | Use design tokens |\n| State | Pinia | Official Vue store |\n| Forms | VeeValidate + Zod | For validation |\n| Icons | Lucide Vue Next | Consistent iconography |\n| Routing | Vue Router | Client-side routing |\n\n### Project Initialization\n\n```bash\n# Create Vite Vue project\nnpm create vite@latest . -- --template vue-ts\n\n# Install dependencies\nnpm install vue-router pinia @vueuse/core\nnpm install vee-validate @vee-validate/zod zod\nnpm install lucide-vue-next clsx tailwind-merge\n\n# Setup Tailwind CSS\nnpm install -D tailwindcss postcss autoprefixer\nnpx tailwindcss init -p\n```\n\n### Project Structure\n\n```\nsrc/\n\u251C\u2500\u2500 components/\n\u2502 \u251C\u2500\u2500 ui/ # Reusable UI components\n\u2502 \u2514\u2500\u2500 [feature]/ # Feature-specific components\n\u251C\u2500\u2500 views/ # Page components\n\u251C\u2500\u2500 composables/ # Reusable composition functions\n\u251C\u2500\u2500 stores/ # Pinia stores\n\u251C\u2500\u2500 lib/\n\u2502 \u251C\u2500\u2500 utils.ts # cn() helper\n\u2502 \u2514\u2500\u2500 api.ts # API client\n\u251C\u2500\u2500 types/ # TypeScript types\n\u251C\u2500\u2500 router/\n\u2502 \u2514\u2500\u2500 index.ts # Vue Router config\n\u251C\u2500\u2500 App.vue # Root component\n\u251C\u2500\u2500 main.ts # Entry point\n\u2514\u2500\u2500 style.css # Tailwind imports\n```\n\n### Vite Configuration\n\n```typescript\n// vite.config.ts\nimport { defineConfig } from 'vite';\nimport vue from '@vitejs/plugin-vue';\nimport path from 'path';\n\nexport default defineConfig({\n plugins: [vue()],\n resolve: {\n alias: {\n '@': path.resolve(__dirname, './src'),\n },\n },\n server: {\n port: 3000,\n proxy: {\n '/api': {\n target: 'http://localhost:3001',\n changeOrigin: true,\n },\n },\n },\n});\n```\n\n### Component Pattern (script setup)\n\n```vue\n<!-- src/components/UserCard.vue -->\n<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport { User } from '@/types';\n\ninterface Props {\n user: User;\n showEmail?: boolean;\n}\n\nconst props = withDefaults(defineProps<Props>(), {\n showEmail: true,\n});\n\nconst emit = defineEmits<{\n (e: 'select', user: User): void;\n}>();\n\nconst initials = computed(() =>\n props.user.name\n .split(' ')\n .map((n) => n[0])\n .join('')\n .toUpperCase()\n);\n\nconst handleClick = () => {\n emit('select', props.user);\n};\n</script>\n\n<template>\n <div\n class=\"p-4 border rounded-lg hover:border-primary cursor-pointer\"\n @click=\"handleClick\"\n >\n <div class=\"flex items-center gap-3\">\n <div class=\"w-10 h-10 rounded-full bg-primary/10 flex items-center justify-center\">\n {{ initials }}\n </div>\n <div>\n <h3 class=\"font-medium\">{{ user.name }}</h3>\n <p v-if=\"showEmail\" class=\"text-sm text-muted-foreground\">\n {{ user.email }}\n </p>\n </div>\n </div>\n </div>\n</template>\n```\n\n### Pinia Store\n\n```typescript\n// src/stores/useUserStore.ts\nimport { defineStore } from 'pinia';\nimport { ref, computed } from 'vue';\nimport { api } from '@/lib/api';\nimport type { User } from '@/types';\n\nexport const useUserStore = defineStore('user', () => {\n const users = ref<User[]>([]);\n const isLoading = ref(false);\n const error = ref<string | null>(null);\n\n const userCount = computed(() => users.value.length);\n\n async function fetchUsers() {\n isLoading.value = true;\n error.value = null;\n try {\n users.value = await api.get<User[]>('/api/users');\n } catch (e) {\n error.value = e instanceof Error ? e.message : 'Failed to fetch users';\n } finally {\n isLoading.value = false;\n }\n }\n\n return { users, isLoading, error, userCount, fetchUsers };\n});\n```\n\n### Vue Router Setup\n\n```typescript\n// src/router/index.ts\nimport { createRouter, createWebHistory } from 'vue-router';\n\nconst router = createRouter({\n history: createWebHistory(),\n routes: [\n {\n path: '/',\n name: 'home',\n component: () => import('@/views/HomeView.vue'),\n },\n {\n path: '/users',\n name: 'users',\n component: () => import('@/views/UsersView.vue'),\n },\n ],\n});\n\nexport default router;\n```\n\n### Composable Pattern\n\n```typescript\n// src/composables/useApi.ts\nimport { ref, computed } from 'vue';\n\nexport function useApi<T>(fetchFn: () => Promise<T>) {\n const data = ref<T | null>(null);\n const isLoading = ref(false);\n const error = ref<Error | null>(null);\n\n const execute = async () => {\n isLoading.value = true;\n error.value = null;\n try {\n data.value = await fetchFn();\n } catch (e) {\n error.value = e instanceof Error ? e : new Error('Unknown error');\n } finally {\n isLoading.value = false;\n }\n };\n\n const hasError = computed(() => error.value !== null);\n\n return { data, isLoading, error, hasError, execute };\n}\n```\n\n### API Client Pattern\n\n```typescript\n// src/lib/api.ts\nconst API_URL = import.meta.env.VITE_API_URL || '/api';\n\nclass ApiClient {\n async get<T>(endpoint: string): Promise<T> {\n const res = await fetch(`${API_URL}${endpoint}`);\n if (!res.ok) throw new Error(`API Error: ${res.status}`);\n return res.json();\n }\n\n async post<T>(endpoint: string, data: unknown): Promise<T> {\n const res = await fetch(`${API_URL}${endpoint}`, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify(data),\n });\n if (!res.ok) throw new Error(`API Error: ${res.status}`);\n return res.json();\n }\n}\n\nexport const api = new ApiClient();\n```\n\n### Vue 3 Best Practices\n\n- **Always use `<script setup>`** for cleaner component code\n- **Use Composition API** - no Options API\n- **TypeScript for props**: Use `defineProps<T>()` with interfaces\n- **Computed properties**: Use `computed()` for derived state\n- **Watch wisely**: Use `watch` and `watchEffect` appropriately\n- **Lifecycle hooks**: Use `onMounted`, `onUnmounted` from vue\n\n### What NOT to Do (Vue specific)\n\n- Never use Options API - always Composition API with `<script setup>`\n- Never mutate props directly\n- Never use `this` in script setup (it's undefined)\n- Never forget to import ref, computed, etc. from 'vue'";
@@ -0,0 +1,267 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VUE_PROMPT = void 0;
4
+ exports.VUE_PROMPT = `## Frontend: Vue 3 + Vite + Tailwind CSS
5
+
6
+ You are building a Vue 3 application using Vite and the Composition API.
7
+
8
+ ### Technology Stack (Frontend)
9
+
10
+ | Category | Technology | Notes |
11
+ |----------|------------|-------|
12
+ | Build Tool | Vite | Fast HMR and build |
13
+ | Framework | Vue 3 | Composition API with \`<script setup>\` |
14
+ | Language | TypeScript | Strict mode |
15
+ | Styling | Tailwind CSS | Use design tokens |
16
+ | State | Pinia | Official Vue store |
17
+ | Forms | VeeValidate + Zod | For validation |
18
+ | Icons | Lucide Vue Next | Consistent iconography |
19
+ | Routing | Vue Router | Client-side routing |
20
+
21
+ ### Project Initialization
22
+
23
+ \`\`\`bash
24
+ # Create Vite Vue project
25
+ npm create vite@latest . -- --template vue-ts
26
+
27
+ # Install dependencies
28
+ npm install vue-router pinia @vueuse/core
29
+ npm install vee-validate @vee-validate/zod zod
30
+ npm install lucide-vue-next clsx tailwind-merge
31
+
32
+ # Setup Tailwind CSS
33
+ npm install -D tailwindcss postcss autoprefixer
34
+ npx tailwindcss init -p
35
+ \`\`\`
36
+
37
+ ### Project Structure
38
+
39
+ \`\`\`
40
+ src/
41
+ ├── components/
42
+ │ ├── ui/ # Reusable UI components
43
+ │ └── [feature]/ # Feature-specific components
44
+ ├── views/ # Page components
45
+ ├── composables/ # Reusable composition functions
46
+ ├── stores/ # Pinia stores
47
+ ├── lib/
48
+ │ ├── utils.ts # cn() helper
49
+ │ └── api.ts # API client
50
+ ├── types/ # TypeScript types
51
+ ├── router/
52
+ │ └── index.ts # Vue Router config
53
+ ├── App.vue # Root component
54
+ ├── main.ts # Entry point
55
+ └── style.css # Tailwind imports
56
+ \`\`\`
57
+
58
+ ### Vite Configuration
59
+
60
+ \`\`\`typescript
61
+ // vite.config.ts
62
+ import { defineConfig } from 'vite';
63
+ import vue from '@vitejs/plugin-vue';
64
+ import path from 'path';
65
+
66
+ export default defineConfig({
67
+ plugins: [vue()],
68
+ resolve: {
69
+ alias: {
70
+ '@': path.resolve(__dirname, './src'),
71
+ },
72
+ },
73
+ server: {
74
+ port: 3000,
75
+ proxy: {
76
+ '/api': {
77
+ target: 'http://localhost:3001',
78
+ changeOrigin: true,
79
+ },
80
+ },
81
+ },
82
+ });
83
+ \`\`\`
84
+
85
+ ### Component Pattern (script setup)
86
+
87
+ \`\`\`vue
88
+ <!-- src/components/UserCard.vue -->
89
+ <script setup lang="ts">
90
+ import { computed } from 'vue';
91
+ import { User } from '@/types';
92
+
93
+ interface Props {
94
+ user: User;
95
+ showEmail?: boolean;
96
+ }
97
+
98
+ const props = withDefaults(defineProps<Props>(), {
99
+ showEmail: true,
100
+ });
101
+
102
+ const emit = defineEmits<{
103
+ (e: 'select', user: User): void;
104
+ }>();
105
+
106
+ const initials = computed(() =>
107
+ props.user.name
108
+ .split(' ')
109
+ .map((n) => n[0])
110
+ .join('')
111
+ .toUpperCase()
112
+ );
113
+
114
+ const handleClick = () => {
115
+ emit('select', props.user);
116
+ };
117
+ </script>
118
+
119
+ <template>
120
+ <div
121
+ class="p-4 border rounded-lg hover:border-primary cursor-pointer"
122
+ @click="handleClick"
123
+ >
124
+ <div class="flex items-center gap-3">
125
+ <div class="w-10 h-10 rounded-full bg-primary/10 flex items-center justify-center">
126
+ {{ initials }}
127
+ </div>
128
+ <div>
129
+ <h3 class="font-medium">{{ user.name }}</h3>
130
+ <p v-if="showEmail" class="text-sm text-muted-foreground">
131
+ {{ user.email }}
132
+ </p>
133
+ </div>
134
+ </div>
135
+ </div>
136
+ </template>
137
+ \`\`\`
138
+
139
+ ### Pinia Store
140
+
141
+ \`\`\`typescript
142
+ // src/stores/useUserStore.ts
143
+ import { defineStore } from 'pinia';
144
+ import { ref, computed } from 'vue';
145
+ import { api } from '@/lib/api';
146
+ import type { User } from '@/types';
147
+
148
+ export const useUserStore = defineStore('user', () => {
149
+ const users = ref<User[]>([]);
150
+ const isLoading = ref(false);
151
+ const error = ref<string | null>(null);
152
+
153
+ const userCount = computed(() => users.value.length);
154
+
155
+ async function fetchUsers() {
156
+ isLoading.value = true;
157
+ error.value = null;
158
+ try {
159
+ users.value = await api.get<User[]>('/api/users');
160
+ } catch (e) {
161
+ error.value = e instanceof Error ? e.message : 'Failed to fetch users';
162
+ } finally {
163
+ isLoading.value = false;
164
+ }
165
+ }
166
+
167
+ return { users, isLoading, error, userCount, fetchUsers };
168
+ });
169
+ \`\`\`
170
+
171
+ ### Vue Router Setup
172
+
173
+ \`\`\`typescript
174
+ // src/router/index.ts
175
+ import { createRouter, createWebHistory } from 'vue-router';
176
+
177
+ const router = createRouter({
178
+ history: createWebHistory(),
179
+ routes: [
180
+ {
181
+ path: '/',
182
+ name: 'home',
183
+ component: () => import('@/views/HomeView.vue'),
184
+ },
185
+ {
186
+ path: '/users',
187
+ name: 'users',
188
+ component: () => import('@/views/UsersView.vue'),
189
+ },
190
+ ],
191
+ });
192
+
193
+ export default router;
194
+ \`\`\`
195
+
196
+ ### Composable Pattern
197
+
198
+ \`\`\`typescript
199
+ // src/composables/useApi.ts
200
+ import { ref, computed } from 'vue';
201
+
202
+ export function useApi<T>(fetchFn: () => Promise<T>) {
203
+ const data = ref<T | null>(null);
204
+ const isLoading = ref(false);
205
+ const error = ref<Error | null>(null);
206
+
207
+ const execute = async () => {
208
+ isLoading.value = true;
209
+ error.value = null;
210
+ try {
211
+ data.value = await fetchFn();
212
+ } catch (e) {
213
+ error.value = e instanceof Error ? e : new Error('Unknown error');
214
+ } finally {
215
+ isLoading.value = false;
216
+ }
217
+ };
218
+
219
+ const hasError = computed(() => error.value !== null);
220
+
221
+ return { data, isLoading, error, hasError, execute };
222
+ }
223
+ \`\`\`
224
+
225
+ ### API Client Pattern
226
+
227
+ \`\`\`typescript
228
+ // src/lib/api.ts
229
+ const API_URL = import.meta.env.VITE_API_URL || '/api';
230
+
231
+ class ApiClient {
232
+ async get<T>(endpoint: string): Promise<T> {
233
+ const res = await fetch(\`\${API_URL}\${endpoint}\`);
234
+ if (!res.ok) throw new Error(\`API Error: \${res.status}\`);
235
+ return res.json();
236
+ }
237
+
238
+ async post<T>(endpoint: string, data: unknown): Promise<T> {
239
+ const res = await fetch(\`\${API_URL}\${endpoint}\`, {
240
+ method: 'POST',
241
+ headers: { 'Content-Type': 'application/json' },
242
+ body: JSON.stringify(data),
243
+ });
244
+ if (!res.ok) throw new Error(\`API Error: \${res.status}\`);
245
+ return res.json();
246
+ }
247
+ }
248
+
249
+ export const api = new ApiClient();
250
+ \`\`\`
251
+
252
+ ### Vue 3 Best Practices
253
+
254
+ - **Always use \`<script setup>\`** for cleaner component code
255
+ - **Use Composition API** - no Options API
256
+ - **TypeScript for props**: Use \`defineProps<T>()\` with interfaces
257
+ - **Computed properties**: Use \`computed()\` for derived state
258
+ - **Watch wisely**: Use \`watch\` and \`watchEffect\` appropriately
259
+ - **Lifecycle hooks**: Use \`onMounted\`, \`onUnmounted\` from vue
260
+
261
+ ### What NOT to Do (Vue specific)
262
+
263
+ - Never use Options API - always Composition API with \`<script setup>\`
264
+ - Never mutate props directly
265
+ - Never use \`this\` in script setup (it's undefined)
266
+ - Never forget to import ref, computed, etc. from 'vue'`;
267
+ //# sourceMappingURL=vue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vue.js","sourceRoot":"","sources":["../../../../src/chat/prompts/frontend/vue.ts"],"names":[],"mappings":";;;AAMa,QAAA,UAAU,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wDAsQ8B,CAAC"}
@@ -3,3 +3,7 @@ export declare function getSystemPrompt(projectType: ProjectType, backendFramewo
3
3
  export { WEB_SYSTEM_PROMPT } from "./web-system-prompt";
4
4
  export { FULLSTACK_EXPRESS_PROMPT } from "./fullstack-express-prompt";
5
5
  export { FULLSTACK_FASTAPI_PROMPT } from "./fullstack-fastapi-prompt";
6
+ export { PromptBuilderService } from "./prompt-builder.service";
7
+ export * from "./sections/core";
8
+ export * from "./frontend";
9
+ export * from "./backend";
@@ -1,6 +1,20 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
2
16
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FULLSTACK_FASTAPI_PROMPT = exports.FULLSTACK_EXPRESS_PROMPT = exports.WEB_SYSTEM_PROMPT = void 0;
17
+ exports.PromptBuilderService = exports.FULLSTACK_FASTAPI_PROMPT = exports.FULLSTACK_EXPRESS_PROMPT = exports.WEB_SYSTEM_PROMPT = void 0;
4
18
  exports.getSystemPrompt = getSystemPrompt;
5
19
  const client_1 = require("@prisma/client");
6
20
  const web_system_prompt_1 = require("./web-system-prompt");
@@ -26,4 +40,9 @@ var fullstack_express_prompt_2 = require("./fullstack-express-prompt");
26
40
  Object.defineProperty(exports, "FULLSTACK_EXPRESS_PROMPT", { enumerable: true, get: function () { return fullstack_express_prompt_2.FULLSTACK_EXPRESS_PROMPT; } });
27
41
  var fullstack_fastapi_prompt_2 = require("./fullstack-fastapi-prompt");
28
42
  Object.defineProperty(exports, "FULLSTACK_FASTAPI_PROMPT", { enumerable: true, get: function () { return fullstack_fastapi_prompt_2.FULLSTACK_FASTAPI_PROMPT; } });
43
+ var prompt_builder_service_1 = require("./prompt-builder.service");
44
+ Object.defineProperty(exports, "PromptBuilderService", { enumerable: true, get: function () { return prompt_builder_service_1.PromptBuilderService; } });
45
+ __exportStar(require("./sections/core"), exports);
46
+ __exportStar(require("./frontend"), exports);
47
+ __exportStar(require("./backend"), exports);
29
48
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/chat/prompts/index.ts"],"names":[],"mappings":";;;AAWA,0CAkBC;AAvBD,2CAA+D;AAC/D,2DAAwD;AACxD,yEAAsE;AACtE,yEAAsE;AAEtE,SAAgB,eAAe,CAC7B,WAAwB,EACxB,gBAAkC;IAElC,IAAI,WAAW,KAAK,oBAAW,CAAC,GAAG,EAAE,CAAC;QACpC,QAAQ,gBAAgB,EAAE,CAAC;YACzB,KAAK,yBAAgB,CAAC,OAAO;gBAC3B,OAAO,mDAAwB,CAAC;YAClC,KAAK,yBAAgB,CAAC,OAAO;gBAC3B,OAAO,mDAAwB,CAAC;YAClC,KAAK,yBAAgB,CAAC,IAAI,CAAC;YAC3B;gBACE,OAAO,qCAAiB,CAAC;QAC7B,CAAC;IACH,CAAC;IAGD,OAAO,qCAAiB,CAAC;AAC3B,CAAC;AAED,yDAAwD;AAA/C,sHAAA,iBAAiB,OAAA;AAC1B,uEAAsE;AAA7D,oIAAA,wBAAwB,OAAA;AACjC,uEAAsE;AAA7D,oIAAA,wBAAwB,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/chat/prompts/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAgBA,0CAkBC;AA1BD,2CAA+D;AAC/D,2DAAwD;AACxD,yEAAsE;AACtE,yEAAsE;AAKtE,SAAgB,eAAe,CAC7B,WAAwB,EACxB,gBAAkC;IAElC,IAAI,WAAW,KAAK,oBAAW,CAAC,GAAG,EAAE,CAAC;QACpC,QAAQ,gBAAgB,EAAE,CAAC;YACzB,KAAK,yBAAgB,CAAC,OAAO;gBAC3B,OAAO,mDAAwB,CAAC;YAClC,KAAK,yBAAgB,CAAC,OAAO;gBAC3B,OAAO,mDAAwB,CAAC;YAClC,KAAK,yBAAgB,CAAC,IAAI,CAAC;YAC3B;gBACE,OAAO,qCAAiB,CAAC;QAC7B,CAAC;IACH,CAAC;IAGD,OAAO,qCAAiB,CAAC;AAC3B,CAAC;AAGD,yDAAwD;AAA/C,sHAAA,iBAAiB,OAAA;AAC1B,uEAAsE;AAA7D,oIAAA,wBAAwB,OAAA;AACjC,uEAAsE;AAA7D,oIAAA,wBAAwB,OAAA;AAGjC,mEAAgE;AAAvD,8HAAA,oBAAoB,OAAA;AAC7B,kDAAgC;AAChC,6CAA2B;AAC3B,4CAA0B"}
@@ -0,0 +1,15 @@
1
+ import { FrontendFramework, BackendFramework } from "@prisma/client";
2
+ export interface PromptBuilderConfig {
3
+ frontendFramework: FrontendFramework;
4
+ backendFramework: BackendFramework;
5
+ techStackConfig?: string | null;
6
+ }
7
+ export declare class PromptBuilderService {
8
+ build(config: PromptBuilderConfig): string;
9
+ private buildIntroSection;
10
+ private buildFullstackGuide;
11
+ private getFrontendPrompt;
12
+ private getBackendPrompt;
13
+ private getFrontendFrameworkName;
14
+ private getBackendFrameworkName;
15
+ }