@kood/claude-code 0.5.4 → 0.5.5

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 (94) hide show
  1. package/dist/index.js +6 -2
  2. package/package.json +1 -1
  3. package/templates/.claude/agents/document-writer.md +2 -2
  4. package/templates/.claude/skills/docs-creator/SKILL.md +2 -2
  5. package/templates/.claude/skills/docs-refactor/SKILL.md +1 -1
  6. package/templates/.claude/skills/plan/SKILL.md +15 -15
  7. package/templates/hono/CLAUDE.md +28 -28
  8. package/templates/hono/docs/architecture.md +24 -24
  9. package/templates/hono/docs/deployment/cloudflare.md +18 -18
  10. package/templates/hono/docs/deployment/docker.md +13 -13
  11. package/templates/hono/docs/deployment/index.md +19 -19
  12. package/templates/hono/docs/deployment/railway.md +32 -32
  13. package/templates/hono/docs/deployment/vercel.md +29 -29
  14. package/templates/hono/docs/guides/conventions.md +57 -57
  15. package/templates/hono/docs/guides/env-setup.md +47 -47
  16. package/templates/hono/docs/guides/getting-started.md +27 -27
  17. package/templates/hono/docs/library/hono/error-handling.md +11 -11
  18. package/templates/hono/docs/library/hono/index.md +4 -4
  19. package/templates/hono/docs/library/hono/middleware.md +18 -18
  20. package/templates/hono/docs/library/hono/rpc.md +7 -7
  21. package/templates/hono/docs/library/hono/validation.md +6 -6
  22. package/templates/hono/docs/library/prisma/cloudflare-d1.md +29 -29
  23. package/templates/hono/docs/library/prisma/config.md +16 -16
  24. package/templates/hono/docs/library/prisma/index.md +32 -32
  25. package/templates/hono/docs/library/t3-env/index.md +22 -22
  26. package/templates/hono/docs/library/zod/index.md +31 -31
  27. package/templates/nextjs/CLAUDE.md +54 -54
  28. package/templates/nextjs/docs/architecture.md +146 -146
  29. package/templates/nextjs/docs/design.md +183 -183
  30. package/templates/nextjs/docs/guides/conventions.md +86 -86
  31. package/templates/nextjs/docs/guides/getting-started.md +28 -28
  32. package/templates/nextjs/docs/guides/routes.md +32 -32
  33. package/templates/nextjs/docs/library/better-auth/index.md +70 -70
  34. package/templates/nextjs/docs/library/nextjs/app-router.md +43 -43
  35. package/templates/nextjs/docs/library/nextjs/caching.md +73 -73
  36. package/templates/nextjs/docs/library/nextjs/index.md +51 -51
  37. package/templates/nextjs/docs/library/nextjs/middleware.md +41 -41
  38. package/templates/nextjs/docs/library/nextjs/route-handlers.md +31 -31
  39. package/templates/nextjs/docs/library/nextjs/server-actions.md +34 -34
  40. package/templates/nextjs/docs/library/prisma/cloudflare-d1.md +20 -20
  41. package/templates/nextjs/docs/library/prisma/config.md +18 -18
  42. package/templates/nextjs/docs/library/prisma/crud.md +17 -17
  43. package/templates/nextjs/docs/library/prisma/index.md +18 -18
  44. package/templates/nextjs/docs/library/prisma/relations.md +16 -16
  45. package/templates/nextjs/docs/library/prisma/schema.md +23 -23
  46. package/templates/nextjs/docs/library/prisma/setup.md +6 -6
  47. package/templates/nextjs/docs/library/prisma/transactions.md +10 -10
  48. package/templates/nextjs/docs/library/tanstack-query/index.md +6 -6
  49. package/templates/nextjs/docs/library/tanstack-query/invalidation.md +20 -20
  50. package/templates/nextjs/docs/library/tanstack-query/optimistic-updates.md +4 -4
  51. package/templates/nextjs/docs/library/tanstack-query/use-mutation.md +15 -15
  52. package/templates/nextjs/docs/library/tanstack-query/use-query.md +22 -22
  53. package/templates/nextjs/docs/library/zod/complex-types.md +11 -11
  54. package/templates/nextjs/docs/library/zod/index.md +8 -8
  55. package/templates/nextjs/docs/library/zod/transforms.md +11 -11
  56. package/templates/nextjs/docs/library/zod/validation.md +9 -9
  57. package/templates/npx/CLAUDE.md +38 -38
  58. package/templates/npx/docs/library/commander/index.md +12 -12
  59. package/templates/npx/docs/library/fs-extra/index.md +9 -9
  60. package/templates/npx/docs/library/prompts/index.md +3 -3
  61. package/templates/npx/docs/references/patterns.md +12 -12
  62. package/templates/tanstack-start/CLAUDE.md +54 -54
  63. package/templates/tanstack-start/docs/architecture.md +128 -128
  64. package/templates/tanstack-start/docs/design.md +169 -169
  65. package/templates/tanstack-start/docs/guides/conventions.md +43 -43
  66. package/templates/tanstack-start/docs/guides/env-setup.md +35 -35
  67. package/templates/tanstack-start/docs/guides/getting-started.md +19 -19
  68. package/templates/tanstack-start/docs/guides/hooks.md +45 -45
  69. package/templates/tanstack-start/docs/guides/routes.md +54 -54
  70. package/templates/tanstack-start/docs/guides/services.md +45 -45
  71. package/templates/tanstack-start/docs/library/prisma/cloudflare-d1.md +19 -19
  72. package/templates/tanstack-start/docs/library/prisma/config.md +16 -16
  73. package/templates/tanstack-start/docs/library/prisma/crud.md +17 -17
  74. package/templates/tanstack-start/docs/library/prisma/relations.md +16 -16
  75. package/templates/tanstack-start/docs/library/prisma/schema.md +23 -23
  76. package/templates/tanstack-start/docs/library/prisma/setup.md +6 -6
  77. package/templates/tanstack-start/docs/library/prisma/transactions.md +10 -10
  78. package/templates/tanstack-start/docs/library/tanstack-query/invalidation.md +19 -19
  79. package/templates/tanstack-start/docs/library/tanstack-query/optimistic-updates.md +4 -4
  80. package/templates/tanstack-start/docs/library/tanstack-query/use-mutation.md +14 -14
  81. package/templates/tanstack-start/docs/library/tanstack-query/use-query.md +21 -21
  82. package/templates/tanstack-start/docs/library/tanstack-router/error-handling.md +9 -9
  83. package/templates/tanstack-start/docs/library/tanstack-router/hooks.md +11 -11
  84. package/templates/tanstack-start/docs/library/tanstack-router/navigation.md +17 -17
  85. package/templates/tanstack-start/docs/library/tanstack-router/route-context.md +5 -5
  86. package/templates/tanstack-start/docs/library/tanstack-router/search-params.md +10 -10
  87. package/templates/tanstack-start/docs/library/tanstack-start/auth-patterns.md +8 -8
  88. package/templates/tanstack-start/docs/library/tanstack-start/middleware.md +9 -9
  89. package/templates/tanstack-start/docs/library/tanstack-start/routing.md +6 -6
  90. package/templates/tanstack-start/docs/library/tanstack-start/server-functions.md +18 -18
  91. package/templates/tanstack-start/docs/library/tanstack-start/setup.md +4 -4
  92. package/templates/tanstack-start/docs/library/zod/complex-types.md +11 -11
  93. package/templates/tanstack-start/docs/library/zod/transforms.md +11 -11
  94. package/templates/tanstack-start/docs/library/zod/validation.md +9 -9
