@kood/claude-code 0.3.7 → 0.3.8

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 (120) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +1 -1
  3. package/templates/.claude/agents/code-reviewer.md +124 -124
  4. package/templates/.claude/agents/dependency-manager.md +85 -85
  5. package/templates/.claude/agents/deployment-validator.md +56 -56
  6. package/templates/.claude/agents/git-operator.md +64 -64
  7. package/templates/.claude/agents/implementation-executor.md +95 -95
  8. package/templates/.claude/agents/ko-to-en-translator.md +74 -0
  9. package/templates/.claude/agents/lint-fixer.md +78 -78
  10. package/templates/.claude/agents/refactor-advisor.md +122 -122
  11. package/templates/.claude/commands/agent-creator.md +185 -185
  12. package/templates/.claude/commands/bug-fix.md +193 -193
  13. package/templates/.claude/commands/command-creator.md +54 -54
  14. package/templates/.claude/commands/docs-creator.md +57 -57
  15. package/templates/.claude/commands/docs-refactor.md +26 -26
  16. package/templates/.claude/commands/execute.md +12 -12
  17. package/templates/.claude/commands/git-all.md +32 -32
  18. package/templates/.claude/commands/git-session.md +42 -42
  19. package/templates/.claude/commands/git.md +34 -34
  20. package/templates/.claude/commands/lint-fix.md +138 -138
  21. package/templates/.claude/commands/lint-init.md +61 -61
  22. package/templates/.claude/commands/plan.md +260 -260
  23. package/templates/.claude/commands/prd.md +24 -24
  24. package/templates/.claude/commands/pre-deploy.md +109 -109
  25. package/templates/.claude/commands/refactor.md +147 -147
  26. package/templates/.claude/commands/version-update.md +17 -17
  27. package/templates/hono/CLAUDE.md +27 -27
  28. package/templates/hono/docs/architecture.md +24 -24
  29. package/templates/hono/docs/deployment/cloudflare.md +18 -18
  30. package/templates/hono/docs/deployment/docker.md +13 -13
  31. package/templates/hono/docs/deployment/index.md +19 -19
  32. package/templates/hono/docs/deployment/railway.md +32 -32
  33. package/templates/hono/docs/deployment/vercel.md +29 -29
  34. package/templates/hono/docs/guides/conventions.md +57 -57
  35. package/templates/hono/docs/guides/env-setup.md +47 -47
  36. package/templates/hono/docs/guides/getting-started.md +27 -27
  37. package/templates/hono/docs/library/hono/error-handling.md +11 -11
  38. package/templates/hono/docs/library/hono/index.md +4 -4
  39. package/templates/hono/docs/library/hono/middleware.md +18 -18
  40. package/templates/hono/docs/library/hono/rpc.md +7 -7
  41. package/templates/hono/docs/library/hono/validation.md +6 -6
  42. package/templates/hono/docs/library/prisma/cloudflare-d1.md +29 -29
  43. package/templates/hono/docs/library/prisma/config.md +16 -16
  44. package/templates/hono/docs/library/prisma/index.md +32 -32
  45. package/templates/hono/docs/library/t3-env/index.md +22 -22
  46. package/templates/hono/docs/library/zod/index.md +31 -31
  47. package/templates/nextjs/CLAUDE.md +51 -51
  48. package/templates/nextjs/docs/design.md +183 -183
  49. package/templates/nextjs/docs/guides/conventions.md +86 -86
  50. package/templates/nextjs/docs/guides/getting-started.md +28 -28
  51. package/templates/nextjs/docs/guides/routes.md +32 -32
  52. package/templates/nextjs/docs/library/better-auth/index.md +70 -70
  53. package/templates/nextjs/docs/library/nextjs/app-router.md +43 -43
  54. package/templates/nextjs/docs/library/nextjs/caching.md +73 -73
  55. package/templates/nextjs/docs/library/nextjs/index.md +51 -51
  56. package/templates/nextjs/docs/library/nextjs/middleware.md +41 -41
  57. package/templates/nextjs/docs/library/nextjs/route-handlers.md +31 -31
  58. package/templates/nextjs/docs/library/nextjs/server-actions.md +34 -34
  59. package/templates/nextjs/docs/library/prisma/cloudflare-d1.md +20 -20
  60. package/templates/nextjs/docs/library/prisma/config.md +18 -18
  61. package/templates/nextjs/docs/library/prisma/crud.md +17 -17
  62. package/templates/nextjs/docs/library/prisma/index.md +18 -18
  63. package/templates/nextjs/docs/library/prisma/relations.md +16 -16
  64. package/templates/nextjs/docs/library/prisma/schema.md +23 -23
  65. package/templates/nextjs/docs/library/prisma/setup.md +6 -6
  66. package/templates/nextjs/docs/library/prisma/transactions.md +10 -10
  67. package/templates/nextjs/docs/library/tanstack-query/index.md +6 -6
  68. package/templates/nextjs/docs/library/tanstack-query/invalidation.md +20 -20
  69. package/templates/nextjs/docs/library/tanstack-query/optimistic-updates.md +4 -4
  70. package/templates/nextjs/docs/library/tanstack-query/use-mutation.md +15 -15
  71. package/templates/nextjs/docs/library/tanstack-query/use-query.md +22 -22
  72. package/templates/nextjs/docs/library/zod/complex-types.md +11 -11
  73. package/templates/nextjs/docs/library/zod/index.md +8 -8
  74. package/templates/nextjs/docs/library/zod/transforms.md +11 -11
  75. package/templates/nextjs/docs/library/zod/validation.md +9 -9
  76. package/templates/npx/CLAUDE.md +37 -37
  77. package/templates/npx/docs/library/commander/index.md +12 -12
  78. package/templates/npx/docs/library/fs-extra/index.md +9 -9
  79. package/templates/npx/docs/library/prompts/index.md +3 -3
  80. package/templates/npx/docs/references/patterns.md +12 -12
  81. package/templates/tanstack-start/CLAUDE.md +53 -53
  82. package/templates/tanstack-start/docs/architecture.md +128 -128
  83. package/templates/tanstack-start/docs/design.md +169 -169
  84. package/templates/tanstack-start/docs/guides/conventions.md +43 -43
  85. package/templates/tanstack-start/docs/guides/env-setup.md +35 -35
  86. package/templates/tanstack-start/docs/guides/getting-started.md +19 -19
  87. package/templates/tanstack-start/docs/guides/hooks.md +45 -45
  88. package/templates/tanstack-start/docs/guides/routes.md +54 -54
  89. package/templates/tanstack-start/docs/guides/services.md +45 -45
  90. package/templates/tanstack-start/docs/library/better-auth/index.md +68 -68
  91. package/templates/tanstack-start/docs/library/prisma/cloudflare-d1.md +19 -19
  92. package/templates/tanstack-start/docs/library/prisma/config.md +16 -16
  93. package/templates/tanstack-start/docs/library/prisma/crud.md +17 -17
  94. package/templates/tanstack-start/docs/library/prisma/index.md +17 -17
  95. package/templates/tanstack-start/docs/library/prisma/relations.md +16 -16
  96. package/templates/tanstack-start/docs/library/prisma/schema.md +23 -23
  97. package/templates/tanstack-start/docs/library/prisma/setup.md +6 -6
  98. package/templates/tanstack-start/docs/library/prisma/transactions.md +10 -10
  99. package/templates/tanstack-start/docs/library/t3-env/index.md +21 -160
  100. package/templates/tanstack-start/docs/library/tanstack-query/index.md +6 -6
  101. package/templates/tanstack-start/docs/library/tanstack-query/invalidation.md +19 -19
  102. package/templates/tanstack-start/docs/library/tanstack-query/optimistic-updates.md +4 -4
  103. package/templates/tanstack-start/docs/library/tanstack-query/use-mutation.md +14 -14
  104. package/templates/tanstack-start/docs/library/tanstack-query/use-query.md +21 -21
  105. package/templates/tanstack-start/docs/library/tanstack-router/error-handling.md +9 -9
  106. package/templates/tanstack-start/docs/library/tanstack-router/hooks.md +11 -11
  107. package/templates/tanstack-start/docs/library/tanstack-router/index.md +18 -18
  108. package/templates/tanstack-start/docs/library/tanstack-router/navigation.md +17 -17
  109. package/templates/tanstack-start/docs/library/tanstack-router/route-context.md +5 -5
  110. package/templates/tanstack-start/docs/library/tanstack-router/search-params.md +10 -10
  111. package/templates/tanstack-start/docs/library/tanstack-start/auth-patterns.md +8 -8
  112. package/templates/tanstack-start/docs/library/tanstack-start/index.md +15 -15
  113. package/templates/tanstack-start/docs/library/tanstack-start/middleware.md +9 -9
  114. package/templates/tanstack-start/docs/library/tanstack-start/routing.md +6 -6
  115. package/templates/tanstack-start/docs/library/tanstack-start/server-functions.md +18 -18
  116. package/templates/tanstack-start/docs/library/tanstack-start/setup.md +4 -4
  117. package/templates/tanstack-start/docs/library/zod/complex-types.md +11 -11
  118. package/templates/tanstack-start/docs/library/zod/index.md +8 -8
  119. package/templates/tanstack-start/docs/library/zod/transforms.md +11 -11
  120. package/templates/tanstack-start/docs/library/zod/validation.md +9 -9
