Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
2452724
chore : ν™ˆνŽ˜μ΄μ§€μ—μ„œ μ‚¬μš©ν•  이미지 μ„ΈνŒ…
Jaeho-Site May 12, 2026
50e1201
chore : tsconfgμ„€μ • λ³€κ²½
Jaeho-Site May 12, 2026
232aff8
docs : νƒ€μž… λͺ…μ„Έ λ³€κ²½, ν™•μž₯ 정리
Jaeho-Site May 12, 2026
553db09
docs : widgets λ ˆμ΄μ–΄ CLAUDE.md μ •μ˜
Jaeho-Site May 12, 2026
f696354
feat : μž„μ‹œ 헀더 μ •μ˜(ν™ˆνŽ˜μ΄μ§€μš©)
Jaeho-Site May 12, 2026
a0878d3
feat : SiteNav 인덱슀 파일 μ •μ˜
Jaeho-Site May 12, 2026
9c67fe2
feat : μž„μ‹œ Footer μ •μ˜(ν™ˆνŽ˜μ΄μ§€μš©)
Jaeho-Site May 12, 2026
f562c97
feat : SiteFooter 인덱슀 파일 μ •μ˜
Jaeho-Site May 12, 2026
8998f9e
feat : ν™ˆνŽ˜μ΄μ§€ μ»΄ν¬λ„ŒνŠΈ μ •μ˜ (κΈ€λ‘œλ²Œ λ ˆμ΄μ•„μ›ƒλ§Œ)
Jaeho-Site May 12, 2026
810af89
feat : ν™ˆνŽ˜μ΄μ§€ 인덱슀 파일 μ •μ˜
Jaeho-Site May 12, 2026
0614fc2
feat : App에 ν™ˆ 경둜 μΆ”κ°€
Jaeho-Site May 12, 2026
b0070e1
style : μŠ€νƒ€μΌ 토큰 μΆ”κ°€
Jaeho-Site May 12, 2026
a3eddd5
refactor : μ—λŸ¬ λ°”μš΄λ”λ¦¬ νƒ€μž… 넀이밍 μˆ˜μ •
Jaeho-Site May 12, 2026
4752b98
refactor : 디렉토리 넀이밍 톡일
Jaeho-Site May 13, 2026
3892b07
Merge pull request #9 from Team-StackUp/feature/home-layout
i3months May 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ PostgreSQL+pgvector Β· S3/MinIO
| SSE 이벀트 μŠ€νŽ™ | [`docs/event-stream.md`](./docs/event-stream.md) |
| **λ””μžμΈ μ‹œμŠ€ν…œ** | [`docs/design-system.md`](./docs/design-system.md) |
| UI νŒ¨ν„΄ (4-state, 폼, ν† μŠ€νŠΈ, ν‚€λ³΄λ“œ) | [`docs/ui-patterns.md`](./docs/ui-patterns.md) |
| **ν”„λ‘ νŠΈμ—”λ“œ νƒ€μž… μ‹œμŠ€ν…œ** | [`docs/frontend-types.md`](./docs/frontend-types.md) |
| λ³΄μ•ˆ (인증, μ•”ν˜Έν™”, κ°œμΈμ •λ³΄) | [`docs/security.md`](./docs/security.md) |
| μ˜΅μ €λ²„λΉŒλ¦¬ν‹° (trace, 둜그, AI λΉ„μš©) | [`docs/observability.md`](./docs/observability.md) |
| ν™˜κ²½ λ³€μˆ˜ μΉ΄νƒˆλ‘œκ·Έ | [`docs/environment.md`](./docs/environment.md) |
Expand Down
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
### λ””μžμΈΒ·ν”„λ‘ νŠΈμ—”λ“œ
- [`design-system.md`](./design-system.md) β€” 토큰, 컬러, νƒ€μ΄ν¬κ·Έλž˜ν”Ό, μ»΄ν¬λ„ŒνŠΈ 인벀토리
- [`ui-patterns.md`](./ui-patterns.md) β€” λ°˜λ³΅λ˜λŠ” UX νŒ¨ν„΄, μƒνƒœ 처리 (loading/empty/error)
- [`frontend-types.md`](./frontend-types.md) β€” TypeScript νƒ€μž… λ„€μ΄λ°Β·λ ˆμ΄μ–΄λ³„ νλ¦„Β·μ •μ˜ μœ„μΉ˜