@@ -1,6 +1,6 @@
1
- # Environment Variables
1
+ # 환경 변수 설정
2
2
 
3
- > Managing Hono environment variables (Node.js, Cloudflare Workers)
3
+ > Hono 환경 변수 관리 (Node.js, Cloudflare Workers)
4
4
 
5
5
  <instructions>
6
6
  @../library/t3-env/index.md
@@ -10,9 +10,9 @@
10
10
 
11
11
  <runtime_differences>
12
12
 
13
- | Runtime | Environment Access | Use Case |
14
- |---------|-------------------|----------|
15
- | **Node.js** | `process.env.*` | General server |
13
+ | 런타임 | 환경 변수 접근 | 용도 |
14
+ |--------|---------------|------|
15
+ | **Node.js** | `process.env.*` | 일반 서버 |
16
16
  | **Cloudflare Workers** | `c.env.*` (Bindings) | Edge Runtime |
17
17
  | **Deno** | `Deno.env.get()` | Deno Runtime |
18
18
  | **Bun** | `process.env.*` | Bun Runtime |
@@ -23,22 +23,22 @@
23
23
 
24
24
  <file_structure>
25
25
 
26
- ## Environment File Structure
26
+ ## 환경 파일 구조
27
27
 
28
28
  ```
29
- ├── .env # Defaults (commit YES)
30
- ├── .env.development # Development (commit YES)
31
- ├── .env.production # Production (commit YES)
32
- ├── .env.local # Local override (commit NO)
33
- └── src/lib/env.ts # Validation & types (t3-env)
29
+ ├── .env # 기본 (커밋 O)
30
+ ├── .env.development # 개발 (커밋 O)
31
+ ├── .env.production # 프로덕션 (커밋 O)
32
+ ├── .env.local # 로컬 오버라이드 (커밋 X)
33
+ └── src/lib/env.ts # 검증 타입 (t3-env)
34
34
  ```