@@ -1,6 +1,6 @@
1
- # 라우트 구조
1
+ # Route Structure
2
2
 
3
- > TanStack Start 파일 기반 라우팅
3
+ > TanStack Start File-Based Routing
4
4
 
5
5
  <instructions>
6
6
  @../library/tanstack-router/index.md
@@ -10,7 +10,7 @@
10
10
 
11
11
  <route_structure>
12
12
 
13
- ## 라우트 폴더 구조
13
+ ## Route Folder Structure
14
14
 
15
15
  ```
16
16
  routes/
@@ -19,28 +19,28 @@ routes/
19
19
  ├── users/
20
20
  │ ├── index.tsx # /users (List)
21
21
  │ ├── $id.tsx # /users/:id (Detail)
22
- │ ├── -components/ # 페이지 전용 컴포넌트 (필수)
23
- │ ├── -hooks/ # 페이지 전용 Hook (필수)
24
- │ ├── -functions/ # 페이지 전용 Server Functions (필수)
25
- │ └── -sections/ # 섹션 분리 (선택, 복잡한 경우만)
22
+ │ ├── -components/ # Page-specific components (required)
23
+ │ ├── -hooks/ # Page-specific Hooks (required)
24
+ │ ├── -functions/ # Page-specific Server Functions (required)
25
+ │ └── -sections/ # Section separation (optional, complex pages only)
26
26
  └── posts/
27
27
  ├── index.tsx
28
28
  ├── $slug.tsx
29
- ├── -components/ # 필수
30
- ├── -hooks/ # 필수
31
- └── -functions/ # 필수
29
+ ├── -components/ # Required
30
+ ├── -hooks/ # Required
31
+ └── -functions/ # Required
32
32
  ```
