forked from kennethkutyn/AmpliStack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
203 lines (194 loc) · 11.5 KB
/
index.html
File metadata and controls
203 lines (194 loc) · 11.5 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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Untitled Diagram | Amplistack</title>
<link rel="icon" href="assets/favicon.svg" type="image/svg+xml">
<link rel="stylesheet" href="styles.css">
<script src="https://cdn.amplitude.com/script/b9c4712e45db54f13f1ce8785be948cd.js"></script>
<script>
window.amplitude.add(window.sessionReplay.plugin({ sampleRate: 1 }));
window.amplitude.init('b9c4712e45db54f13f1ce8785be948cd', {
fetchRemoteConfig: true,
autocapture: false
});
</script>
</head>
<body>
<div class="app-body">
<aside class="sidebar">
<div class="sidebar-header">
<div class="logo">
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="32" height="32" rx="8" fill="#1E61DC"/>
<path d="M16 6L26 26H6L16 6Z" fill="white"/>
</svg>
<span class="logo-text">AmpliStack</span>
</div>
</div>
<div class="category-picker">
<button class="category-tab active" data-category="marketing" title="Marketing Channels">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M22 12h-4l-3 9L9 3l-3 9H2"/>
</svg>
</button>
<button class="category-tab" data-category="experiences" title="Owned Experiences">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<rect x="2" y="3" width="20" height="14" rx="2"/>
<line x1="8" y1="21" x2="16" y2="21"/>
<line x1="12" y1="17" x2="12" y2="21"/>
</svg>
</button>
<button class="category-tab" data-category="sources" title="Data Sources">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<ellipse cx="12" cy="5" rx="9" ry="3"/>
<path d="M21 12c0 1.66-4 3-9 3s-9-1.34-9-3"/>
<path d="M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5"/>
</svg>
</button>
<button class="category-tab" data-category="analysis" title="Analysis / Warehouse">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<line x1="18" y1="20" x2="18" y2="10"/>
<line x1="12" y1="20" x2="12" y2="4"/>
<line x1="6" y1="20" x2="6" y2="14"/>
</svg>
</button>
<button class="category-tab" data-category="activation" title="Activation">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"/>
</svg>
</button>
</div>
<div class="sidebar-section">
<ul class="component-list" id="component-list">
<!-- Components will be rendered by JavaScript -->
</ul>
</div>
<div class="add-custom">
<div class="add-custom-input-wrapper">
<input type="text" id="custom-entry-input" class="add-custom-input" placeholder="Add custom entry...">
<button id="add-custom-btn" class="add-custom-btn" title="Add">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<line x1="12" y1="5" x2="12" y2="19"/>
<line x1="5" y1="12" x2="19" y2="12"/>
</svg>
</button>
</div>
</div>
<details class="templates-section" id="templates-section">
<summary class="templates-summary" aria-expanded="false">
<span>Templates</span>
<svg class="templates-chevron" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M6 9l6 6 6-6"/>
</svg>
</summary>
<ul class="templates-list" aria-label="Template architecture diagrams">
<li><button type="button" class="template-option" data-template="amplitude-to-warehouse">Amplitude → Warehouse</button></li>
<li><button type="button" class="template-option" data-template="warehouse-to-amplitude">Warehouse → Amplitude</button></li>
<li><button type="button" class="template-option" data-template="cdp-in-the-middle">CDP in the Middle</button></li>
<li><button type="button" class="template-option" data-template="activation">Amplitude as Activation</button></li>
</ul>
</details>
<div class="custom-toolbar" aria-label="Diagram actions">
<button class="toolbar-btn" id="copy-link-btn" aria-label="Copy link" title="Copy diagram link">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<rect x="9" y="9" width="13" height="13" rx="2"></rect>
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>
</svg>
<span>Copy Link</span>
</button>
<button class="toolbar-btn" id="refresh-btn" aria-label="Refresh diagram" title="Refresh diagram">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M23 4v6h-6"></path>
<path d="M1 20v-6h6"></path>
<path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10"></path>
<path d="M20.49 15a9 9 0 0 1-14.85 3.36L1 14"></path>
</svg>
<span>Refresh</span>
</button>
<button class="toolbar-btn" id="export-btn" aria-label="Export diagram" title="Export diagram">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<circle cx="12" cy="12" r="9"></circle>
<path d="M8 12h8M12 16l4-4-4-4"></path>
</svg>
<span>Screenshot</span>
</button>
<button class="toolbar-btn ai-btn" id="ai-btn" aria-label="AI assist" title="AI assist">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M12 3 13.4 7.2H18l-3.5 2.6 1.3 4.1L12 11.6 8.2 13.9 9.5 9.8 6 7.2h4.6Z"></path>
<path d="M6.5 14.5 7.3 16.8H9.7L7.8 18.2l.7 2.3-2-1.4-2 1.4.7-2.3-1.9-1.4h2.4Z"></path>
</svg>
<span>AI</span>
</button>
</div>
</aside>
<main class="canvas-container">
<div class="diagram-header">
<div
class="diagram-title"
id="diagram-title"
contenteditable="true"
role="textbox"
aria-label="Diagram title"
>
Untitled Diagram
</div>
<div class="diagram-last-edited" id="diagram-last-edited" aria-live="polite">
Last edited: --
</div>
</div>
<div class="canvas">
<div class="layer layer-marketing" data-layer="marketing">
<div class="layer-label">Marketing Channels</div>
<div class="layer-content"></div>
</div>
<div class="layer layer-experiences" data-layer="experiences">
<div class="layer-label">Owned Experiences</div>
<div class="layer-content"></div>
</div>
<div class="layer layer-sources" data-layer="sources">
<div class="layer-label">Data Sources</div>
<div class="layer-content"></div>
</div>
<div class="layer layer-analysis" data-layer="analysis">
<div class="layer-label">Analysis / Warehouse</div>
<div class="layer-content"></div>
</div>
<div class="layer layer-activation" data-layer="activation">
<div class="layer-label">Activation</div>
<div class="layer-content"></div>
</div>
</div>
</main>
</div>
<nav style="display: none;" class="model-picker" aria-label="Architecture models">
<button class="model-option active" type="button" data-model="amplitude-to-warehouse">Amplitude → Warehouse</button>
<button class="model-option" type="button" data-model="warehouse-to-amplitude">Warehouse → Amplitude</button>
<button class="model-option" type="button" data-model="cdp-in-the-middle">CDP in the Middle</button>
</nav>
<script>
window.AMPLISTACK_API_BASE_URL = 'https://amplistack-production.up.railway.app';
//window.AMPLISTACK_API_BASE_URL = 'http://localhost:3000';
</script>
<div class="ai-dialog" id="ai-dialog" role="dialog" aria-modal="true" aria-labelledby="ai-dialog-title" hidden>
<div class="ai-dialog__content">
<h2 id="ai-dialog-title">Generate with AI</h2>
<p class="ai-dialog__subtitle">
Provide a description, Granola notes, or call transcript to auto generate an architecture diagram.
</p>
<label class="sr-only" for="ai-input">AI input</label>
<textarea id="ai-input" class="ai-dialog__textarea" rows="6" placeholder="Paste notes or transcript here..."></textarea>
<div class="ai-dialog__loading" id="ai-loading" hidden>
<div class="ai-spinner" aria-hidden="true"></div>
<div class="ai-dialog__loading-text">Processing</div>
</div>
<div class="ai-dialog__actions">
<button type="button" id="ai-cancel-btn" class="ai-dialog__btn ai-dialog__btn--secondary">Cancel</button>
<button type="button" id="ai-submit-btn" class="ai-dialog__btn ai-dialog__btn--primary">Submit</button>
</div>
</div>
</div>
<script type="module" src="app.js"></script>
</body>
</html>