specialist-agent 2.13.0 → 3.2.0

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 (323) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +33 -207
  3. package/dist/catalog.json +15529 -0
  4. package/dist/hw-worker.mjs +254 -0
  5. package/dist/icones/icone.ico +0 -0
  6. package/dist/icones/icone.png +0 -0
  7. package/dist/interface/assets/figtree-latin-400-normal-g7Dtegnw.woff2 +0 -0
  8. package/dist/interface/assets/figtree-latin-500-normal-BWnGEVsr.woff2 +0 -0
  9. package/dist/interface/assets/figtree-latin-600-normal-Cv_xCTDl.woff2 +0 -0
  10. package/dist/interface/assets/figtree-latin-700-normal-th6qEP7c.woff2 +0 -0
  11. package/dist/interface/assets/figtree-latin-ext-400-normal-CXAzuTZb.woff2 +0 -0
  12. package/dist/interface/assets/figtree-latin-ext-500-normal-Du0rIuHj.woff2 +0 -0
  13. package/dist/interface/assets/figtree-latin-ext-600-normal-DJlfifZj.woff2 +0 -0
  14. package/dist/interface/assets/figtree-latin-ext-700-normal-CS4sQkGV.woff2 +0 -0
  15. package/dist/interface/assets/index-BIyqZkro.css +1 -0
  16. package/dist/interface/assets/index-zAegy908.js +13 -0
  17. package/dist/interface/assets/jetbrains-mono-latin-400-normal-V6pRDFza.woff2 +0 -0
  18. package/dist/interface/assets/jetbrains-mono-latin-500-normal-BWZEU5yA.woff2 +0 -0
  19. package/dist/interface/assets/jetbrains-mono-latin-600-normal-C8RAYTDA.woff2 +0 -0
  20. package/dist/interface/assets/jetbrains-mono-latin-ext-400-normal-Bc8Ftmh3.woff2 +0 -0
  21. package/dist/interface/assets/jetbrains-mono-latin-ext-500-normal-Cut-4mMH.woff2 +0 -0
  22. package/dist/interface/assets/jetbrains-mono-latin-ext-600-normal-BfB_LPfz.woff2 +0 -0
  23. package/dist/interface/assets/unbounded-latin-500-normal-4slEIF53.woff2 +0 -0
  24. package/dist/interface/assets/unbounded-latin-700-normal-CaoNriVp.woff2 +0 -0
  25. package/dist/interface/assets/unbounded-latin-ext-500-normal-BTIpesyw.woff2 +0 -0
  26. package/dist/interface/assets/unbounded-latin-ext-700-normal-BLzWLLjG.woff2 +0 -0
  27. package/dist/interface/icones/apple-touch-icon.png +0 -0
  28. package/dist/interface/icones/favicon-32.png +0 -0
  29. package/dist/interface/icones/icone-192.png +0 -0
  30. package/dist/interface/icones/icone-512.png +0 -0
  31. package/dist/interface/icones/icone-mascara-512.png +0 -0
  32. package/dist/interface/index.html +19 -0
  33. package/dist/interface/manifest.webmanifest +19 -0
  34. package/dist/interface/sw.js +63 -0
  35. package/dist/specialist-agent.mjs +6919 -0
  36. package/dist/usage-worker.mjs +174 -0
  37. package/package.json +32 -57
  38. package/.claude-plugin/marketplace.json +0 -52
  39. package/.claude-plugin/plugin.json +0 -37
  40. package/.codex/INSTALL.md +0 -145
  41. package/.cursor-plugin/marketplace.json +0 -52
  42. package/.cursor-plugin/plugin.json +0 -37
  43. package/.opencode/INSTALL.md +0 -127
  44. package/.opencode/opencode.json +0 -186
  45. package/agents/analyst-lite.md +0 -48
  46. package/agents/analyst.md +0 -396
  47. package/agents/api-lite.md +0 -43
  48. package/agents/api.md +0 -427
  49. package/agents/architect-lite.md +0 -104
  50. package/agents/architect.md +0 -571
  51. package/agents/autopilot-lite.md +0 -46
  52. package/agents/autopilot.md +0 -196
  53. package/agents/cloud-lite.md +0 -75
  54. package/agents/cloud.md +0 -213
  55. package/agents/data-lite.md +0 -67
  56. package/agents/data.md +0 -306
  57. package/agents/debugger-lite.md +0 -46
  58. package/agents/debugger.md +0 -410
  59. package/agents/deps-lite.md +0 -41
  60. package/agents/deps.md +0 -363
  61. package/agents/designer-lite.md +0 -67
  62. package/agents/designer.md +0 -195
  63. package/agents/devops-lite.md +0 -67
  64. package/agents/devops.md +0 -205
  65. package/agents/docs-lite.md +0 -42
  66. package/agents/docs.md +0 -454
  67. package/agents/executor-lite.md +0 -61
  68. package/agents/executor.md +0 -695
  69. package/agents/explorer-lite.md +0 -55
  70. package/agents/explorer.md +0 -152
  71. package/agents/finance-lite.md +0 -66
  72. package/agents/finance.md +0 -255
  73. package/agents/i18n-lite.md +0 -44
  74. package/agents/i18n.md +0 -594
  75. package/agents/legal-lite.md +0 -113
  76. package/agents/legal.md +0 -302
  77. package/agents/marketing-lite.md +0 -25
  78. package/agents/marketing.md +0 -188
  79. package/agents/memory.md +0 -166
  80. package/agents/orchestrator-lite.md +0 -40
  81. package/agents/orchestrator.md +0 -512
  82. package/agents/pair-lite.md +0 -38
  83. package/agents/pair.md +0 -310
  84. package/agents/perf-lite.md +0 -42
  85. package/agents/perf.md +0 -320
  86. package/agents/planner-lite.md +0 -59
  87. package/agents/planner.md +0 -272
  88. package/agents/product-lite.md +0 -25
  89. package/agents/product.md +0 -195
  90. package/agents/refactor-lite.md +0 -42
  91. package/agents/refactor.md +0 -467
  92. package/agents/ripple-lite.md +0 -106
  93. package/agents/ripple.md +0 -166
  94. package/agents/scout-lite.md +0 -37
  95. package/agents/scout.md +0 -224
  96. package/agents/security-lite.md +0 -66
  97. package/agents/security.md +0 -252
  98. package/agents/sentry-triage-lite.md +0 -54
  99. package/agents/sentry-triage.md +0 -217
  100. package/agents/starter-lite.md +0 -80
  101. package/agents/starter.md +0 -300
  102. package/agents/support-lite.md +0 -24
  103. package/agents/support.md +0 -191
  104. package/agents/tdd-lite.md +0 -43
  105. package/agents/tdd.md +0 -329
  106. package/agents/tester-lite.md +0 -71
  107. package/agents/tester.md +0 -237
  108. package/cli/architectures.mjs +0 -713
  109. package/cli/detect-architecture.mjs +0 -752
  110. package/cli/generate-architecture.mjs +0 -1096
  111. package/cli/index.mjs +0 -1217
  112. package/cli/recommend-architecture.mjs +0 -870
  113. package/hooks/after-review.mjs +0 -130
  114. package/hooks/after-task.mjs +0 -117
  115. package/hooks/before-plan.mjs +0 -155
  116. package/hooks/before-review.mjs +0 -139
  117. package/hooks/hooks.json +0 -66
  118. package/hooks/lifecycle.json +0 -91
  119. package/hooks/native/auto-dispatch.mjs +0 -207
  120. package/hooks/native/auto-format.mjs +0 -176
  121. package/hooks/native/mcp-discovery.mjs +0 -168
  122. package/hooks/native/security-config.json +0 -38
  123. package/hooks/native/security-guard.mjs +0 -323
  124. package/hooks/native/session-context.mjs +0 -179
  125. package/hooks/native/session-end.mjs +0 -42
  126. package/hooks/native/utils.mjs +0 -62
  127. package/hooks/on-error.mjs +0 -129
  128. package/hooks/session-end.mjs +0 -185
  129. package/hooks/session-start.mjs +0 -154
  130. package/packs/angular/ARCHITECTURE.md +0 -814
  131. package/packs/angular/CLAUDE.md +0 -105
  132. package/packs/angular/agents/builder.md +0 -113
  133. package/packs/angular/agents/doctor.md +0 -187
  134. package/packs/angular/agents/migrator.md +0 -101
  135. package/packs/angular/agents/reviewer.md +0 -252
  136. package/packs/angular/agents-lite/builder.md +0 -65
  137. package/packs/angular/agents-lite/doctor.md +0 -64
  138. package/packs/angular/agents-lite/migrator.md +0 -75
  139. package/packs/angular/agents-lite/reviewer.md +0 -69
  140. package/packs/angular/skills/dev-create-component/SKILL.md +0 -56
  141. package/packs/angular/skills/dev-create-injectable/SKILL.md +0 -60
  142. package/packs/angular/skills/dev-create-module/SKILL.md +0 -49
  143. package/packs/angular/skills/dev-create-service/SKILL.md +0 -34
  144. package/packs/angular/skills/dev-create-test/SKILL.md +0 -78
  145. package/packs/angular/skills/dev-generate-types/SKILL.md +0 -37
  146. package/packs/angular/skills/docs-onboard/SKILL.md +0 -42
  147. package/packs/angular/skills/migration-migrate-component/SKILL.md +0 -42
  148. package/packs/angular/skills/migration-migrate-module/SKILL.md +0 -25
  149. package/packs/angular/skills/review-check-architecture/SKILL.md +0 -67
  150. package/packs/angular/skills/review-fix-violations/SKILL.md +0 -43
  151. package/packs/angular/skills/review-review/SKILL.md +0 -43
  152. package/packs/astro/ARCHITECTURE.md +0 -718
  153. package/packs/astro/CLAUDE.md +0 -106
  154. package/packs/astro/agents/builder.md +0 -123
  155. package/packs/astro/agents/doctor.md +0 -200
  156. package/packs/astro/agents/migrator.md +0 -105
  157. package/packs/astro/agents/reviewer.md +0 -253
  158. package/packs/astro/agents-lite/builder.md +0 -71
  159. package/packs/astro/agents-lite/doctor.md +0 -66
  160. package/packs/astro/agents-lite/migrator.md +0 -71
  161. package/packs/astro/agents-lite/reviewer.md +0 -70
  162. package/packs/astro/skills/dev-create-component/SKILL.md +0 -50
  163. package/packs/astro/skills/dev-create-island/SKILL.md +0 -63
  164. package/packs/astro/skills/dev-create-module/SKILL.md +0 -49
  165. package/packs/astro/skills/dev-create-service/SKILL.md +0 -34
  166. package/packs/astro/skills/dev-create-test/SKILL.md +0 -76
  167. package/packs/astro/skills/dev-generate-types/SKILL.md +0 -37
  168. package/packs/astro/skills/docs-onboard/SKILL.md +0 -51
  169. package/packs/astro/skills/migration-migrate-component/SKILL.md +0 -48
  170. package/packs/astro/skills/migration-migrate-module/SKILL.md +0 -25
  171. package/packs/astro/skills/review-check-architecture/SKILL.md +0 -72
  172. package/packs/astro/skills/review-fix-violations/SKILL.md +0 -43
  173. package/packs/astro/skills/review-review/SKILL.md +0 -45
  174. package/packs/nextjs/ARCHITECTURE.md +0 -1033
  175. package/packs/nextjs/CLAUDE.md +0 -106
  176. package/packs/nextjs/agents/builder.md +0 -132
  177. package/packs/nextjs/agents/doctor.md +0 -226
  178. package/packs/nextjs/agents/migrator.md +0 -101
  179. package/packs/nextjs/agents/reviewer.md +0 -243
  180. package/packs/nextjs/agents-lite/builder.md +0 -74
  181. package/packs/nextjs/agents-lite/doctor.md +0 -74
  182. package/packs/nextjs/agents-lite/migrator.md +0 -75
  183. package/packs/nextjs/agents-lite/reviewer.md +0 -73
  184. package/packs/nextjs/skills/dev-create-component/SKILL.md +0 -82
  185. package/packs/nextjs/skills/dev-create-hook/SKILL.md +0 -90
  186. package/packs/nextjs/skills/dev-create-module/SKILL.md +0 -63
  187. package/packs/nextjs/skills/dev-create-service/SKILL.md +0 -35
  188. package/packs/nextjs/skills/dev-create-test/SKILL.md +0 -106
  189. package/packs/nextjs/skills/dev-generate-types/SKILL.md +0 -37
  190. package/packs/nextjs/skills/docs-onboard/SKILL.md +0 -55
  191. package/packs/nextjs/skills/migration-migrate-component/SKILL.md +0 -58
  192. package/packs/nextjs/skills/migration-migrate-module/SKILL.md +0 -25
  193. package/packs/nextjs/skills/review-check-architecture/SKILL.md +0 -101
  194. package/packs/nextjs/skills/review-fix-violations/SKILL.md +0 -48
  195. package/packs/nextjs/skills/review-review/SKILL.md +0 -47
  196. package/packs/nuxt/ARCHITECTURE.md +0 -831
  197. package/packs/nuxt/CLAUDE.md +0 -111
  198. package/packs/nuxt/agents/builder.md +0 -120
  199. package/packs/nuxt/agents/doctor.md +0 -198
  200. package/packs/nuxt/agents/migrator.md +0 -101
  201. package/packs/nuxt/agents/reviewer.md +0 -255
  202. package/packs/nuxt/agents-lite/builder.md +0 -67
  203. package/packs/nuxt/agents-lite/doctor.md +0 -67
  204. package/packs/nuxt/agents-lite/migrator.md +0 -80
  205. package/packs/nuxt/agents-lite/reviewer.md +0 -71
  206. package/packs/nuxt/skills/dev-create-component/SKILL.md +0 -60
  207. package/packs/nuxt/skills/dev-create-composable/SKILL.md +0 -33
  208. package/packs/nuxt/skills/dev-create-module/SKILL.md +0 -49
  209. package/packs/nuxt/skills/dev-create-service/SKILL.md +0 -34
  210. package/packs/nuxt/skills/dev-create-test/SKILL.md +0 -61
  211. package/packs/nuxt/skills/dev-generate-types/SKILL.md +0 -37
  212. package/packs/nuxt/skills/docs-onboard/SKILL.md +0 -49
  213. package/packs/nuxt/skills/migration-migrate-component/SKILL.md +0 -48
  214. package/packs/nuxt/skills/migration-migrate-module/SKILL.md +0 -25
  215. package/packs/nuxt/skills/review-check-architecture/SKILL.md +0 -71
  216. package/packs/nuxt/skills/review-fix-violations/SKILL.md +0 -43
  217. package/packs/nuxt/skills/review-review/SKILL.md +0 -45
  218. package/packs/react/ARCHITECTURE.md +0 -991
  219. package/packs/react/CLAUDE.md +0 -102
  220. package/packs/react/agents/builder.md +0 -113
  221. package/packs/react/agents/doctor.md +0 -203
  222. package/packs/react/agents/migrator.md +0 -101
  223. package/packs/react/agents/reviewer.md +0 -252
  224. package/packs/react/agents-lite/builder.md +0 -65
  225. package/packs/react/agents-lite/doctor.md +0 -64
  226. package/packs/react/agents-lite/migrator.md +0 -74
  227. package/packs/react/agents-lite/reviewer.md +0 -69
  228. package/packs/react/skills/dev-create-component/SKILL.md +0 -53
  229. package/packs/react/skills/dev-create-hook/SKILL.md +0 -78
  230. package/packs/react/skills/dev-create-module/SKILL.md +0 -51
  231. package/packs/react/skills/dev-create-service/SKILL.md +0 -34
  232. package/packs/react/skills/dev-create-test/SKILL.md +0 -92
  233. package/packs/react/skills/dev-generate-types/SKILL.md +0 -37
  234. package/packs/react/skills/docs-onboard/SKILL.md +0 -42
  235. package/packs/react/skills/migration-migrate-component/SKILL.md +0 -44
  236. package/packs/react/skills/migration-migrate-module/SKILL.md +0 -25
  237. package/packs/react/skills/review-check-architecture/SKILL.md +0 -73
  238. package/packs/react/skills/review-fix-violations/SKILL.md +0 -45
  239. package/packs/react/skills/review-review/SKILL.md +0 -44
  240. package/packs/svelte/ARCHITECTURE.md +0 -975
  241. package/packs/svelte/CLAUDE.md +0 -102
  242. package/packs/svelte/agents/builder.md +0 -114
  243. package/packs/svelte/agents/doctor.md +0 -174
  244. package/packs/svelte/agents/migrator.md +0 -101
  245. package/packs/svelte/agents/reviewer.md +0 -238
  246. package/packs/svelte/agents-lite/builder.md +0 -66
  247. package/packs/svelte/agents-lite/doctor.md +0 -67
  248. package/packs/svelte/agents-lite/migrator.md +0 -82
  249. package/packs/svelte/agents-lite/reviewer.md +0 -70
  250. package/packs/svelte/skills/dev-create-component/SKILL.md +0 -77
  251. package/packs/svelte/skills/dev-create-module/SKILL.md +0 -59
  252. package/packs/svelte/skills/dev-create-service/SKILL.md +0 -35
  253. package/packs/svelte/skills/dev-create-store/SKILL.md +0 -94
  254. package/packs/svelte/skills/dev-create-test/SKILL.md +0 -98
  255. package/packs/svelte/skills/dev-generate-types/SKILL.md +0 -37
  256. package/packs/svelte/skills/docs-onboard/SKILL.md +0 -47
  257. package/packs/svelte/skills/migration-migrate-component/SKILL.md +0 -51
  258. package/packs/svelte/skills/migration-migrate-module/SKILL.md +0 -25
  259. package/packs/svelte/skills/review-check-architecture/SKILL.md +0 -79
  260. package/packs/svelte/skills/review-fix-violations/SKILL.md +0 -47
  261. package/packs/svelte/skills/review-review/SKILL.md +0 -45
  262. package/packs/vue/ARCHITECTURE.md +0 -798
  263. package/packs/vue/CLAUDE.md +0 -102
  264. package/packs/vue/agents/builder.md +0 -112
  265. package/packs/vue/agents/doctor.md +0 -185
  266. package/packs/vue/agents/migrator.md +0 -101
  267. package/packs/vue/agents/reviewer.md +0 -249
  268. package/packs/vue/agents-lite/builder.md +0 -65
  269. package/packs/vue/agents-lite/doctor.md +0 -63
  270. package/packs/vue/agents-lite/migrator.md +0 -73
  271. package/packs/vue/agents-lite/reviewer.md +0 -68
  272. package/packs/vue/skills/dev-create-component/SKILL.md +0 -58
  273. package/packs/vue/skills/dev-create-composable/SKILL.md +0 -31
  274. package/packs/vue/skills/dev-create-module/SKILL.md +0 -50
  275. package/packs/vue/skills/dev-create-service/SKILL.md +0 -34
  276. package/packs/vue/skills/dev-create-test/SKILL.md +0 -62
  277. package/packs/vue/skills/dev-generate-types/SKILL.md +0 -37
  278. package/packs/vue/skills/docs-onboard/SKILL.md +0 -42
  279. package/packs/vue/skills/migration-migrate-component/SKILL.md +0 -41
  280. package/packs/vue/skills/migration-migrate-module/SKILL.md +0 -25
  281. package/packs/vue/skills/review-check-architecture/SKILL.md +0 -73
  282. package/packs/vue/skills/review-fix-violations/SKILL.md +0 -42
  283. package/packs/vue/skills/review-review/SKILL.md +0 -43
  284. package/skills/audit/SKILL.md +0 -231
  285. package/skills/autofix/SKILL.md +0 -166
  286. package/skills/autopilot/SKILL.md +0 -286
  287. package/skills/brainstorm/SKILL.md +0 -298
  288. package/skills/checkpoint/SKILL.md +0 -217
  289. package/skills/codereview/SKILL.md +0 -268
  290. package/skills/commit/SKILL.md +0 -150
  291. package/skills/copywriting/SKILL.md +0 -218
  292. package/skills/cro/SKILL.md +0 -234
  293. package/skills/debug/SKILL.md +0 -210
  294. package/skills/design-review/SKILL.md +0 -217
  295. package/skills/discovery/SKILL.md +0 -218
  296. package/skills/estimate/SKILL.md +0 -154
  297. package/skills/finish/SKILL.md +0 -220
  298. package/skills/grill/SKILL.md +0 -270
  299. package/skills/health/SKILL.md +0 -251
  300. package/skills/improve-architecture/SKILL.md +0 -205
  301. package/skills/learn/SKILL.md +0 -260
  302. package/skills/lint/SKILL.md +0 -126
  303. package/skills/migrate-architecture/SKILL.md +0 -242
  304. package/skills/migrate-framework/SKILL.md +0 -172
  305. package/skills/onboard/SKILL.md +0 -168
  306. package/skills/plan/SKILL.md +0 -141
  307. package/skills/prd/SKILL.md +0 -241
  308. package/skills/recall/SKILL.md +0 -112
  309. package/skills/remember/SKILL.md +0 -108
  310. package/skills/seo-audit/SKILL.md +0 -240
  311. package/skills/tdd/SKILL.md +0 -201
  312. package/skills/tutorial/SKILL.md +0 -346
  313. package/skills/verify/SKILL.md +0 -168
  314. package/skills/worktree/SKILL.md +0 -168
  315. package/skills/write-skill/SKILL.md +0 -225
  316. package/templates/autopilot/PROMPT.md +0 -39
  317. package/templates/autopilot/README.md +0 -122
  318. package/templates/autopilot/devcontainer.json +0 -21
  319. package/templates/industry/ecommerce.md +0 -127
  320. package/templates/industry/fintech.md +0 -161
  321. package/templates/industry/saas.md +0 -134
  322. package/templates/session-memory.json +0 -48
  323. package/templates/skill-template/SKILL.md +0 -90