33
33
 
34
- | 접두사 | 용도 | 라우트 생성 |
35
- |--------|------|-----------|
36
- | `-` | 라우트 제외 폴더 | ❌ 제외 |
37
- | `$` | 동적 파라미터 | ✅ 생성 |
38
- | `_` | Pathless Layout | ✅ 생성 (경로 없음) |
34
+ | Prefix | Purpose | Route Generation |
35
+ |--------|---------|------------------|
36
+ | `-` | Exclude from routes | ❌ Excluded |
37
+ | `$` | Dynamic parameters | ✅ Generated |
38
+ | `_` | Pathless Layout | ✅ Generated (no path) |
39
39
 
40
- **⚠️ 필수 규칙:**
41
- - 모든 페이지에 `-components/`, `-hooks/`, `-functions/` 폴더 **필수**
42
- - 페이지 크기(줄 수)와 **무관**하게 Custom Hook은 반드시 `-hooks/` 폴더에 분리
43
- - `-sections/`는 200줄 이상 복잡한 페이지에서만 선택적 사용
40
+ **⚠️ Required Rules:**
41
+ - All pages must have `-components/`, `-hooks/`, `-functions/` folders
42
+ - Custom Hooks must always be separated into `-hooks/` folder regardless of page size
43
+ - `-sections/` is optional, use only for complex pages (200+ lines)
44
44
 