35
35
 
36
- | Priority | File | Description |
37
- |----------|------|-------------|
38
- | 1 | `.env.{mode}.local` | Highest priority (gitignore) |
39
- | 2 | `.env.local` | Local override |
40
- | 3 | `.env.{mode}` | Environment-specific |
41
- | 4 | `.env` | Defaults |
36
+ | 우선순위 | 파일 | 설명 |
37
+ |----------|------|------|
38
+ | 1 | `.env.{mode}.local` | 최우선 (gitignore) |
39
+ | 2 | `.env.local` | 로컬 오버라이드 |
40
+ | 3 | `.env.{mode}` | 환경별 설정 |
41
+ | 4 | `.env` | 기본 설정 |
42
42
 
43
43
  </file_structure>
44
44
 
@@ -46,9 +46,9 @@
46
46
 
47
47
  <patterns>
48
48
 
49
- ## Environment File Examples
49
+ ## 환경 파일 예시
50
50
 
51
- ### .env.local (gitignore, secrets)
51
+ ### .env.local (gitignore, 시크릿)
52
52
 
53
53
  ```env
54
54
  DATABASE_URL=postgresql://user:password@localhost:5432/myapp
@@ -72,9 +72,9 @@ PORT=8080
72
72
  LOG_LEVEL=info
73
73
  ```
74
74
 
75
- ## Node.js Environment Variables
75
+ ## Node.js 환경 변수
76
76
 
77
- ### Type-safe Environment Variables (t3-env)
77
+ ### 타입 안전한 환경 변수 (t3-env)
78
78
 
79
79
  ```typescript
80
80
  // src/lib/env.ts
@@ -94,7 +94,7 @@ export const env = createEnv({
94
94
  })
95
95
  ```
96
96
 
97
- ### Usage Example
97
+ ### 사용 예시
98
98
 
99
99
  ```typescript
100
100
  // src/index.ts
@@ -116,9 +116,9 @@ export default {
116
116
  }
117
117
  ```
118
118
 
119
- ## Cloudflare Workers Environment Variables
119
+ ## Cloudflare Workers 환경 변수
120
120
 
121
- ### Bindings Type Definition
121
+ ### Bindings 타입 정의
122
122
 
123
123
  ```typescript
124
124
  // src/types/index.ts
@@ -139,12 +139,12 @@ compatibility_date = "2024-01-01"
139
139
  [vars]
140
140
  NODE_ENV = "production"
141
141
 
142
- # Set secrets with wrangler secret put command
142
+ # 시크릿은 wrangler secret put 명령어로 설정
143
143
  # wrangler secret put DATABASE_URL
144
144
  # wrangler secret put JWT_SECRET
145
145
  ```
146
146
 
147
- ### Usage Example
147
+ ### 사용 예시
148
148
 