@@ -1,831 +0,0 @@
1
- # ARCHITECTURE.md - Architecture Guide and Patterns
2
-
3
- > This document is the **source of truth** for all agents and skills.
4
- > Any architectural decision must be documented here.
5
-
6
- ---
7
-
8
- ## 1. Overview
9
-
10
- Nuxt 3 is a full-stack Vue 3 framework with auto-imports, file-based routing, and a built-in Nitro server engine. This architecture leverages Nuxt's conventions for a modern, typed, and modular codebase:
11
-
12
- | Feature | Approach |
13
- |---------|----------|
14
- | Language | TypeScript (strict) |
15
- | Components | `<script setup lang="ts">` with auto-imports |
16
- | Server state | `useFetch` / `useAsyncData` (built-in caching) |
17
- | Client state (simple) | `useState` (SSR-safe) |
18
- | Client state (complex) | Pinia (setup syntax) |
19
- | Routing | File-based (`pages/` directory) |
20
- | Server API | Nitro (`server/api/` directory) |
21
- | Rendering | Hybrid (SSR, SSG, SPA per route) |
22
- | Validation | Zod schemas |
23
- | Testing | Vitest + `@nuxt/test-utils` |
24
- | Naming | kebab-case files, PascalCase components |
25
-
26
- ---
27
-
28
- ## 2. Directory Structure (Modular Architecture)
29
-
30
- ```
31
- ├── app/ # App shell
32
- │ ├── app.vue # Root component
33
- │ └── error.vue # Global error page
34
- │
35
- ├── pages/ # File-based routing
36
- │ ├── index.vue # /
37
- │ ├── login.vue # /login
38
- │ └── marketplace/
39
- │ ├── index.vue # /marketplace
40
- │ └── [id].vue # /marketplace/:id
41
- │
42
- ├── layouts/ # Layout components
43
- │ ├── default.vue
44
- │ └── auth.vue
45
- │
46
- ├── components/ # Auto-imported shared components
47
- │ ├── AppButton.vue
48
- │ ├── AppModal.vue
49
- │ └── AppTable.vue
50
- │
51
- ├── composables/ # Auto-imported shared composables
52
- │ ├── useAuth.ts
53
- │ └── useToast.ts
54
- │
55
- ├── modules/ # Feature modules (bounded contexts)
56
- │ └── marketplace/
57
- │ ├── components/
58
- │ │ ├── MarketplaceList.vue
59
- │ │ ├── MarketplaceCard.vue
60
- │ │ └── MarketplaceFilters.vue
61
- │ ├── composables/
62
- │ │ ├── useMarketplaceList.ts
63
- │ │ └── useMarketplaceFilters.ts
64
- │ ├── services/
65
- │ │ └── marketplace-service.ts
66
- │ ├── adapters/
67
- │ │ └── marketplace-adapter.ts
68
- │ ├── types/
69
- │ │ ├── marketplace.types.ts
70
- │ │ └── marketplace.contracts.ts
71
- │ ├── __tests__/
72
- │ └── index.ts # Barrel export (public API)
73
- │
74
- ├── server/ # Nitro server engine
75
- │ ├── api/ # API routes
76
- │ │ ├── marketplace/
77
- │ │ │ ├── index.get.ts # GET /api/marketplace
78
- │ │ │ ├── index.post.ts # POST /api/marketplace
79
- │ │ │ └── [id].get.ts # GET /api/marketplace/:id
80
- │ │ └── auth/
81
- │ │ └── login.post.ts
82
- │ ├── middleware/ # Server middleware
83
- │ │ └── auth.ts
84
- │ └── utils/ # Server-side utilities
85
- │ ├── db.ts
86
- │ └── validate.ts
87
- │
88
- ├── middleware/ # Route middleware (client-side)
89
- │ ├── auth.ts
90
- │ └── guest.ts
91
- │
92
- ├── plugins/ # Nuxt plugins (app initialization)
93
- │ └── error-handler.ts
94
- │
95
- ├── shared/ # Shared utilities
96
- │ ├── utils/ # Pure functions
97
- │ ├── helpers/ # Functions with side effects
98
- │ ├── types/ # Global types
99
- │ └── constants/ # Static values
100
- │
101
- ├── assets/ # Static assets (processed by Vite)
102
- │
103
- └── public/ # Public static files (served as-is)
104
- ```
105
-
106
- ### Import Rules Between Layers
107
- ```
108
- modules/auth <-> shared/ OK - Module imports from shared
109
- modules/auth -> modules/market PROHIBITED - Module imports from another module
110
- shared/ -> modules/auth PROHIBITED - Shared imports from module
111
- pages/ -> modules/* OK - Pages import module components/composables
112
- composables/ <-> shared/ OK - Shared composables use shared utils
113
- server/ -> shared/types OK - Server uses shared types
114
- ```
115
-
116
- If two modules need to share something, move it to `shared/` or `composables/`.
117
-
118
- ---
119
-
120
- ## 3. Naming Conventions
121
-
122
- ### Files and Directories
123
-
124
- | Type | Pattern | Example |
125
- |------|---------|---------|
126
- | Directories | `kebab-case` | `user-settings/` |
127
- | Vue Components | `PascalCase.vue` | `MarketplaceCard.vue` |
128
- | Pages | `kebab-case.vue` | `marketplace/index.vue` |
129
- | Composables | `use` + `PascalCase.ts` | `useMarketplaceList.ts` |
130
- | Services | `kebab-case-service.ts` | `marketplace-service.ts` |
131
- | Adapters | `kebab-case-adapter.ts` | `marketplace-adapter.ts` |
132
- | Server API routes | `kebab-case.[method].ts` | `index.get.ts`, `[id].delete.ts` |
133
- | Types | `kebab-case.types.ts` | `marketplace.types.ts` |
134
- | Contracts/Schemas | `kebab-case.contracts.ts` | `marketplace.contracts.ts` |
135
- | Utils | `kebab-case.ts` | `format-date.ts` |
136
- | Helpers | `kebab-case.ts` | `clipboard-helper.ts` |
137
- | Tests | `OriginalName.spec.ts` | `MarketplaceList.spec.ts` |
138
- | Middleware | `kebab-case.ts` | `auth.ts` |
139
- | Plugins | `kebab-case.ts` | `error-handler.ts` |
140
-
141
- ### Code
142
-
143
- | Type | Pattern | Example |
144
- |------|---------|---------|
145
- | Variables / functions | `camelCase` | `getUserById`, `isLoading` |
146
- | Types / Interfaces | `PascalCase` | `UserProfile`, `MarketplaceItem` |
147
- | Enums | `PascalCase` | `UserRole.Admin` |
148
- | Constants | `UPPER_SNAKE_CASE` | `API_BASE_URL`, `MAX_RETRIES` |
149
- | Composables | `use` + `PascalCase` | `useAuth`, `useMarketplaceList` |
150
- | Event handlers | `handle` + action | `handleSubmit`, `handleDelete` |
151
- | Boolean | `is`/`has`/`can`/`should` | `isLoading`, `hasPermission` |
152
-
153
- ---
154
-
155
- ## 4. Responsibility Layers
156
-
157
- ### 4.1 Services - Pure HTTP Requests
158
-
159
- Services perform **only** the HTTP request. No try/catch, no transformation, no business logic.
160
-
161
- ```typescript
162
- // modules/marketplace/services/marketplace-service.ts
163
- import type { MarketplaceListResponse, MarketplaceItemResponse } from '../types/marketplace.types'
164
-
165
- export const marketplaceService = {
166
- list(params: { page: number; pageSize: number; search?: string }) {
167
- return $fetch<MarketplaceListResponse>('/api/marketplace', { params })
168
- },
169
-
170
- getById(id: string) {
171
- return $fetch<MarketplaceItemResponse>(`/api/marketplace/${id}`)
172
- },
173
-
174
- create(payload: CreateMarketplacePayload) {
175
- return $fetch<MarketplaceItemResponse>('/api/marketplace', {
176
- method: 'POST',
177
- body: payload,
178
- })
179
- },
180
-
181
- delete(id: string) {
182
- return $fetch(`/api/marketplace/${id}`, { method: 'DELETE' })
183
- },
184
- }
185
- ```
186
-
187
- **Service rules:**
188
- - NO try/catch (caller handles errors)
189
- - NO data transformation (adapter does that)
190
- - NO business logic
191
- - NO access to stores or composables
192
- - YES typed request/response
193
- - YES one file per domain/resource
194
- - YES export as object with methods
195
- - Use `$fetch` (Nuxt built-in) instead of axios
196
-
197
- ### 4.2 Adapters - Contract Parsers
198
-
199
- Adapters transform data from the API to the TypeScript app contract (and vice-versa). They are **pure functions** without side effects.
200
-
201
- ```typescript
202
- // modules/marketplace/adapters/marketplace-adapter.ts
203
- import type {
204
- MarketplaceListResponse,
205
- MarketplaceItemResponse,
206
- } from '../types/marketplace.types'
207
- import type {
208
- MarketplaceItem,
209
- MarketplaceList,
210
- } from '../types/marketplace.contracts'
211
-
212
- export const marketplaceAdapter = {
213
- toMarketplaceItem(response: MarketplaceItemResponse): MarketplaceItem {
214
- return {
215
- id: response.uuid,
216
- name: response.name,
217
- vendor: response.vendor_name,
218
- category: response.category_slug,
219
- price: response.price_cents / 100,
220
- isActive: response.status === 'active',
221
- createdAt: new Date(response.created_at),
222
- updatedAt: new Date(response.updated_at),
223
- }
224
- },
225
-
226
- toMarketplaceList(response: MarketplaceListResponse): MarketplaceList {
227
- return {
228
- items: response.results.map(marketplaceAdapter.toMarketplaceItem),
229
- totalItems: response.count,
230
- totalPages: Math.ceil(response.count / response.page_size),
231
- currentPage: response.page,
232
- }
233
- },
234
-
235
- toCreatePayload(item: CreateMarketplaceInput): CreateMarketplacePayload {
236
- return {
237
- name: item.name,
238
- vendor_name: item.vendor,
239
- category_slug: item.category,
240
- price_cents: Math.round(item.price * 100),
241
- }
242
- },
243
- }
244
- ```
245
-
246
- **Adapter rules:**
247
- - Pure functions (input -> output, no side effects)
248
- - Two directions: API->App (inbound) and App->API (outbound)
249
- - Rename fields (snake_case API -> camelCase App)
250
- - Convert types (string->Date, cents->decimal, status->boolean)
251
- - NO HTTP calls
252
- - NO access to store/composable
253
- - NO try/catch (failure = wrong type = bug to fix)
254
-
255
- ### 4.3 Types & Contracts
256
-
257
- ```typescript
258
- // types/marketplace.types.ts
259
- // Types that mirror the API exactly as it returns (snake_case)
260
-
261
- export interface MarketplaceItemResponse {
262
- uuid: string
263
- name: string
264
- vendor_name: string
265
- category_slug: string
266
- price_cents: number
267
- status: 'active' | 'inactive' | 'pending'
268
- created_at: string
269
- updated_at: string
270
- }
271
-
272
- export interface MarketplaceListResponse {
273
- count: number
274
- page: number
275
- page_size: number
276
- results: MarketplaceItemResponse[]
277
- }
278
-
279
- // types/marketplace.contracts.ts
280
- // App contracts (camelCase, correct types)
281
-
282
- export interface MarketplaceItem {
283
- id: string
284
- name: string
285
- vendor: string
286
- category: string
287
- price: number // in currency units, not cents
288
- isActive: boolean // derived from status
289
- createdAt: Date
290
- updatedAt: Date
291
- }
292
-
293
- export interface MarketplaceList {
294
- items: MarketplaceItem[]
295
- totalItems: number
296
- totalPages: number
297
- currentPage: number
298
- }
299
-
300
- export interface CreateMarketplaceInput {
301
- name: string
302
- vendor: string
303
- category: string
304
- price: number
305
- }
306
- ```
307
-
308
- ### 4.4 Composables - Business Logic + Orchestration
309
-
310
- Composables connect everything: call service, pass through adapter, manage loading/error, and expose reactive data. In Nuxt, composables in the `composables/` directory are **auto-imported**.
311
-
312
- ```typescript
313
- // modules/marketplace/composables/useMarketplaceList.ts
314
- import { marketplaceService } from '../services/marketplace-service'
315
- import { marketplaceAdapter } from '../adapters/marketplace-adapter'
316
- import type { MarketplaceList } from '../types/marketplace.contracts'
317
-
318
- interface UseMarketplaceListOptions {
319
- page: Ref<number>
320
- pageSize?: Ref<number>
321
- search?: Ref<string>
322
- }
323
-
324
- export function useMarketplaceList(options: UseMarketplaceListOptions) {
325
- const page = computed(() => toValue(options.page))
326
- const pageSize = computed(() => toValue(options.pageSize) ?? 20)
327
- const search = computed(() => toValue(options.search) ?? '')
328
-
329
- const { data, status, error, refresh } = useAsyncData(
330
- () => `marketplace-list-${page.value}-${pageSize.value}-${search.value}`,
331
- () => marketplaceService.list({
332
- page: page.value,
333
- pageSize: pageSize.value,
334
- search: search.value,
335
- }),
336
- {
337
- transform: (response) => marketplaceAdapter.toMarketplaceList(response),
338
- watch: [page, pageSize, search],
339
- },
340
- )
341
-
342
- const items = computed(() => data.value?.items ?? [])
343
- const totalPages = computed(() => data.value?.totalPages ?? 0)
344
- const isLoading = computed(() => status.value === 'pending')
345
- const isEmpty = computed(() => !isLoading.value && items.value.length === 0)
346
-
347
- return {
348
- // Data
349
- items,
350
- totalPages,
351
- // State
352
- isLoading,
353
- isEmpty,
354
- error,
355
- // Actions
356
- refresh,
357
- }
358
- }
359
- ```
360
-
361
- **Composable rules:**
362
- - Orchestrate: service -> adapter -> reactive data
363
- - Manage loading, error, empty states
364
- - Return refs/computed (never raw values)
365
- - Name with `use` prefix
366
- - Typed return values
367
- - NO template/rendering (component does that)
368
- - NO direct API access (service does that)
369
- - Use `useAsyncData` or `useFetch` for server state (not TanStack Query)
370
-
371
- ### 4.5 useState - SSR-Safe Shared State
372
-
373
- `useState` is Nuxt's built-in SSR-friendly state. Use it for simple shared state that needs to survive SSR hydration.
374
-
375
- ```typescript
376
- // composables/useMarketplaceFilters.ts
377
- export function useMarketplaceFilters() {
378
- const selectedCategory = useState<string | null>('marketplace-category', () => null)
379
- const viewMode = useState<'grid' | 'list'>('marketplace-view-mode', () => 'grid')
380
- const searchQuery = useState<string>('marketplace-search', () => '')
381
-
382
- const hasActiveFilters = computed(() =>
383
- !!selectedCategory.value || !!searchQuery.value
384
- )
385
-
386
- function setCategory(category: string | null) {
387
- selectedCategory.value = category
388
- }
389
-
390
- function setViewMode(mode: 'grid' | 'list') {
391
- viewMode.value = mode
392
- }
393
-
394
- function clearFilters() {
395
- selectedCategory.value = null
396
- searchQuery.value = ''
397
- }
398
-
399
- return {
400
- selectedCategory: readonly(selectedCategory),
401
- viewMode: readonly(viewMode),
402
- searchQuery,
403
- hasActiveFilters,
404
- setCategory,
405
- setViewMode,
406
- clearFilters,
407
- }
408
- }
409
- ```
410
-
411
- ### 4.6 Pinia Stores - Complex Client State Only
412
-
413
- Use Pinia only when `useState` is not enough (complex state, devtools, plugin ecosystem).
414
-
415
- ```typescript
416
- // modules/marketplace/stores/marketplace-store.ts
417
- import { defineStore } from 'pinia'
418
-
419
- export const useMarketplaceStore = defineStore('marketplace', () => {
420
- // State
421
- const cart = ref<CartItem[]>([])
422
- const recentlyViewed = ref<string[]>([])
423
-
424
- // Getters
425
- const cartTotal = computed(() =>
426
- cart.value.reduce((sum, item) => sum + item.price * item.quantity, 0)
427
- )
428
-
429
- const cartCount = computed(() =>
430
- cart.value.reduce((sum, item) => sum + item.quantity, 0)
431
- )
432
-
433
- // Actions
434
- function addToCart(item: CartItem) {
435
- const existing = cart.value.find(i => i.id === item.id)
436
- if (existing) {
437
- existing.quantity += item.quantity
438
- } else {
439
- cart.value.push(item)
440
- }
441
- }
442
-
443
- function removeFromCart(id: string) {
444
- cart.value = cart.value.filter(i => i.id !== id)
445
- }
446
-
447
- return {
448
- cart: readonly(cart),
449
- recentlyViewed: readonly(recentlyViewed),
450
- cartTotal,
451
- cartCount,
452
- addToCart,
453
- removeFromCart,
454
- }
455
- })
456
- ```
457
-
458
- **State management rules:**
459
- - `useState` for simple shared state (filters, UI mode, preferences)
460
- - Pinia for complex client state (cart, multi-step forms, computed chains)
461
- - `useFetch` / `useAsyncData` for server state - NEVER in Pinia
462
- - Pinia: setup syntax, readonly() on state, storeToRefs() in consumers
463
- - NO HTTP calls inside stores
464
-
465
- ### 4.7 Server Routes (Nitro)
466
-
467
- ```typescript
468
- // server/api/marketplace/index.get.ts
469
- import { z } from 'zod'
470
-
471
- const querySchema = z.object({
472
- page: z.coerce.number().min(1).default(1),
473
- pageSize: z.coerce.number().min(1).max(100).default(20),
474
- search: z.string().optional(),
475
- })
476
-
477
- export default defineEventHandler(async (event) => {
478
- const query = await getValidatedQuery(event, querySchema.parse)
479
-
480
- // Fetch from database or external API
481
- const items = await fetchMarketplaceItems(query)
482
-
483
- return items
484
- })
485
-
486
- // server/api/marketplace/index.post.ts
487
- import { z } from 'zod'
488
-
489
- const bodySchema = z.object({
490
- name: z.string().min(1).max(255),
491
- vendor_name: z.string().min(1),
492
- category_slug: z.string().min(1),
493
- price_cents: z.number().int().positive(),
494
- })
495
-
496
- export default defineEventHandler(async (event) => {
497
- const body = await readValidatedBody(event, bodySchema.parse)
498
-
499
- const item = await createMarketplaceItem(body)
500
-
501
- return item
502
- })
503
- ```
504
-
505
- ---
506
-
507
- ## 5. Components - Composition Pattern
508
-
509
- ### 5.1 SFC Pattern (with auto-imports)
510
-
511
- ```vue
512
- <script setup lang="ts">
513
- // In Nuxt, composables, components, and Vue APIs are auto-imported
514
- // NO import statements needed for: ref, computed, watch, useRoute, etc.
515
-
516
- // 1. Props & Emits (type-based)
517
- interface Props {
518
- categoryFilter?: string
519
- }
520
-
521
- interface Emits {
522
- (e: 'select', item: MarketplaceItem): void
523
- }
524
-
525
- const props = withDefaults(defineProps<Props>(), {
526
- categoryFilter: undefined,
527
- })
528
-
529
- const emit = defineEmits<Emits>()
530
-
531
- // 2. Composables (auto-imported if in composables/ dir)
532
- const page = ref(1)
533
- const { items, totalPages, isLoading, isEmpty } = useMarketplaceList({
534
- page,
535
- })
536
-
537
- // 3. Local state
538
- const selectedId = ref<string | null>(null)
539
-
540
- // 4. Computed
541
- const isFirstPage = computed(() => page.value === 1)
542
-
543
- // 5. Handlers
544
- function handleSelect(item: MarketplaceItem) {
545
- selectedId.value = item.id
546
- emit('select', item)
547
- }
548
-
549
- function handlePageChange(newPage: number) {
550
- page.value = newPage
551
- }
552
- </script>
553
-
554
- <template>
555
- <!-- ... -->
556
- </template>
557
-
558
- <style scoped>
559
- /* ... */
560
- </style>
561
- ```
562
-
563
- ### 5.2 Stop Prop Drilling - Component Composition
564
-
565
- **WRONG - Prop Drilling:**
566
- ```vue
567
- <Parent :user="user" :theme="theme" :permissions="permissions">
568
- <Child :user="user" :theme="theme" :permissions="permissions">
569
- <GrandChild :user="user" :permissions="permissions" />
570
- </Child>
571
- </Parent>
572
- ```
573
-
574
- **CORRECT - Composition with Slots:**
575
- ```vue
576
- <!-- pages/marketplace/index.vue -->
577
- <template>
578
- <NuxtLayout>
579
- <MarketplaceFilters />
580
-
581
- <MarketplaceList @select="handleSelect">
582
- <template #card="{ item }">
583
- <MarketplaceCard :item="item" />
584
- </template>
585
-
586
- <template #empty>
587
- <EmptyState message="No items found" />
588
- </template>
589
- </MarketplaceList>
590
-
591
- <MarketplaceDetails v-if="selectedItem" :item="selectedItem" />
592
- </NuxtLayout>
593
- </template>
594
- ```
595
-
596
- **CORRECT - Provide/Inject for shared context:**
597
- ```typescript
598
- // composables/useMarketplaceContext.ts
599
- import type { InjectionKey, Ref } from 'vue'
600
-
601
- interface MarketplaceContext {
602
- selectedItem: Ref<MarketplaceItem | null>
603
- selectItem: (item: MarketplaceItem) => void
604
- clearSelection: () => void
605
- }
606
-
607
- export const MARKETPLACE_CONTEXT: InjectionKey<MarketplaceContext> = Symbol('marketplace-context')
608
-
609
- export function provideMarketplaceContext() {
610
- const selectedItem = ref<MarketplaceItem | null>(null)
611
-
612
- function selectItem(item: MarketplaceItem) {
613
- selectedItem.value = item
614
- }
615
-
616
- function clearSelection() {
617
- selectedItem.value = null
618
- }
619
-
620
- const context: MarketplaceContext = {
621
- selectedItem: readonly(selectedItem),
622
- selectItem,
623
- clearSelection,
624
- }
625
-
626
- provide(MARKETPLACE_CONTEXT, context)
627
- return context
628
- }
629
-
630
- export function useMarketplaceContext() {
631
- const context = inject(MARKETPLACE_CONTEXT)
632
- if (!context) {
633
- throw new Error('useMarketplaceContext must be used within a provider')
634
- }
635
- return context
636
- }
637
- ```
638
-
639
- ### 5.3 Component Hierarchy
640
-
641
- ```
642
- Pages (pages/) -> Composition, orchestration, provide context
643
- └── Layout -> Visual structure (slots)
644
- └── Features -> Feature logic (composables)
645
- └── Shared -> Pure presentation (props in, events out)
646
- ```
647
-
648
- | Type | Responsibility | Can have logic? | Can have state? |
649
- |------|---------------|----------------|----------------|
650
- | **Pages** | Compose components, provide context | Via composables | Yes (composables) |
651
- | **Feature Components** | UI + feature logic | Via composables | Yes (composables) |
652
- | **Shared Components** | Generic, reusable UI | Minimal (UI only) | Minimal (local) |
653
-
654
- ---
655
-
656
- ## 6. Utils vs Helpers
657
-
658
- ### Utils - Pure Functions
659
- - No side effects
660
- - Input -> Output deterministic
661
- - Testable without mocks
662
- - No dependency on DOM, browser APIs, or Vue
663
-
664
- ```typescript
665
- // shared/utils/format-date.ts
666
- export function formatDate(date: Date, locale = 'en-US'): string {
667
- return new Intl.DateTimeFormat(locale).format(date)
668
- }
669
-
670
- // shared/utils/currency.ts
671
- export function formatCurrency(value: number, currency = 'USD'): string {
672
- return new Intl.NumberFormat('en-US', { style: 'currency', currency }).format(value)
673
- }
674
- ```
675
-
676
- ### Helpers - Functions with Side Effects
677
- - Interact with browser APIs (clipboard, localStorage, DOM)
678
- - May have side effects
679
- - May need mocks in tests
680
-
681
- ```typescript
682
- // shared/helpers/clipboard-helper.ts
683
- export async function copyToClipboard(text: string): Promise<boolean> {
684
- try {
685
- await navigator.clipboard.writeText(text)
686
- return true
687
- } catch {
688
- return false
689
- }
690
- }
691
- ```
692
-
693
- ---
694
-
695
- ## 7. Error Handling - Centralized Pattern
696
-
697
- ### In Composables (useFetch / useAsyncData)
698
- ```typescript
699
- const { data, error } = await useFetch('/api/marketplace', {
700
- onResponseError({ response }) {
701
- showError({
702
- statusCode: response.status,
703
- statusMessage: response.statusText,
704
- })
705
- },
706
- })
707
- ```
708
-
709
- ### Global Error Page (error.vue)
710
- ```vue
711
- <!-- app/error.vue -->
712
- <script setup lang="ts">
713
- const props = defineProps<{
714
- error: {
715
- statusCode: number
716
- statusMessage: string
717
- message: string
718
- }
719
- }>()
720
-
721
- function handleClearError() {
722
- clearError({ redirect: '/' })
723
- }
724
- </script>
725
-
726
- <template>
727
- <div>
728
- <h1>{{ error.statusCode }}</h1>
729
- <p>{{ error.message }}</p>
730
- <button @click="handleClearError">Go home</button>
731
- </div>
732
- </template>
733
- ```
734
-
735
- ### Server Error Handling (Nitro)
736
- ```typescript
737
- // server/api/marketplace/[id].get.ts
738
- export default defineEventHandler(async (event) => {
739
- const id = getRouterParam(event, 'id')
740
-
741
- const item = await findMarketplaceItem(id)
742
- if (!item) {
743
- throw createError({
744
- statusCode: 404,
745
- statusMessage: 'Item not found',
746
- })
747
- }
748
-
749
- return item
750
- })
751
- ```
752
-
753
- ### Error Utilities
754
- - `useError()` - access current error in components
755
- - `showError()` - trigger the error page
756
- - `clearError()` - clear error and optionally redirect
757
- - `createError()` - create an error in server routes
758
-
759
- ---
760
-
761
- ## 8. Barrel Exports (index.ts)
762
-
763
- Due to auto-imports, barrel exports are less critical in Nuxt. However, for `modules/` (which are NOT auto-imported), each module exports its **public API**:
764
-
765
- ```typescript
766
- // modules/marketplace/index.ts
767
-
768
- // Components (for use in pages)
769
- export { default as MarketplaceList } from './components/MarketplaceList.vue'
770
- export { default as MarketplaceCard } from './components/MarketplaceCard.vue'
771
-
772
- // Types (for typing)
773
- export type { MarketplaceItem, MarketplaceList } from './types/marketplace.contracts'
774
-
775
- // DO NOT export:
776
- // - services (internal detail)
777
- // - adapters (internal detail)
778
- // - stores (use via composable)
779
- // - internal composables
780
- ```
781
-
782
- ---
783
-
784
- ## 9. SOLID Applied to Nuxt
785
-
786
- | Principle | Application in Nuxt |
787
- |-----------|---------------------|
788
- | **S**ingle Responsibility | 1 component = 1 responsibility. 1 composable = 1 domain. 1 server route = 1 operation. |
789
- | **O**pen/Closed | Components extensible via slots and props, not internal modification. |
790
- | **L**iskov Substitution | Shared components must work in any context without breaking. |
791
- | **I**nterface Segregation | Specific props, not generic objects. `<UserAvatar :src :alt>` not `<UserAvatar :user>`. |
792
- | **D**ependency Inversion | Composables depend on interfaces (types), not implementations. Services injected via composable. |
793
-
794
- ---
795
-
796
- ## 10. Migration Checklist (Nuxt 2 -> Nuxt 3)
797
-
798
- ### Nuxt Configuration
799
- - [ ] `nuxt.config.js` -> `nuxt.config.ts`
800
- - [ ] `buildModules` -> `modules` (no distinction in Nuxt 3)
801
- - [ ] `@nuxtjs/` modules -> Nuxt 3 compatible alternatives
802
-
803
- ### Data Fetching
804
- - [ ] `asyncData()` -> `useAsyncData()`
805
- - [ ] `fetch()` -> `useFetch()`
806
- - [ ] `$axios` / `@nuxtjs/axios` -> `$fetch` (built-in)
807
-
808
- ### State Management
809
- - [ ] `store/` (Vuex) -> `composables/` + `useState` or Pinia
810
- - [ ] Vuex modules -> Pinia stores (setup syntax)
811
-
812
- ### Components
813
- - [ ] Options API -> `<script setup lang="ts">`
814
- - [ ] `this.$route` -> `useRoute()`
815
- - [ ] `this.$router` -> `useRouter()`
816
- - [ ] `this.$store` -> composables / Pinia
817
- - [ ] `this.$refs` -> `useTemplateRef()`
818
-
819
- ### Plugins
820
- - [ ] `plugins/*.js` -> `plugins/*.ts`
821
- - [ ] `inject()` pattern -> `provide()` + composables
822
- - [ ] `context` parameter -> `useNuxtApp()`, `useRuntimeConfig()`
823
-
824
- ### Middleware
825
- - [ ] `middleware/*.js` -> `middleware/*.ts`
826
- - [ ] `context` parameter -> `navigateTo()`, `abortNavigation()`
827
-
828
- ### File Structure
829
- - [ ] `static/` -> `public/`
830
- - [ ] `store/` -> composables or Pinia
831
- - [ ] Manual imports -> auto-imports (composables/, components/, utils/)