45
45
  </route_structure>
46
46
 
@@ -48,17 +48,17 @@ routes/
48
48
 
49
49
  <file_naming>
50
50
 
51
- ## 라우트 파일명 규칙
51
+ ## Route File Naming Rules
52
52
 
53
- | 경로 | 파일명 | 설명 |
54
- |------|--------|------|
55
- | `/` | `index.tsx` | 인덱스 라우트 |
56
- | `/users` | `users/index.tsx` | 목록 페이지 |
57
- | `/users/:id` | `users/$id.tsx` | 동적 파라미터 |
58
- | `/posts/:slug` | `posts/$slug.tsx` | URL 파라미터 |
59
- | `/dashboard/*` | `dashboard/$.tsx` | Catch-all 라우트 |
60
- | Layout | `__root.tsx` | Root 레이아웃 |
61
- | Pathless | `_layout.tsx` | 경로 없는 레이아웃 |
53
+ | Path | Filename | Description |
54
+ |------|----------|-------------|
55
+ | `/` | `index.tsx` | Index route |
56
+ | `/users` | `users/index.tsx` | List page |
57
+ | `/users/:id` | `users/$id.tsx` | Dynamic parameter |
58
+ | `/posts/:slug` | `posts/$slug.tsx` | URL parameter |
59
+ | `/dashboard/*` | `dashboard/$.tsx` | Catch-all route |
60
+ | Layout | `__root.tsx` | Root layout |
61
+ | Pathless | `_layout.tsx` | Pathless layout |
62
62
 
63
63
  </file_naming>
64
64
 
@@ -66,7 +66,7 @@ routes/
66
66
 
67
67
  <patterns>
68
68
 
69
- ## 기본 라우트 패턴
69
+ ## Basic Route Pattern
70
70
 
71
71
  ```tsx
72
72
  // routes/users/index.tsx
@@ -89,7 +89,7 @@ const UsersPage = (): JSX.Element => {
89
89
  }
90
90
  ```
91
91
 
92
- ## 동적 라우트 + Loader
92
+ ## Dynamic Route + Loader
93
93
 
94
94
  ```tsx
95
95
  // routes/users/$id.tsx
@@ -188,7 +188,7 @@ const DashboardPage = (): JSX.Element => {
188
188
  }
189
189
  ```
190
190
 
191
- ## Section 패턴
191
+ ## Section Pattern
192
192
 
193
193
  ```tsx
194
194
  // routes/users/-sections/user-list-section.tsx
@@ -217,7 +217,7 @@ export const UserListSection = (): JSX.Element => {
217
217
  }
218
218
  ```
219
219
 
220
- ## 컴포넌트 패턴
220
+ ## Component Pattern
221
221
 