### λ³΄μ•ˆΒ·μš΄μ˜
- [`security.md`](./security.md) β€” 인증·인가, 토큰 μ•”ν˜Έν™”, κ°œμΈμ •λ³΄ 처리
Expand Down
10 changes: 10 additions & 0 deletions docs/coding-conventions.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@
ν—ˆμš©: `id`, `url`, `uri`, `api`, `db`, `pg`, `mq`, `ai`, `llm`, `rag`, `stt`, `tts`, `pdf`
λΉ„κΆŒμž₯: `usr`, `msg`, `cfg`, `tmp` β†’ `user`, `message`, `config`, `temp` μ‚¬μš©

### 1.4 νƒ€μž… (TypeScript)

ν”„λ‘ νŠΈμ—”λ“œ TypeScript νƒ€μž… κ·œμ•½μ€ 뢄리 λ¬Έμ„œλ‘œ κ΄€λ¦¬ν•œλ‹€ β†’ [**`frontend-types.md`**](./frontend-types.md).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

κ΅Ώ~


μš”μ λ§Œ:
- PascalCase + 의미 μžˆλŠ” 접미사 (`Dto` / `Request` / `Response` / `Result` / `Model` / `Props` / `State` / `Options` / `Id`).
- `I` / `T` Hungarian prefix κΈˆμ§€.
- νƒ€μž…μ€ μ‚¬μš©λ˜λŠ” λ ˆμ΄μ–΄μ— μ‚°λ‹€. `Dto β†’ Entity β†’ Model β†’ Props` 단방ν–₯.
- μ „μ—­ `types/` 폴더 κΈˆμ§€. 슬라이슀 λ‚΄λΆ€μ—μ„œ μ‹œμž‘, 3κ³³ 이상 쀑볡 μ‹œ `shared` 승격.

---

## 2. ν•¨μˆ˜Β·λ©”μ„œλ“œ 섀계
Expand Down
124 changes: 124 additions & 0 deletions docs/frontend-types.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
# ν”„λ‘ νŠΈμ—”λ“œ νƒ€μž… μ‹œμŠ€ν…œ β€” TypeScript

> StackUp ν”„λ‘ νŠΈμ—”λ“œμ˜ TypeScript νƒ€μž… κ·œμ•½. **νƒ€μž…μ€ μ‚¬μš©λ˜λŠ” λ ˆμ΄μ–΄μ— μ‚°λ‹€.** μ΄λ¦„μ˜ 접미사가 μ±…μž„ 경계λ₯Ό μ„ μ–Έν•œλ‹€.
>
> μƒμœ„ μ»¨ν…μŠ€νŠΈ β€” [coding-conventions.md](./coding-conventions.md) (μ–Έμ–΄ 곡톡 κ·œμ•½), [`frontend/CLAUDE.md`](../frontend/CLAUDE.md) (FSD ꡬ쑰)
> 적용 λ²”μœ„ β€” [`frontend/src/`](../frontend/src/)

---

## λͺ©μ°¨