149
149
  ```typescript
150
150
  // src/index.ts
@@ -154,7 +154,7 @@ import type { Bindings } from './types'
154
154
  const app = new Hono<{ Bindings: Bindings }>()
155
155
 
156
156
  app.get('/', (c) => {
157
- // Access environment variables via c.env
157
+ // c.env를 통해 환경 변수 접근
158
158
  const dbUrl = c.env.DATABASE_URL
159
159
  const jwtSecret = c.env.JWT_SECRET
160
160
 
@@ -167,7 +167,7 @@ app.get('/', (c) => {
167
167
  export default app
168
168
  ```
169
169
 
170
- ### Using in Middleware
170
+ ### 미들웨어에서 사용
171
171
 
172
172
  ```typescript
173
173
  // src/middleware/auth.ts
@@ -186,26 +186,26 @@ export const authMiddleware = createMiddleware<{
186
186
  const token = c.req.header('Authorization')?.replace('Bearer ', '')
187
187
  if (!token) throw new HTTPException(401, { message: 'Unauthorized' })
188
188
 
189
- // Use JWT Secret
189
+ // JWT Secret 사용
190
190
  const jwtSecret = c.env.JWT_SECRET
191
- // JWT verification logic...
191
+ // JWT 검증 로직...
192
192
 
193
193
  c.set('userId', 'user-id')
194
194
  await next()
195
195
  })
196
196
  ```
197
197
 
198
- ## Cloudflare Workers Secrets Management
198
+ ## Cloudflare Workers 시크릿 설정
199
199
 
200
200
  ```bash
201
- # Add secret
201
+ # 시크릿 추가
202
202
  wrangler secret put DATABASE_URL
203
203
  wrangler secret put JWT_SECRET
204
204
 
205
- # List secrets
205
+ # 시크릿 목록 확인
206
206
  wrangler secret list
207
207
 
208
- # Delete secret
208
+ # 시크릿 삭제
209
209
  wrangler secret delete DATABASE_URL
210
210
  ```
211
211
 
@@ -218,14 +218,14 @@ wrangler secret delete DATABASE_URL
218
218
  ## .gitignore
219
219
 
220
220
  ```gitignore
221
- # Contains secrets (NEVER commit)
221
+ # 시크릿 포함 (절대 커밋 X)
222
222
  .env.local
223
223
  .env.*.local
224
224
 
225
225
  # Cloudflare Workers
226
226
  .dev.vars
227
227
 
228
- # Public config (commit OK)
228
+ # 공개 설정 (커밋 O)
229
229
  !.env
230
230
  !.env.development
231
231
  !.env.production
@@ -237,7 +237,7 @@ wrangler secret delete DATABASE_URL
237
237
 
238
238
  <typescript_types>
239
239
 
240
- ## TypeScript Types
240
+ ## TypeScript 타입
241
241
 
242
242
  ### Node.js
243
243
 
@@ -286,13 +286,13 @@ export type Bindings = {
286
286
 
287
287
  <best_practices>
288
288
 
289
- | Principle | Description |
290
- |-----------|-------------|
291
- | **Separate Secrets** | Store secrets only in `.env.local`, never commit |
292
- | **Type Safety** | Validate with t3-env or Zod |
293
- | **Defaults** | Set safe defaults in `.env` |
294
- | **Documentation** | Provide required variables list via `.env.example` |
295
- | **Runtime Differences** | Node.js uses `process.env`, Cloudflare uses `c.env` |
289
+ | 원칙 | 설명 |
290
+ |------|------|
291
+ | **시크릿 분리** | `.env.local`에만 시크릿 저장, 커밋 금지 |
292
+ | **타입 안전성** | t3-env 또는 Zod 검증 |
293
+ | **기본값** | `.env`에 안전한 기본값 설정 |
294
+ | **문서화** | `.env.example` 파일로 필수 변수 목록 제공 |
295
+ | **런타임별 차이** | Node.js `process.env`, Cloudflare `c.env` |
296
296
 
297
297
  </best_practices>
298
298
 
@@ -300,7 +300,7 @@ export type Bindings = {
300
300
 
301
301
  <cloudflare_specific>
302
302
 
303
- ## Cloudflare Workers Additional Features
303
+ ## Cloudflare Workers 추가 기능
304
304
 
305
305
  ### KV Namespace
306
306
 
@@ -310,7 +310,7 @@ export type Bindings = {
310
310
  binding = "MY_KV"
311
311
  id = "your-kv-id"
312
312
 
313
- // Usage
313
+ // 사용
314
314
  app.get('/cache/:key', async (c) => {
315
315
  const key = c.req.param('key')
316
316
  const value = await c.env.MY_KV.get(key)
@@ -327,7 +327,7 @@ binding = "DB"
327
327
  database_name = "my-database"
328
328
  database_id = "your-db-id"
329
329
 
330
- // Usage
330
+ // 사용
331
331
  app.get('/users', async (c) => {
332
332
  const { results } = await c.env.DB.prepare('SELECT * FROM users').all()
333
333
  return c.json({ users: results })
@@ -1,6 +1,6 @@
1
1
  # Getting Started
2
2
 
3
- > Quick start for Hono projects
3
+ > Hono 프로젝트 빠른 시작
4
4
 
5
5
  <instructions>
6
6
  @conventions.md
@@ -12,10 +12,10 @@
12
12
 
13
13
  <prerequisites>
14
14
 
15
- | Requirement | Version |
16
- |-------------|---------|
15
+ | 요구사항 | 버전 |
16
+ |----------|------|
17
17
  | Node.js | 18+ |
18
- | Package Manager | npm / yarn / pnpm |
18
+ | 패키지 관리자 | npm / yarn / pnpm |
19
19
 
20
20
  </prerequisites>
21
21
 
@@ -23,13 +23,13 @@
23
23
 
24
24
  <installation>
25
25
 
26
- ## Create Project
26
+ ## 프로젝트 생성
27
27
 
28
28
  ```bash