222
222
  ```tsx
223
223
  // routes/users/-components/user-card.tsx
@@ -268,21 +268,21 @@ export const UserCard = ({
268
268
 
269
269
  <folder_structure_rules>
270
270
 
271
- ## 폴더 구조 규칙
271
+ ## Folder Structure Rules
272
272
 
273
- **⚠️ 모든 페이지에 필수:**
274
- - `-components/`: 페이지 전용 컴포넌트
275
- - `-hooks/`: 페이지 전용 Custom Hook ( 무관)
276
- - `-functions/`: 페이지 전용 Server Functions
273
+ **⚠️ Required for All Pages:**
274
+ - `-components/`: Page-specific components
275
+ - `-hooks/`: Page-specific Custom Hooks (regardless of line count)
276
+ - `-functions/`: Page-specific Server Functions
277
277
 
278
- **선택적 사용:**
279
- - `-sections/`: 200줄+ 복잡한 페이지에서만 사용
278
+ **Optional:**
279
+ - `-sections/`: Use only for complex pages (200+ lines)
280
280
 
281
- | 페이지 크기 | 필수 | 선택 |
282
- |------------|------|------|
283
- | ~100 | `-components/`, `-hooks/`, `-functions/` | - |
284
- | 100-200 | `-components/`, `-hooks/`, `-functions/` | - |
285
- | 200줄+ | `-components/`, `-hooks/`, `-functions/` | `-sections/` |
281
+ | Page Size | Required | Optional |
282
+ |-----------|----------|----------|
283
+ | ~100 lines | `-components/`, `-hooks/`, `-functions/` | - |
284
+ | 100-200 lines | `-components/`, `-hooks/`, `-functions/` | - |
285
+ | 200+ lines | `-components/`, `-hooks/`, `-functions/` | `-sections/` |
286
286
 
287
287
  </folder_structure_rules>
288
288
 
@@ -290,23 +290,23 @@ export const UserCard = ({
290
290
 
291
291
  <loader_execution>
292
292
 
293
- ## Loader 실행 순서
293
+ ## Loader Execution Order
294
294
 
295
- | 단계 | 실행 방식 | 설명 |
296
- |------|----------|------|
297
- | 1. `beforeLoad` | 순차 (outermost → innermost) | 인증 체크, 컨텍스트 설정 |
298
- | 2. `loader` | 병렬 (모든 loader 동시) | 데이터 페칭 |
295
+ | Step | Execution | Description |
296
+ |------|-----------|-------------|
297
+ | 1. `beforeLoad` | Sequential (outermost → innermost) | Auth check, context setup |
298
+ | 2. `loader` | Parallel (all loaders simultaneously) | Data fetching |
299
299
 
300
300
  ```tsx
301
301
  // Parent Route
302
302
  export const Route = createFileRoute('/dashboard')({
303
303
  beforeLoad: async () => {
304
- // 1. 먼저 실행 (순차)
304
+ // 1. Runs first (sequential)
305
305
  const auth = await checkAuth()
306
306
  return { auth }
307
307
  },
308
308
  loader: async () => {
309
- // 2. 나중에 실행 (병렬)
309
+ // 2. Runs later (parallel)
310
310
  return getDashboardData()
311
311
  },
312
312
  })
