Public Source Viewer
비나래아카이브 개발자 포털
실제 서비스 구조를 살펴볼 수 있는 공개용 코드 뷰어입니다. 인증, 세션, 외부 연동, 토큰, 관리자 식별 등 보안상 민감한 구현은 파일 단위 또는 줄 단위로 검열됩니다.
src/types/models.ts
공개 가능
1
// 사용자 인터페이스
2
export interface User {
3
username: string;
4
[SECURITY REDACTED] 민감한 설정/인증/토큰 관련 코드입니다.
5
theme?: string;
6
bookmarks?: number;
7
dailyBookmarks?: number;
8
lastActiveDate?: string;
9
tetrisBookmarks?: number;
10
dailyTetrisBookmarks?: number;
11
lastTetrisDate?: string;
12
verifiedUntil?: string;
13
profileImage?: string;
14
dailyPostNotif?: boolean;
15
[SECURITY REDACTED] 민감한 설정/인증/토큰 관련 코드입니다.
16
[SECURITY REDACTED] 민감한 설정/인증/토큰 관련 코드입니다.
17
}
18
19
// 블로그 포스트 인터페이스
20
export interface Post {
21
id: number;
22
author: string;
23
title: string;
24
content: string;
25
createdAt: string;
26
image: string | null;
27
isPrivate: boolean;
28
tags?: string[];
29
replies: Reply[];
30
updatedAt?: string;
31
}
32
33
// 댓글/답글 인터페이스
34
export interface Reply {
35
id?: string;
36
username: string;
37
content: string;
38
createdAt: string;
39
replies?: Reply[];
40
[SECURITY REDACTED] 민감한 설정/인증/토큰 관련 코드입니다.
41
}
42
43
// AI 채팅 메시지 인터페이스
44
export interface ChatMessage {
45
role: 'system' | 'user' | 'assistant';
46
content: string;
47
}
48
49
export interface AiNote {
50
id: string;
51
title?: string;
52
question: string;
53
excerpt: string;
54
tags?: string[];
55
pinned?: boolean;
56
sourceViewId?: string;
57
createdAt: string;
58
updatedAt?: string;
59
}
60
61
export interface PersonalNote {
62
id: string;
63
title: string;
64
content: string;
65
tags?: string[];
66
pinned?: boolean;
67
createdAt: string;
68
updatedAt?: string;
69
}
70
71
export interface SecurityLogEntry {
72
id: string;
73
type: 'login_success' | 'login_failure' | 'login_blocked' | 'automatic_block' | 'signup_success' | 'admin_action' | 'access_denied' | 'feature_use';
74
actor: string | null;
75
target?: string | null;
76
action: string;
77
detail?: string;
78
ip?: string;
79
userAgent?: string;
80
path?: string;
81
createdAt: string;
82
}
83
84
// 애플리케이션 설정 인터페이스
85
export interface Settings {
86
isSignupEnabled: boolean;
87
isAnonymousPostingEnabled: boolean;
88
isGptEnabled: boolean;
89
isSubwayApiEnabled?: boolean;
90
isPushEnabled?: boolean;
91
isDiscordShareEnabled?: boolean;
92
isDiscordPersonaCommandEnabled?: boolean;
93
isDiscordAiCommandEnabled?: boolean;
94
isDiscordSearchCommandEnabled?: boolean;
95
}
96
97
export interface DiscordSearchSource {
98
title: string;
99
url: string;
100
}
101
102
export interface DiscordSearchArchiveEntry {
103
id: string;
104
guildId: string | null;
105
guildName: string;
106
channelId: string;
107
discordUserId: string;
108
discordUsername: string;
109
hinanaUsername: string;
110
personaSlot?: number;
111
personaName?: string;
112
question: string;
113
answer: string;
114
sources: DiscordSearchSource[];
115
model: string;
116
[SECURITY REDACTED] 민감한 설정/인증/토큰 관련 코드입니다.
117
[SECURITY REDACTED] 민감한 설정/인증/토큰 관련 코드입니다.
118
[SECURITY REDACTED] 민감한 설정/인증/토큰 관련 코드입니다.
119
[SECURITY REDACTED] 민감한 설정/인증/토큰 관련 코드입니다.
120
searchCalls: number;
121
createdAt: string;
122
isHidden?: boolean;
123
}
124
125
// 서버 설정 인터페이스
126
export interface Config {
127
Use_Port: number;
128
Use_SSH_Port: number;
129
}
130
131
// 광장 메시지 인터페이스
132
export interface PlazaMessage {
133
id: string;
134
username: string;
135
content: string;
136
timestamp: string;
137
}
138
139
// 페르소나 인터페이스
140
export interface Persona {
141
hinanaUsername: string;
142
discordUserId: string;
143
discordUsername: string;
144
personaSlot?: number;
145
isActive?: boolean;
146
personaName?: string;
147
persona: string;
148
createdAt: string;
149
updatedAt: string;
150
}
151
152
// Discord AI Chat 아카이브 엔트리 인터페이스
153
export interface DiscordChatArchiveEntry {
154
id: string;
155
guildId: string | null; // DM인 경우 null
156
guildName: string; // DM인 경우 'DM'
157
channelId: string;
158
discordUserId: string;
159
discordUsername: string;
160
hinanaUsername: string;
161
personaSlot: number;
162
personaName: string;
163
question: string;
164
answer: string;
165
model: string;
166
[SECURITY REDACTED] 민감한 설정/인증/토큰 관련 코드입니다.
167
isHidden?: boolean; // 관리자 숨김 처리 (관리자만 열람 가능)
168
createdAt: string;
169
}
170
171
// 테트리스 스코어 인터페이스
172
export interface TetrisScore {
173
username: string;
174
score: number;
175
lines: number;
176
lines4: number;
177
playTime: number;
178
hinanaScore: number;
179
timestamp: string;
180
}
181