29
29
  # npm
30
30
  npm create hono@latest my-app
31
31
 
32
- # Select template
32
+ # 템플릿 선택
33
33
  ? Which template do you want to use?
34
34
  ❯ cloudflare-workers
35
35
  nodejs
@@ -40,7 +40,7 @@ cd my-app
40
40
  npm install
41
41
  ```
42
42
 
43
- ## Required Packages
43
+ ## 필수 패키지
44
44
 
45
45
  ```bash
46
46
  # Validation (Zod 4.x)
@@ -60,11 +60,11 @@ npm install @t3-oss/env-core
60
60
 
61
61
  <project_setup>
62
62
 
63
- ## Project Structure
63
+ ## 프로젝트 구조
64
64
 
65
65
  ```
66
66
  src/
67
- ├── index.ts # App entry point
67
+ ├── index.ts # App 진입점
68
68
  ├── routes/
69
69
  │ ├── index.ts # Root routes
70
70
  │ ├── users.ts # /users/*
@@ -82,7 +82,7 @@ src/
82
82
  └── index.ts
83
83
  ```
84
84
 
85
- ## App Configuration
85
+ ## App 설정
86
86
 
87
87
  ```typescript
88
88
  // src/index.ts
@@ -101,15 +101,15 @@ type Bindings = {
101
101
 
102
102
  const app = new Hono<{ Bindings: Bindings }>()
103
103
 
104
- // Middleware
104
+ // 미들웨어
105
105
  app.use('*', logger())
106
106
  app.use('*', cors())
107
107
 
108
- // Routes
108
+ // 라우트
109
109
  app.route('/users', users)
110
110
  app.route('/posts', posts)
111
111
 
112
- // Error handler
112
+ // 에러 핸들러
113
113
  app.onError((err, c) => {
114
114
  if (err instanceof HTTPException) {
115
115
  return c.json({ error: err.message }, err.status)
@@ -123,7 +123,7 @@ app.notFound((c) => c.json({ error: 'Not Found' }, 404))
123
123
  export default app
124
124
  ```
125
125
 
126
- ## Route Example
126
+ ## 라우트 예시
127
127
 
128
128
  ```typescript
129
129
  // src/routes/users.ts
@@ -171,7 +171,7 @@ users.post('/', zValidator('json', createUserSchema), async (c) => {
171
171
  export default users
172
172
  ```
