-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcomponent-structure.puml
More file actions
170 lines (146 loc) · 4.01 KB
/
component-structure.puml
File metadata and controls
170 lines (146 loc) · 4.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
@startuml Component Structure
!theme plain
skinparam backgroundColor #FFFFFF
skinparam componentStyle rectangle
title The First Take - Component Structure & Data Flow
' ===== 페이지 구조 =====
package "Pages" as Pages {
[Home Page] as HomePage
[Chat Page] as ChatPage
[Chat Room Page] as ChatRoomPage
[Signin Page] as SigninPage
[Wiki Pages] as WikiPages
}
' ===== 레이아웃 구조 =====
package "Layout" as Layout {
[RootLayout] as RootLayout
[JotaiProvider] as JotaiProvider
[QueryProvider] as QueryProvider
[ServerAuthProvider] as AuthProvider
[StorageInitializer] as StorageInit
}
' ===== 채팅 시스템 =====
package "Chat System" as ChatSystem {
[ChatPanel] as ChatPanel
[ChatArea] as ChatArea
[ChatHeader] as ChatHeader
[MessageBalloon] as MessageBalloon
[MessageGroup] as MessageGroup
[EmptyChatStart] as EmptyChatStart
}
' ===== 패널 시스템 =====
package "Panel System" as PanelSystem {
[ClosetPanel] as ClosetPanel
[CodinationPanel] as CodinationPanel
[FittingPanel] as FittingPanel
[FittingCard] as FittingCard
[FittingDetail] as FittingDetail
}
' ===== 랜딩 페이지 =====
package "Landing Components" as Landing {
[HeroSection] as HeroSection
[NextChat] as NextChat
[Explanation] as Explanation
}
' ===== UI 컴포넌트 =====
package "UI Components" as UI {
[Button] as Button
[Textarea] as Textarea
[Dialog] as Dialog
[Toast] as Toast
[Dropdown] as Dropdown
[LucideIcon] as LucideIcon
}
' ===== 상태 관리 =====
package "State Management" as State {
[authAtoms] as AuthAtoms
[chatAtoms] as ChatAtoms
[graphAtoms] as GraphAtoms
}
' ===== 훅 시스템 =====
package "Custom Hooks" as Hooks {
[useAuthCheck] as useAuthCheck
[useChatHandler] as useChatHandler
[useChatStream] as useChatStream
[useClosetStorage] as useClosetStorage
[useCodinationStorage] as useCodinationStorage
[useFittingStorage] as useFittingStorage
[useToast] as useToast
}
' ===== API 레이어 =====
package "API Layer" as API {
[API.ts] as APICore
[authAPI.ts] as AuthAPI
[chatAPI.ts] as ChatAPI
[clothAPI.ts] as ClothAPI
[fittingAPI.ts] as FittingAPI
}
' ===== 데이터 저장소 =====
package "Data Storage" as Storage {
[IndexedDB] as IndexedDB
[closetStorage] as ClosetStorage
[codinationStorage] as CodinationStorage
[fittingStorage] as FittingStorage
}
' ===== 연결 관계 =====
' 페이지 연결
HomePage --> Landing
ChatPage --> ChatSystem
ChatRoomPage --> ChatSystem
ChatRoomPage --> PanelSystem
SigninPage --> AuthProvider
' 레이아웃 연결
RootLayout --> JotaiProvider
JotaiProvider --> QueryProvider
QueryProvider --> AuthProvider
AuthProvider --> StorageInit
' 채팅 시스템 연결
ChatPanel --> ChatArea
ChatArea --> MessageBalloon
ChatArea --> MessageGroup
ChatArea --> EmptyChatStart
ChatPanel --> ChatHeader
' 패널 시스템 연결
FittingPanel --> FittingCard
FittingPanel --> FittingDetail
' 상태 관리 연결
ChatSystem --> State
PanelSystem --> State
Landing --> State
' 훅 연결
ChatSystem --> Hooks
PanelSystem --> Hooks
Landing --> Hooks
' API 연결
Hooks --> API
API --> Storage
' 스토리지 연결
useClosetStorage --> ClosetStorage
useCodinationStorage --> CodinationStorage
useFittingStorage --> FittingStorage
ClosetStorage --> IndexedDB
CodinationStorage --> IndexedDB
FittingStorage --> IndexedDB
' ===== 데이터 플로우 =====
note right of ChatSystem
**Chat Data Flow**:
1. 사용자 입력 → ChatPanel
2. API 호출 → chatAPI
3. 응답 처리 → MessageBalloon
4. 상태 업데이트 → chatAtoms
end note
note right of PanelSystem
**Storage Data Flow**:
1. 데이터 변경 → Custom Hooks
2. 로컬 저장 → IndexedDB
3. 상태 동기화 → Jotai Atoms
4. UI 업데이트 → Components
end note
note right of State
**State Management**:
- **Client State**: Jotai Atoms
- **Server State**: TanStack Query
- **Local Storage**: IndexedDB
- **Real-time**: WebSocket/SSE
end note
@enduml