1. [원칙](#1-원칙)
2. [접미사 ↔ λ ˆμ΄μ–΄ 맀트릭슀](#2-접미사--λ ˆμ΄μ–΄-맀트릭슀)
3. [λ ˆμ΄μ–΄λ³„ νƒ€μž… 흐름](#3-λ ˆμ΄μ–΄λ³„-νƒ€μž…-흐름)
4. [`type` vs `interface`](#4-type-vs-interface)
5. [μ •μ˜ μœ„μΉ˜](#5-μ •μ˜-μœ„μΉ˜)
6. [shared 승격 μž„κ³„](#6-shared-승격-μž„κ³„)
7. [μ•ˆν‹°νŒ¨ν„΄](#7-μ•ˆν‹°νŒ¨ν„΄)

---

## 1. 원칙

- **PascalCase + 의미 μžˆλŠ” 접미사**. 접미사가 νƒ€μž…μ˜ μ±…μž„Β·λ ˆμ΄μ–΄λ₯Ό μ‹ κ³ ν•œλ‹€.
- `I` / `T` Hungarian prefix κΈˆμ§€ β€” TypeScript μ»΄νŒŒμΌλŸ¬κ°€ `type` / `interface` λ₯Ό μΆ©λΆ„νžˆ κ΅¬λΆ„ν•œλ‹€.
- **단방ν–₯ 흐름**: `Dto β†’ Entity β†’ Model β†’ Props`. μ—­λ°©ν–₯ import κΈˆμ§€.
- **μ „μ—­ `types/` 폴더 κΈˆμ§€**. 슬라이슀 λ‚΄λΆ€μ—μ„œ μ‹œμž‘, μ§„μ§œ 곡유될 λ•Œλ§Œ λŒμ–΄μ˜¬λ¦°λ‹€.

---

## 2. 접미사 ↔ λ ˆμ΄μ–΄ 맀트릭슀

| 접미사 | λ ˆμ΄μ–΄ | μ±…μž„ | 예 |
|---|---|---|---|
| `XxxDto` | `shared/api/` (OpenAPI μžλ™ 생성) | λ°±μ—”λ“œ wire format μŠ€λƒ…μƒ·. μˆ˜μ • κΈˆμ§€ | `SessionDto`, `UserDto` |
| `XxxRequest` / `XxxPayload` | API ν˜ΈμΆœλΆ€, 이벀트 publisher | HTTP μš”μ²­ body, RabbitMQ λ©”μ‹œμ§€ payload | `CreateSessionRequest`, `ResumeAnalyzedPayload` |
| `XxxResponse` | API ν˜ΈμΆœλΆ€ | HTTP 응닡 raw shape (μˆ˜λ™ μ •μ˜ μ‹œ) β€” **ν•¨μˆ˜ λ°˜ν™˜μ— μ‚¬μš© βœ—** | `LoginResponse` |
| `Xxx` (접미사 μ—†μŒ) | `domain/{slice}/model/` | λΉ„μ¦ˆλ‹ˆμŠ€ μ—”ν„°ν‹°. Dtoμ—μ„œ 맀핑됨 | `User`, `Session`, `Resume` |
| `XxxResult` | 도메인 / μœ μ¦ˆμΌ€μ΄μŠ€ ν•¨μˆ˜ λ°˜ν™˜ | λΉ„μ¦ˆλ‹ˆμŠ€ 둜직 좜λ ₯ (HTTP 비쒅속) | `AnalysisResult`, `ValidationResult` |
| `XxxModel` | `features/*/ui/`, `widgets/*/ui/` | UI ν‘œμ‹œ μ „μš© 가곡 데이터 | `SessionListItemModel`, `ServiceCardModel` |
| `XxxProps` | μ»΄ν¬λ„ŒνŠΈ μ˜† | React props | `ButtonProps`, `HomeHeroProps` |
| `XxxState` | store / state machine | **λͺ…μ‹œμ ** μƒνƒœ λͺ¨λΈ. λ‹¨λ°œ `useState` shape 에 μ‚¬μš© βœ— | `AuthState`, `SessionMachineState` |
| `XxxOptions` | ν•¨μˆ˜Β·ν›… μ„€μ • | μ˜΅μ…”λ„ 인자 묢음 | `UseTypewriterOptions` |
| `XxxId` | μ–΄λ””λ“  | branded identifier | `type SessionId = number & { readonly __brand: 'SessionId' }` |

---

## 3. λ ˆμ΄μ–΄λ³„ νƒ€μž… 흐름

```
[Backend OpenAPI]
β”‚ openapi-typescript μžλ™ 생성
β–Ό
shared/api/generated.ts ── XxxDto
β”‚ 맀퍼 ν•¨μˆ˜ (toUser, toSession)
β–Ό
domain/{slice}/model/ ── Xxx (Entity)
β”‚ feature / widget μ—μ„œ UI 가곡
β–Ό
features|widgets/*/ui/ ── XxxModel
β”‚ props 둜 μ£Όμž…
β–Ό
React Component ── XxxProps
```

**경계 κ·œμΉ™**:

- `XxxDto` λŠ” `shared/api/` λ°–μœΌλ‘œ μƒˆμ§€ μ•ŠλŠ”λ‹€. UI Β· 도메인이 Dto λ₯Ό 직접 import ν•˜λ©΄ anti-corruption layer κ°€ λ¬΄λ„ˆμ§„λ‹€.
- `Xxx` (Entity) λŠ” `domain/` 이 μ†Œμœ . features / widgets λŠ” read-only 둜 μ°Έμ‘°ν•œλ‹€.
- `XxxModel` 은 슬라이슀 내뢀에 λ¨Έλ¬Έλ‹€. λ‹€λ₯Έ 슬라이슀둜 export ν•˜μ§€ μ•ŠλŠ”λ‹€ β€” UI ν‘œμ‹œ ν˜•νƒœκ°€ λˆ„μˆ˜λ˜λ©΄ λ³€κ²½ λΉ„μš©μ΄ ν­μ¦ν•œλ‹€.

---

## 4. `type` vs `interface`

`type` κΈ°λ³Έκ°’. `interface` λŠ” 두 κ²½μš°μ—λ§Œ:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

κΈ°λ³Έκ°’ μ •ν•œκ±° μ’‹λ„€μš”


1. ν΄λž˜μŠ€κ°€ `implements` ν•  λ•Œ (`ErrorBoundary` λ“±)
2. declaration merging ν•„μš” μ‹œ (μ™ΈλΆ€ 라이브러리 augmentation)

```ts
// μ’‹μŒ
type SessionStatus = 'READY' | 'IN_PROGRESS' | 'COMPLETED';
type CreateSessionRequest = { userId: UserId; mode: SessionMode };
type AnalysisResult = { score: number; suggestions: string[] };

// μ’‹μŒ β€” implements κ°€ ν•„μš”ν•œ μΌ€μ΄μŠ€
interface ErrorBoundaryProps { children: ReactNode; fallback: ReactNode }
class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> { ... }
```

---

## 5. μ •μ˜ μœ„μΉ˜

| 무엇 | μ–΄λ”” |
|---|---|
| μ»΄ν¬λ„ŒνŠΈ props (단일 μ‚¬μš©) | `{Component}.tsx` 상단, **export μ•ˆ 함** |
| μ™ΈλΆ€μ—μ„œλ„ import λ˜λŠ” props | `{Component}.types.ts` |
| 도메인 μ—”ν„°ν‹° | `domain/{slice}/model/types.ts` |
| 슬라이슀 λ‚΄ `XxxModel` | `features/{slice}/model/types.ts` λ˜λŠ” `ui/` λ‚΄λΆ€ |
| API `XxxDto` | `shared/api/generated.ts` (OpenAPI μž¬μƒμ„±μœΌλ‘œλ§Œ κ°±μ‹ ) |

**μ „μ—­ `src/types/` ν΄λ”λŠ” λ§Œλ“€μ§€ μ•ŠλŠ”λ‹€.** 슬라이슀 λ‚΄λΆ€μ—μ„œ μ‹œμž‘ν•˜κ³ , μ§„μ§œ 곡유될 λ•Œλ§Œ λŒμ–΄μ˜¬λ¦°λ‹€.

---

## 6. shared 승격 μž„κ³„

νƒ€μž…μ„ `shared/` 둜 μ˜¬λ¦¬λŠ” μ‹œμ μ€ **μ„œλ‘œ λ‹€λ₯Έ 슬라이슀 3κ³³ μ΄μƒμ—μ„œ λ™μΌν•œ shape 이 반볡될 λ•Œ**. κ·Έ μ „μ—” 슬라이슀 μ•ˆμ— μ‚°λ‹€.

> "μ–Έμ  κ°€ 쓸지도 λͺ¨λ₯΄λ‹ˆ 미리 shared 둜" λŠ” 항상 잘λͺ»λœ μΆ”μƒν™”λ‘œ λλ‚œλ‹€.

---

## 7. μ•ˆν‹°νŒ¨ν„΄

- ❌ `XxxResponse` λ₯Ό ν•¨μˆ˜ λ°˜ν™˜ νƒ€μž…μœΌλ‘œ μ‚¬μš© β€” `XxxResult` 둜.
- ❌ UI μ»΄ν¬λ„ŒνŠΈκ°€ `SessionDto` λ₯Ό props 둜 λ°›μŒ β€” `SessionListItemModel` 둜 λ§€ν•‘.
- ❌ 둜컬 `useState<{ ... }>` shape 에 `XxxState` 이름 뢙이고 export.
- ❌ `export type Props = { ... }` 같은 generic export β€” `{Component}Props` 둜.
- ❌ `src/types/` λ˜λŠ” `src/shared/types/` μ „μ—­ 폴더 (junk drawer ν™”).
- ❌ `IXxx`, `TXxx` Hungarian prefix.
- ❌ `Dto` κ°€ `features/` / `widgets/` / `domain/` μ—μ„œ import λ˜λŠ” 경우 β€” boundary μœ„λ°˜.
1 change: 0 additions & 1 deletion frontend/public/favicon.svg

This file was deleted.

Loading