173
173
 
174
- ## Middleware Example
174
+ ## 미들웨어 예시
175
175
 
176
176
  ```typescript
177
177
  // src/middleware/auth.ts
@@ -190,7 +190,7 @@ export const authMiddleware = createMiddleware<{ Variables: Variables }>(
190
190
  throw new HTTPException(401, { message: 'Unauthorized' })
191
191
  }
192
192
 
193
- // JWT verification logic
193
+ // JWT 검증 로직
194
194
  // const decoded = await verifyJWT(token)
195
195
 
196
196
  c.set('userId', 'user-id')
@@ -207,10 +207,10 @@ export const authMiddleware = createMiddleware<{ Variables: Variables }>(
207
207
 
208
208
  | Command | Description |
209
209
  |---------|-------------|
210
- | `npm run dev` | Start development server |
211
- | `npm run build` | Build for production |
212
- | `npm start` | Run production server |
213
- | `npm run deploy` | Deploy (Cloudflare Workers, etc.) |
210
+ | `npm run dev` | 개발 서버 시작 |
211
+ | `npm run build` | 프로덕션 빌드 |
212
+ | `npm start` | 프로덕션 서버 실행 |
213
+ | `npm run deploy` | 배포 (Cloudflare Workers ) |
214
214
 
215
215
  </commands>
216
216
 
@@ -218,13 +218,13 @@ export const authMiddleware = createMiddleware<{ Variables: Variables }>(
218
218
 
219
219
  <next_steps>
220
220
 
221
- | Document | Content |
222
- |----------|---------|
223
- | [conventions.md](./conventions.md) | Code conventions, file naming rules |
224
- | [env-setup.md](./env-setup.md) | Environment variable setup |
225
- | [../library/hono/](../library/hono/) | Detailed Hono API guide |
226
- | [../library/prisma/](../library/prisma/) | Prisma ORM usage |
227
- | [../deployment/](../deployment/) | Deployment guides |
221
+ | 문서 | 내용 |
222
+ |------|------|
223
+ | [conventions.md](./conventions.md) | 코드 컨벤션, 파일명 규칙 |
224
+ | [env-setup.md](./env-setup.md) | 환경 변수 설정 |
225
+ | [../library/hono/](../library/hono/) | Hono API 상세 가이드 |
226
+ | [../library/prisma/](../library/prisma/) | Prisma ORM 사용법 |
227
+ | [../deployment/](../deployment/) | 배포 가이드 |
228
228
 
229
229
  </next_steps>
230
230
 
@@ -1,6 +1,6 @@
1
- # Hono Error Handling
1
+ # Hono 에러 처리
2
2
 
3
- > Systematic error management with HTTPException and onError
3
+ > HTTPException과 onError로 체계적 에러 관리
4
4
 
5
5
  <patterns>
6
6
 
@@ -20,7 +20,7 @@ app.get('/users/:id', async (c) => {
20
20
  })
21
21
  ```
22
22
 
23
- ## Global Handler
23
+ ## 글로벌 핸들러
24
24
 
25
25
  ```typescript
26
26
  import { Hono } from 'hono'
@@ -43,7 +43,7 @@ app.notFound((c) => {
43
43
  })
44
44
  ```
45
45
 
46
- ## Detailed Response
46
+ ## 상세 응답
47
47
 
48
48
  ```typescript
49
49
  app.onError((err, c) => {
@@ -69,7 +69,7 @@ app.onError((err, c) => {
69
69
  })
70
70
  ```
71
71
 
72
- ## Custom Error Classes
72
+ ## 커스텀 에러 클래스
73
73
 
74
74
  ```typescript
75
75
  // lib/errors.ts
@@ -95,7 +95,7 @@ export class ConflictError extends HTTPException {
95
95
  ```
96
96
 
