Repository navigation
Expand file tree
/
Copy pathtraining-platform-architecture.html
More file actions
133 lines (129 loc) · 8.32 KB
/
Copy pathtraining-platform-architecture.html
File metadata and controls
133 lines (129 loc) · 8.32 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
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>사내 교육 플랫폼 구조도</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
font-family: 'Pretendard', 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', 'Noto Sans CJK KR', sans-serif;
background: #ffffff; color: #0f172a; padding: 32px;
}
#capture { width: 1200px; margin: 0 auto; background: #ffffff; padding: 8px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 16px; }
h1 { font-size: 26px; font-weight: 700; }
.sub { color: #475569; font-size: 15px; margin-top: 6px; }
.btn { font: inherit; font-size: 13px; padding: 6px 12px; border: 1px solid #cbd5e1; border-radius: 6px; background: #f8fafc; cursor: pointer; }
.frame { border: 1px solid #e2e8f0; border-radius: 12px; padding: 16px; }
#diagram { display: block; width: 100%; height: auto; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 16px; }
.card { border: 1px solid #e2e8f0; border-radius: 10px; padding: 14px 16px; }
.card h3 { font-size: 15px; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.card li { font-size: 13px; color: #475569; margin-left: 16px; margin-bottom: 4px; }
.foot { color: #94a3b8; font-size: 12px; margin-top: 12px; text-align: right; }
@media print { .btn { display: none; } }
.capture .btn { display: none; }
.capture body { padding: 16px; } .capture #capture { margin: 0; }
</style>
</head>
<body>
<div id="capture">
<div class="head">
<div>
<h1>사내 교육 플랫폼 구조도</h1>
<p class="sub">두 화면 모두 API 서버를 거친다</p>
</div>
<button class="btn" onclick="savePng()">PNG로 저장</button>
</div>
<div class="frame">
<svg id="diagram" xmlns="http://www.w3.org/2000/svg" viewBox="20 90 1060 436">
<style>text { font-family: 'Pretendard','Apple SD Gothic Neo','Malgun Gothic','Noto Sans KR','Noto Sans CJK KR',sans-serif; }</style>
<defs>
<marker id="arrow" markerWidth="10" markerHeight="8" refX="9" refY="4" orient="auto">
<polygon points="0 0, 10 4, 0 8" fill="#475569"/>
</marker>
</defs>
<rect width="1160" height="620" fill="#ffffff"/>
<path d="M 220 210 L 308 210" fill="none" stroke="#475569" stroke-width="2" marker-end="url(#arrow)"/>
<path d="M 220 410 L 308 410" fill="none" stroke="#475569" stroke-width="2" marker-end="url(#arrow)"/>
<path d="M 510 210 L 545 210 L 545 300 L 578 300" fill="none" stroke="#475569" stroke-width="2" marker-end="url(#arrow)"/>
<path d="M 510 410 L 545 410 L 545 350 L 578 350" fill="none" stroke="#475569" stroke-width="2" marker-end="url(#arrow)"/>
<path d="M 680 280 L 680 182" fill="none" stroke="#e11d48" stroke-width="2" stroke-dasharray="6,4" marker-end="url(#arrow)"/>
<text x="692" y="236" font-size="13" font-weight="500" fill="#e11d48">인증 확인</text>
<path d="M 780 305 L 820 305 L 820 245 L 858 245" fill="none" stroke="#475569" stroke-width="2" marker-end="url(#arrow)"/>
<path d="M 780 345 L 820 345 L 820 415 L 858 415" fill="none" stroke="#475569" stroke-width="2" marker-end="url(#arrow)"/>
<rect x="40" y="175" width="180" height="70" rx="10" fill="#ffffff"/>
<rect x="40" y="175" width="180" height="70" rx="10" fill="#f1f5f9" stroke="#64748b" stroke-width="2"/>
<text x="130.0" y="216.0" font-size="16" font-weight="600" fill="#0f172a" text-anchor="middle">수강생</text>
<rect x="40" y="375" width="180" height="70" rx="10" fill="#ffffff"/>
<rect x="40" y="375" width="180" height="70" rx="10" fill="#f1f5f9" stroke="#64748b" stroke-width="2"/>
<text x="130.0" y="416.0" font-size="16" font-weight="600" fill="#0f172a" text-anchor="middle">강사·관리자</text>
<rect x="310" y="175" width="200" height="70" rx="10" fill="#ffffff"/>
<rect x="310" y="175" width="200" height="70" rx="10" fill="#cffafe" stroke="#0891b2" stroke-width="2"/>
<text x="410.0" y="216.0" font-size="16" font-weight="600" fill="#0f172a" text-anchor="middle">수강생 웹</text>
<rect x="310" y="375" width="200" height="70" rx="10" fill="#ffffff"/>
<rect x="310" y="375" width="200" height="70" rx="10" fill="#cffafe" stroke="#0891b2" stroke-width="2"/>
<text x="410.0" y="416.0" font-size="16" font-weight="600" fill="#0f172a" text-anchor="middle">관리자 화면</text>
<rect x="580" y="110" width="200" height="70" rx="10" fill="#ffffff"/>
<rect x="580" y="110" width="200" height="70" rx="10" fill="#ffe4e6" stroke="#e11d48" stroke-width="2"/>
<text x="680.0" y="143.0" font-size="16" font-weight="600" fill="#0f172a" text-anchor="middle">인증</text>
<text x="680.0" y="163.0" font-size="12" fill="#475569" text-anchor="middle">사내 계정 로그인</text>
<rect x="580" y="280" width="200" height="90" rx="10" fill="#ffffff"/>
<rect x="580" y="280" width="200" height="90" rx="10" fill="#d1fae5" stroke="#059669" stroke-width="2"/>
<text x="680.0" y="331.0" font-size="16" font-weight="600" fill="#0f172a" text-anchor="middle">API 서버</text>
<path d="M 860 212 L 860 278 A 100 12 0 0 0 1060 278 L 1060 212" fill="#ffffff"/>
<ellipse cx="960" cy="212" rx="100" ry="12" fill="#ffffff"/>
<path d="M 860 212 L 860 278 A 100 12 0 0 0 1060 278 L 1060 212" fill="#ede9fe" stroke="#7c3aed" stroke-width="2"/>
<ellipse cx="960" cy="212" rx="100" ry="12" fill="#ede9fe" stroke="#7c3aed" stroke-width="2"/>
<text x="960" y="256" font-size="16" font-weight="600" fill="#0f172a" text-anchor="middle">수강 기록 DB</text>
<rect x="860" y="380" width="200" height="70" rx="10" fill="#ffffff"/>
<rect x="860" y="380" width="200" height="70" rx="10" fill="#ede9fe" stroke="#7c3aed" stroke-width="2"/>
<text x="960.0" y="413.0" font-size="16" font-weight="600" fill="#0f172a" text-anchor="middle">자료 저장소</text>
<text x="960.0" y="433.0" font-size="12" fill="#475569" text-anchor="middle">PDF·영상</text>
<rect x="40" y="490" width="16" height="16" rx="3" fill="#f1f5f9" stroke="#64748b" stroke-width="1.5"/>
<text x="64" y="503" font-size="13" fill="#475569">사용자</text>
<rect x="140" y="490" width="16" height="16" rx="3" fill="#cffafe" stroke="#0891b2" stroke-width="1.5"/>
<text x="164" y="503" font-size="13" fill="#475569">화면</text>
<rect x="240" y="490" width="16" height="16" rx="3" fill="#d1fae5" stroke="#059669" stroke-width="1.5"/>
<text x="264" y="503" font-size="13" fill="#475569">서버</text>
<rect x="340" y="490" width="16" height="16" rx="3" fill="#ede9fe" stroke="#7c3aed" stroke-width="1.5"/>
<text x="364" y="503" font-size="13" fill="#475569">데이터</text>
<rect x="440" y="490" width="16" height="16" rx="3" fill="#ffe4e6" stroke="#e11d48" stroke-width="1.5"/>
<text x="464" y="503" font-size="13" fill="#475569">인증</text>
</svg>
</div>
<div class="cards">
<div class="card"><h3><span class="dot" style="background:#0891b2"></span>구성</h3>
<ul><li>수강생 웹, 관리자 화면</li><li>API 서버, 인증</li><li>수강 기록 DB, 자료 저장소</li></ul></div>
<div class="card"><h3><span class="dot" style="background:#059669"></span>데이터 흐름</h3>
<ul><li>수강생은 수강생 웹, 강사·관리자는 관리자 화면을 쓴다</li><li>두 화면 모두 API 서버를 거친다</li><li>API 서버가 수강 기록 DB와 자료 저장소(PDF·영상)에 접근한다</li></ul></div>
<div class="card"><h3><span class="dot" style="background:#e11d48"></span>인증</h3>
<ul><li>API 서버가 인증을 확인한다</li><li>사내 계정으로 로그인한다</li></ul></div>
</div>
<p class="foot"></p>
</div>
<script>
function savePng() {
var svg = document.getElementById('diagram');
var vb = svg.viewBox.baseVal;
var scale = 2;
var xml = new XMLSerializer().serializeToString(svg);
var img = new Image();
img.onload = function () {
var c = document.createElement('canvas');
c.width = vb.width * scale; c.height = vb.height * scale;
var ctx = c.getContext('2d');
ctx.fillStyle = '#ffffff'; ctx.fillRect(0, 0, c.width, c.height);
ctx.drawImage(img, 0, 0, c.width, c.height);
var a = document.createElement('a');
a.download = (document.title || 'diagram') + '.png';
a.href = c.toDataURL('image/png');
a.click();
};
img.src = 'data:image/svg+xml;charset=utf-8,' + encodeURIComponent(xml);
}
</script>
</body>
</html>