@@ -314,11 +314,11 @@ export const Route = createFileRoute('/dashboard')({
314
314
  // Child Route
315
315
  export const Route = createFileRoute('/dashboard/users')({
316
316
  beforeLoad: async () => {
317
- // 1. Parent beforeLoad 다음 실행
317
+ // 1. Runs after Parent beforeLoad
318
318
  return {}
319
319
  },
320
320
  loader: async () => {
321
- // 2. Parent loader와 병렬 실행
321
+ // 2. Runs in parallel with Parent loader
322
322
  return getUsers()
323
323
  },
324
324
  })
@@ -1,6 +1,6 @@
1
1
  # Server Functions
2
2
 
3
- > TanStack Start 데이터 레이어 (Server Functions)
3
+ > TanStack Start Data Layer (Server Functions)
4
4
 
5
5
  <instructions>
6
6
  @../library/tanstack-start/index.md
@@ -10,15 +10,15 @@
10
10
 
11
11
  <api_naming>
12
12
 
13
- ## API 이름 (중요)
13
+ ## API Names (Important)
14
14
 
15
- | ✅ 올바른 API | ❌ 잘못된 API | 설명 |
16
- |-------------|-------------|------|
17
- | `.inputValidator()` | ~~`.validator()`~~ | TanStack Start `inputValidator`만 지원 |
18
- | `.middleware()` | - | Middleware 체이닝 |
19
- | `.handler()` | - | 최종 handler 함수 |
15
+ | ✅ Correct API | ❌ Incorrect API | Description |
16
+ |----------------|------------------|-------------|
17
+ | `.inputValidator()` | ~~`.validator()`~~ | TanStack Start only supports `inputValidator` |
18
+ | `.middleware()` | - | Middleware chaining |
19
+ | `.handler()` | - | Final handler function |
20
20
 
21
- **주의:** `validator`는 존재하지 않는 API입니다. 반드시 `inputValidator`를 사용하세요.
21
+ **Note:** `validator` does not exist. Always use `inputValidator`.
22
22
 
23
23
  </api_naming>
24
24
 
@@ -26,15 +26,15 @@
26
26
 
27
27
  <folder_structure>
28
28
 
29
- ## 서비스 폴더 구조
29
+ ## Service Folder Structure
30
30
 
31
31
  ```
32
32
  services/
33
33
  ├── user/
34
- │ ├── index.ts # 진입점 (re-export)
35
- │ ├── schemas.ts # Zod 스키마
36
- │ ├── queries.ts # GET (읽기)
37
- │ └── mutations.ts # POST (쓰기)
34
+ │ ├── index.ts # Entry point (re-export)
35
+ │ ├── schemas.ts # Zod schemas
36
+ │ ├── queries.ts # GET (read)
37
+ │ └── mutations.ts # POST (write)
38
38
  ├── auth/
39
39
  │ ├── index.ts
40
40
  │ ├── schemas.ts
@@ -47,12 +47,12 @@ services/
47
47
  └── mutations.ts
48
48
  ```
49
49
 
50
- | 파일 | 용도 |
51
- |------|------|
52
- | `index.ts` | 모든 함수 re-export |
53
- | `schemas.ts` | Zod 검증 스키마 |
54
- | `queries.ts` | GET 요청 (읽기) |
55
- | `mutations.ts` | POST/PUT/DELETE (쓰기) |
50
+ | File | Purpose |
51
+ |------|---------|
52
+ | `index.ts` | Re-export all functions |
53
+ | `schemas.ts` | Zod validation schemas |
54
+ | `queries.ts` | GET requests (read) |
55
+ | `mutations.ts` | POST/PUT/DELETE (write) |
56
56
 
57
57
  </folder_structure>
58
58
 
@@ -60,7 +60,7 @@ services/
60
60
 
61
61
  <patterns>
62
62
 
63
- ## Schemas 파일
63
+ ## Schemas File
64
64
 
65
65
  ```typescript
66
66
  // services/user/schemas.ts
@@ -81,7 +81,7 @@ export type CreateUserInput = z.infer<typeof createUserSchema>
81
81
  export type UpdateUserInput = z.infer<typeof updateUserSchema>
82
82
  ```
83
83
 
84
- ## Queries 파일 (GET)
84
+ ## Queries File (GET)
85
85
 
86
86
  ```typescript
87
87
  // services/user/queries.ts
@@ -108,7 +108,7 @@ export const getUserByEmail = createServerFn({ method: 'GET' })
108
108
  })
109
109
  ```
110
110
 
111
- ## Mutations 파일 (POST)
111
+ ## Mutations File (POST)
112
112
 
113
113
  ```typescript
114
114
  // services/user/mutations.ts
@@ -135,7 +135,7 @@ export const deleteUser = createServerFn({ method: 'POST' })
135
135
  })
136
136
  ```
137
137
 
138
- ## 진입점 파일
138
+ ## Entry Point File
139
139
 
140
140
  ```typescript
141
141
  // services/user/index.ts
@@ -144,7 +144,7 @@ export * from './queries'
144
144
  export * from './mutations'
145
145
  ```
146
146
 
147
- ## Database 파일
147
+ ## Database File
148
148
 
149
149
  ```typescript
150
150
  // database/prisma.ts
@@ -171,7 +171,7 @@ if (process.env.NODE_ENV !== 'production') {
171
171
 
172
172
  <middleware>
173
173
 
174
- ## Middleware 패턴
174
+ ## Middleware Pattern
175
175
 
176
176
  ```typescript
177
177
  // middleware/auth.ts
@@ -234,7 +234,7 @@ export const deleteUser = createServerFn({ method: 'POST' })
234
234
 
235
235
  <usage>
236
236
 
237
- ## TanStack Query 연동
237
+ ## TanStack Query Integration
238
238
 
239
239
  ```typescript
240
240
  // routes/users/-hooks/use-users.ts
@@ -274,7 +274,7 @@ export const useUsers = () => {
274
274
  }
275
275
  ```
276
276
 
277
- ## Form 연동
277
+ ## Form Integration
278
278
 
279
279
  ```tsx
280
280
  // routes/users/-components/create-user-form.tsx
@@ -331,23 +331,23 @@ export const CreateUserForm = (): JSX.Element => {
331
331
 
332
332
  <method_chaining>
333
333
 
334
- ## Method Chaining 순서
334
+ ## Method Chaining Order
335
335
 
336
336
  ```typescript
337
- // ✅ 올바른 순서
337
+ // ✅ Correct order
338
338
  createServerFn({ method: 'POST' })
339
- .middleware([authMiddleware]) // 1. middleware (선택)
340
- .inputValidator(createUserSchema) // 2. inputValidator (선택)
341
- .handler(async ({ data }) => {}) // 3. handler (필수)
339
+ .middleware([authMiddleware]) // 1. middleware (optional)
340
+ .inputValidator(createUserSchema) // 2. inputValidator (optional)
341
+ .handler(async ({ data }) => {}) // 3. handler (required)
342
342
 
343
- // ❌ 잘못된 순서 (TypeScript 에러)
343
+ // ❌ Wrong order (TypeScript error)
344
344
  createServerFn({ method: 'POST' })
345
- .handler(async () => {}) // ❌ handler 먼저
346
- .inputValidator(schema) // ❌ inputValidator 나중에
345
+ .handler(async () => {}) // ❌ handler first
346
+ .inputValidator(schema) // ❌ inputValidator after
347
347
 
348
- // ❌ 잘못된 API 이름 (존재하지 않음)
348
+ // ❌ Wrong API name (does not exist)
349
349
  createServerFn({ method: 'POST' })
350
- .validator(schema) // ❌ validator 없음! inputValidator 사용
350
+ .validator(schema) // ❌ validator doesn't exist! Use inputValidator
351
351
  .handler(async ({ data }) => {})
352
352
  ```
353
353
 
@@ -357,14 +357,14 @@ createServerFn({ method: 'POST' })
357
357
 
358
358
  <best_practices>
359
359
 
360
- | 원칙 | 설명 |
361
- |------|------|
362
- | **파일 분리** | schemas, queries, mutations 분리 필수 |
363
- | **진입점** | index.ts에서 모든 함수 re-export |
364
- | **Validation** | POST/PUT/DELETE inputValidator 필수 |
365
- | **Middleware** | 인증/권한은 middleware 사용 |
366
- | **TanStack Query** | 클라이언트에서 직접 호출 금지, Query/Mutation 사용 |
367
- | **에러 처리** | 명확한 에러 메시지 throw |
360
+ | Principle | Description |
361
+ |-----------|-------------|
362
+ | **File Separation** | Separate schemas, queries, mutations required |
363
+ | **Entry Point** | Re-export all functions in index.ts |
364
+ | **Validation** | inputValidator required for POST/PUT/DELETE |
365
+ | **Middleware** | Use middleware for auth/permissions |
366
+ | **TanStack Query** | Never call directly from client, use Query/Mutation |
367
+ | **Error Handling** | Throw clear error messages |
368
368
 
369
369
  </best_practices>
370
370