97
97
  ```typescript
98
- // Usage
98
+ // 사용
99
99
  import { NotFoundError, ConflictError } from '@/lib/errors'
100
100
 
101
101
  app.get('/users/:id', async (c) => {
@@ -117,13 +117,13 @@ app.post('/users', async (c) => {
117
117
 
118
118
  <status_codes>
119
119
 
120
- | Code | Usage |
121
- |------|-------|
120
+ | 코드 | 사용 |
121
+ |-----|------|
122
122
  | 400 | Invalid input |
123
- | 401 | Unauthorized (authentication required) |
124
- | 403 | Access denied (insufficient permissions) |
123
+ | 401 | Unauthorized (인증 필요) |
124
+ | 403 | Access denied (권한 없음) |
125
125
  | 404 | Not found |
126
- | 409 | Already exists (conflict) |
126
+ | 409 | Already exists (충돌) |
127
127
  | 422 | Validation failed |
128
128
  | 429 | Rate limit exceeded |
129
129
 
@@ -1,6 +1,6 @@
1
1
  # Hono
2
2
 
3
- > Ultra-lightweight framework based on Web Standards
3
+ > Web Standards 기반 초경량 프레임워크
4
4
 
5
5
  <references>
6
6
  @middleware.md
@@ -21,7 +21,7 @@ npm install hono
21
21
 
22
22
  <quick_patterns>
23
23
 
24
- ## Routes
24
+ ## 라우트
25
25
 
26
26
  ```typescript
27
27
  import { Hono } from 'hono'
