@kood/claude-code 0.1.7 → 0.1.9
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.
- package/dist/index.js +118 -3
- package/package.json +8 -2
- package/templates/hono/CLAUDE.md +53 -326
- package/templates/hono/docs/architecture/architecture.md +93 -747
- package/templates/hono/docs/deployment/cloudflare.md +59 -513
- package/templates/hono/docs/deployment/docker.md +41 -356
- package/templates/hono/docs/deployment/index.md +49 -190
- package/templates/hono/docs/deployment/railway.md +36 -306
- package/templates/hono/docs/deployment/vercel.md +49 -434
- package/templates/hono/docs/library/ai-sdk/index.md +53 -290
- package/templates/hono/docs/library/ai-sdk/openrouter.md +19 -387
- package/templates/hono/docs/library/ai-sdk/providers.md +28 -394
- package/templates/hono/docs/library/ai-sdk/streaming.md +52 -353
- package/templates/hono/docs/library/ai-sdk/structured-output.md +63 -395
- package/templates/hono/docs/library/ai-sdk/tools.md +62 -431
- package/templates/hono/docs/library/hono/env-setup.md +24 -313
- package/templates/hono/docs/library/hono/error-handling.md +34 -295
- package/templates/hono/docs/library/hono/index.md +24 -122
- package/templates/hono/docs/library/hono/middleware.md +21 -188
- package/templates/hono/docs/library/hono/rpc.md +40 -341
- package/templates/hono/docs/library/hono/validation.md +35 -195
- package/templates/hono/docs/library/pino/index.md +42 -333
- package/templates/hono/docs/library/prisma/cloudflare-d1.md +64 -367
- package/templates/hono/docs/library/prisma/config.md +19 -260
- package/templates/hono/docs/library/prisma/index.md +64 -320
- package/templates/hono/docs/library/zod/index.md +53 -257
- package/templates/npx/CLAUDE.md +58 -276
- package/templates/npx/docs/references/patterns.md +160 -0
- package/templates/tanstack-start/CLAUDE.md +0 -4
- package/templates/tanstack-start/docs/architecture/architecture.md +44 -589
- package/templates/tanstack-start/docs/design/index.md +119 -12
- package/templates/tanstack-start/docs/guides/conventions.md +103 -0
- package/templates/tanstack-start/docs/guides/env-setup.md +34 -340
- package/templates/tanstack-start/docs/guides/getting-started.md +22 -209
- package/templates/tanstack-start/docs/guides/hooks.md +166 -0
- package/templates/tanstack-start/docs/guides/routes.md +166 -0
- package/templates/tanstack-start/docs/guides/services.md +143 -0
- package/templates/tanstack-start/docs/library/tanstack-query/index.md +18 -2
- package/templates/tanstack-start/docs/library/zod/index.md +16 -1
- package/templates/tanstack-start/docs/design/accessibility.md +0 -163
- package/templates/tanstack-start/docs/design/color.md +0 -93
- package/templates/tanstack-start/docs/design/spacing.md +0 -122
- package/templates/tanstack-start/docs/design/typography.md +0 -80
- package/templates/tanstack-start/docs/guides/best-practices.md +0 -950
- package/templates/tanstack-start/docs/guides/husky-lint-staged.md +0 -303
- package/templates/tanstack-start/docs/guides/prettier.md +0 -189
- package/templates/tanstack-start/docs/guides/project-templates.md +0 -710
- package/templates/tanstack-start/docs/library/tanstack-query/setup.md +0 -48
- package/templates/tanstack-start/docs/library/zod/basic-types.md +0 -74
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
# UI/UX 디자인 가이드
|
|
2
2
|
|
|
3
|
-
> TanStack Start + Tailwind CSS
|
|
3
|
+
> TanStack Start + Tailwind CSS v4
|
|
4
4
|
|
|
5
|
-
@color.md
|
|
6
|
-
@typography.md
|
|
7
|
-
@spacing.md
|
|
8
5
|
@components.md
|
|
9
|
-
@accessibility.md
|
|
10
6
|
@safe-area.md
|
|
11
7
|
@tailwind-setup.md
|
|
12
8
|
|
|
@@ -23,22 +19,133 @@
|
|
|
23
19
|
|
|
24
20
|
---
|
|
25
21
|
|
|
26
|
-
##
|
|
22
|
+
## 색상 (60-30-10 규칙)
|
|
27
23
|
|
|
28
|
-
### 색상 (60-30-10)
|
|
29
24
|
```
|
|
30
25
|
60% - 배경색 (중립색)
|
|
31
26
|
30% - 보조색 (카드, 섹션)
|
|
32
27
|
10% - 강조색 (버튼, CTA)
|
|
33
28
|
```
|
|
34
29
|
|
|
35
|
-
###
|
|
30
|
+
### 의미론적 색상
|
|
31
|
+
|
|
32
|
+
| 색상 | 의미 | Tailwind |
|
|
33
|
+
|------|------|----------|
|
|
34
|
+
| 🟢 Green | 성공 | `text-green-600` |
|
|
35
|
+
| 🔴 Red | 오류 | `text-red-600` |
|
|
36
|
+
| 🟡 Yellow | 경고 | `text-yellow-600` |
|
|
37
|
+
| 🔵 Blue | 정보 | `text-blue-600` |
|
|
38
|
+
|
|
39
|
+
### 다크 모드 매핑
|
|
40
|
+
|
|
36
41
|
```
|
|
37
|
-
|
|
38
|
-
|
|
42
|
+
라이트 ←→ 다크
|
|
43
|
+
bg-white ←→ bg-gray-900
|
|
44
|
+
bg-gray-50 ←→ bg-gray-800
|
|
45
|
+
text-gray-900 ←→ text-white
|
|
46
|
+
text-gray-600 ←→ text-gray-300
|
|
39
47
|
```
|
|
40
48
|
|
|
41
|
-
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## 폰트
|
|
52
|
+
|
|
53
|
+
| 폰트 | 용도 |
|
|
54
|
+
|------|------|
|
|
55
|
+
| Pretendard | 한글 (권장) |
|
|
56
|
+
| Inter | 영문 |
|
|
57
|
+
| JetBrains Mono | 코드 |
|
|
58
|
+
|
|
59
|
+
### 크기
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
text-4xl 36px h1
|
|
63
|
+
text-2xl 24px h2, h3
|
|
64
|
+
text-base 16px 본문
|
|
65
|
+
text-sm 14px 보조 텍스트
|
|
42
66
|
```
|
|
43
|
-
|
|
67
|
+
|
|
68
|
+
### Tailwind 설정
|
|
69
|
+
|
|
70
|
+
```css
|
|
71
|
+
@theme {
|
|
72
|
+
--font-sans: "Pretendard", "Inter", system-ui, sans-serif;
|
|
73
|
+
--font-mono: "JetBrains Mono", monospace;
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## 간격 (8px 그리드)
|
|
80
|
+
|
|
81
|
+
| 용도 | Tailwind | 크기 |
|
|
82
|
+
|------|----------|------|
|
|
83
|
+
| 아이콘-텍스트 | gap-1 | 4px |
|
|
84
|
+
| 인라인 요소 | gap-2 | 8px |
|
|
85
|
+
| 카드 내부 | p-4 | 16px |
|
|
86
|
+
| 카드 간격 | gap-6 | 24px |
|
|
87
|
+
| 섹션 간격 | py-12 | 48px |
|
|
88
|
+
|
|
89
|
+
### 컨테이너
|
|
90
|
+
|
|
44
91
|
```
|
|
92
|
+
max-w-md 448px 폼
|
|
93
|
+
max-w-lg 512px 모달
|
|
94
|
+
max-w-3xl 768px 블로그
|
|
95
|
+
max-w-7xl 1280px 대시보드
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## 접근성 (WCAG AA)
|
|
101
|
+
|
|
102
|
+
### 색상 대비
|
|
103
|
+
|
|
104
|
+
| 기준 | 최소 대비 | 적용 대상 |
|
|
105
|
+
|------|----------|----------|
|
|
106
|
+
| AA | 4.5:1 | 일반 텍스트 |
|
|
107
|
+
| AA (큰 텍스트) | 3:1 | 18px 이상 |
|
|
108
|
+
|
|
109
|
+
```tsx
|
|
110
|
+
// ❌ 색상만으로 구분
|
|
111
|
+
<span className="text-red-600">오류</span>
|
|
112
|
+
|
|
113
|
+
// ✅ 아이콘/텍스트 병행
|
|
114
|
+
<span className="text-red-600 flex items-center gap-1">
|
|
115
|
+
<XCircleIcon className="w-4 h-4" />
|
|
116
|
+
오류가 발생했습니다
|
|
117
|
+
</span>
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### 키보드
|
|
121
|
+
|
|
122
|
+
```tsx
|
|
123
|
+
// ✅ 명확한 포커스 스타일
|
|
124
|
+
<button className="focus:ring-2 focus:ring-blue-500 focus:ring-offset-2">
|
|
125
|
+
|
|
126
|
+
// ❌ 포커스 제거 금지
|
|
127
|
+
<button className="outline-none focus:outline-none">
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### 폼
|
|
131
|
+
|
|
132
|
+
```tsx
|
|
133
|
+
<label htmlFor="email">이메일</label>
|
|
134
|
+
<input
|
|
135
|
+
id="email"
|
|
136
|
+
required
|
|
137
|
+
aria-invalid={hasError}
|
|
138
|
+
aria-describedby={hasError ? "email-error" : undefined}
|
|
139
|
+
/>
|
|
140
|
+
{hasError && <p id="email-error" role="alert">오류</p>}
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### 체크리스트
|
|
144
|
+
|
|
145
|
+
- [ ] 모든 이미지에 alt
|
|
146
|
+
- [ ] 폼 요소에 레이블
|
|
147
|
+
- [ ] 키보드 접근 가능
|
|
148
|
+
- [ ] 포커스 표시 유지
|
|
149
|
+
- [ ] 대비 4.5:1 이상
|
|
150
|
+
- [ ] 색상만으로 정보 전달 금지
|
|
151
|
+
- [ ] 터치 영역 44px 이상
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# 코드 컨벤션
|
|
2
|
+
|
|
3
|
+
TanStack Start 프로젝트의 코드 작성 규칙.
|
|
4
|
+
|
|
5
|
+
## 파일 네이밍
|
|
6
|
+
|
|
7
|
+
**모든 파일은 kebab-case**:
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
✅ user-profile.tsx
|
|
11
|
+
✅ auth-service.ts
|
|
12
|
+
✅ use-user-filter.ts
|
|
13
|
+
|
|
14
|
+
❌ UserProfile.tsx
|
|
15
|
+
❌ authService.ts
|
|
16
|
+
❌ useUserFilter.ts
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Import 순서
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
// 1. External libraries
|
|
23
|
+
import { createFileRoute } from '@tanstack/react-router'
|
|
24
|
+
import { useQuery } from '@tanstack/react-query'
|
|
25
|
+
|
|
26
|
+
// 2. Internal packages
|
|
27
|
+
import { Button } from '@/components/ui/button'
|
|
28
|
+
import { prisma } from '@/lib/prisma'
|
|
29
|
+
|
|
30
|
+
// 3. Relative imports (route-specific)
|
|
31
|
+
import { UserCard } from './-components/user-card'
|
|
32
|
+
import { useUsers } from './-hooks/use-users'
|
|
33
|
+
|
|
34
|
+
// 4. Type imports
|
|
35
|
+
import type { User } from '@/types'
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## 함수 스타일
|
|
39
|
+
|
|
40
|
+
```typescript
|
|
41
|
+
// ✅ const 함수
|
|
42
|
+
const getUserById = async (id: string): Promise<User> => {
|
|
43
|
+
return prisma.user.findUnique({ where: { id } })
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// ✅ 명시적 반환 타입
|
|
47
|
+
const formatDate = (date: Date): string => {
|
|
48
|
+
return date.toISOString()
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// ❌ any 금지 → unknown 사용
|
|
52
|
+
const parseJSON = (data: string): unknown => {
|
|
53
|
+
return JSON.parse(data)
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## 한글 주석
|
|
58
|
+
|
|
59
|
+
**묶음 단위로 작성** (너무 세세하게 X):
|
|
60
|
+
|
|
61
|
+
```typescript
|
|
62
|
+
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
63
|
+
// 사용자 관련 상태
|
|
64
|
+
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
65
|
+
const [user, setUser] = useState<User | null>(null)
|
|
66
|
+
const [isLoading, setIsLoading] = useState(false)
|
|
67
|
+
|
|
68
|
+
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
69
|
+
// 데이터 조회
|
|
70
|
+
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
71
|
+
const { data: users } = useQuery({
|
|
72
|
+
queryKey: ['users'],
|
|
73
|
+
queryFn: () => getUsers(),
|
|
74
|
+
})
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
```typescript
|
|
78
|
+
// ❌ 너무 세세한 주석 (금지)
|
|
79
|
+
const [user, setUser] = useState(null) // 사용자 상태
|
|
80
|
+
const [isLoading, setIsLoading] = useState(false) // 로딩 상태
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## 에러 처리
|
|
84
|
+
|
|
85
|
+
```typescript
|
|
86
|
+
// lib/errors.ts
|
|
87
|
+
export class AppError extends Error {
|
|
88
|
+
constructor(
|
|
89
|
+
message: string,
|
|
90
|
+
public statusCode: number = 500,
|
|
91
|
+
public code: string = 'INTERNAL_ERROR'
|
|
92
|
+
) {
|
|
93
|
+
super(message)
|
|
94
|
+
this.name = 'AppError'
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export class NotFoundError extends AppError {
|
|
99
|
+
constructor(resource: string) {
|
|
100
|
+
super(`${resource} not found`, 404, 'NOT_FOUND')
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
```
|