@@ -39,7 +39,7 @@ app.get('/posts/:postId/comments/:commentId', (c) => {
39
39
  export default app
40
40
  ```
41
41
 
42
- ## Route Groups
42
+ ## 라우트 그룹
43
43
 
44
44
  ```typescript
45
45
  const users = new Hono()
@@ -99,7 +99,7 @@ type Variables = {
99
99
 
100
100
  const app = new Hono<{ Bindings: Bindings; Variables: Variables }>()
101
101
 
102
- // Environment variables
102
+ // 환경 변수
103
103
  app.get('/', (c) => {
104
104
  const dbUrl = c.env.DATABASE_URL
105
105
  return c.json({ connected: true })
@@ -1,10 +1,10 @@
1
- # Hono Middleware
1
+ # Hono 미들웨어
2
2
 
3
- > Request/Response processing pipeline
3
+ > 요청/응답 처리 파이프라인
4
4
 
5
5
  <patterns>
6
6
 
7
- ## Basic Usage
7
+ ## 기본 사용법
8
8
 
9
9
  ```typescript
10
10
  import { Hono } from 'hono'
@@ -13,25 +13,25 @@ import { cors } from 'hono/cors'
13
13
 
14
14
  const app = new Hono()
15
15
 
16
- app.use(logger()) // All routes
17
- app.use('/api/*', cors()) // Specific path
16
+ app.use(logger()) // 모든 라우트
17
+ app.use('/api/*', cors()) // 특정 경로
18
18
 
19
- // Execution order
19
+ // 실행 순서
20
20
  app.use(async (c, next) => {
21
- console.log('1. Before request')
21
+ console.log('1. 요청 ')
22
22
  await next()
23
- console.log('4. After response')
23
+ console.log('4. 응답 ')
24
24
  })
25
25
 
26
26
  app.use(async (c, next) => {
27
- console.log('2. Before request')
27
+ console.log('2. 요청 ')
28
28
  await next()
29
- console.log('3. After response')
29
+ console.log('3. 응답 ')
30
30
  })
31
- // Output: 1 → 2 → handler → 3 → 4
31
+ // 출력: 1 → 2 → handler → 3 → 4
32
32
  ```
33
33
 
34
- ## Custom Middleware
34
+ ## 커스텀 미들웨어
35
35
 
36
36
  ```typescript
37
37
  import { createMiddleware } from 'hono/factory'
@@ -51,13 +51,13 @@ export const authMiddleware = createMiddleware<Env>(async (c, next) => {
51
51
  await next()
52
52
  })
53
53
 
54
- // Usage
54
+ // 사용
55
55
  app.get('/me', authMiddleware, (c) => {
56
56
  return c.json({ userId: c.get('userId') })
57
57
  })
58
58
  ```
59
59
 
60
- ## Type-safe Middleware
60
+ ## 타입 안전 미들웨어
61
61
 
62
62
  ```typescript
63
63
  import { Hono } from 'hono'
@@ -84,8 +84,8 @@ app.use(dbMiddleware)
84
84
  app.use(authMiddleware)
85
85
 
86
86
  app.get('/users', (c) => {
87
- const db = c.get('db') // Database type
88
- const user = c.get('user') // User | null type
87
+ const db = c.get('db') // Database 타입
88
+ const user = c.get('user') // User | null 타입
89
89
  return c.json({ users: [] })
90
90
  })
91
91
  ```
@@ -96,8 +96,8 @@ app.get('/users', (c) => {
96
96
 
97
97
  <builtin>
98
98
 
99
- | Middleware | Usage |
100
- |------------|-------|
99
+ | 미들웨어 | 사용 |
100
+ |---------|------|
101
101
  | **logger** | `app.use(logger())` |
102
102
  | **cors** | `app.use('/api/*', cors({ origin: ['https://example.com'] }))` |
103
103
  | **bearerAuth** | `app.use('/api/*', bearerAuth({ verifyToken: async (t) => t === 'valid' }))` |
@@ -1,10 +1,10 @@
1
1
  # Hono RPC Client
2
2
 
3
- > Type-safe API calls
3
+ > Type-safe API 호출
4
4
 
5
5
  <patterns>
6
6
 
7
- ## Server Setup
7
+ ## 서버 설정
8
8
 
9
9
  ```typescript
10
10
  // server.ts
@@ -26,11 +26,11 @@ const app = new Hono()
26
26
  }
27
27
  )
28
28
 
29
- export type AppType = typeof app // ✅ Required
29
+ export type AppType = typeof app // ✅ 필수
30
30
  export default app
31
31
  ```
32
32
 
33
- ## Client
33
+ ## 클라이언트
34
34
 
35
35
  ```typescript
36
36
  // client.ts
@@ -75,7 +75,7 @@ const client = hc<AppType>('http://localhost:8787/', {
75
75
  })
76
76
  ```
77
77
 
78
- ## Type Inference
78
+ ## 타입 추론
79
79
 
80
80
  ```typescript
81
81
  import type { InferRequestType, InferResponseType } from 'hono/client'
@@ -87,7 +87,7 @@ type UserResponse = InferResponseType<typeof client.users[':id'].$get>
87
87
  // { id: string; name: string }
88
88
  ```
89
89
 
90
- ## CRUD Wrapper
90
+ ## CRUD 래퍼
91
91
 
92
92
  ```typescript
93
93
  const userApi = {
@@ -117,7 +117,7 @@ const userApi = {
117
117
  },
118
118
  }
119
119
 
120
- // URL generation
120
+ // URL 생성
121
121
  const url = client.posts[':id'].$url({ param: { id: '123' } })
122
122
  console.log(url.pathname) // /posts/123
123
123
  ```
@@ -1,6 +1,6 @@
1
- # Hono + Zod Validation
1
+ # Hono + Zod 검증
2
2
 
3
- > Type-safe request validation with @hono/zod-validator
3
+ > @hono/zod-validator로 타입 안전 요청 검증
4
4
 
5
5
  <setup>
6
6
  ```bash
@@ -54,7 +54,7 @@ app.get('/users/:id',
54
54
  }
55
55
  )
56
56
 
57
- // Header (lowercase!)
57
+ // Header (소문자!)
58
58
  app.get('/api/protected',
59
59
  zValidator('header', z.object({ 'x-api-key': z.string().uuid() })),
60
60
  (c) => {
@@ -63,7 +63,7 @@ app.get('/api/protected',
63
63
  )
64
64
  ```
65
65
 
66
- ## Multiple Validators
66
+ ## 복합 검증
67
67
 
68
68
  ```typescript
69
69
  app.post(
@@ -80,7 +80,7 @@ app.post(
80
80
  )
81
81
  ```
82
82
 
83
- ## Custom Errors
83
+ ## 커스텀 에러
84
84
 
85
85
  ```typescript
86
86
  app.post(
@@ -100,7 +100,7 @@ app.post(
100
100
  )
101
101
  ```
102
102
 
103
- ## Reusable Schemas
103
+ ## 재사용 스키마
104
104
 
105
105
  ```typescript
106
106
  // validators/user.ts