-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.html
More file actions
390 lines (361 loc) · 22.9 KB
/
Copy pathapp.html
File metadata and controls
390 lines (361 loc) · 22.9 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
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
<!DOCTYPE html>
<html lang="en" data-theme="dark">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="PromptShelf - Store, organize, and version your AI prompts. Cloud sync, MCP integration for Claude Desktop, and automatic versioning.">
<!-- Open Graph / Social Media -->
<meta property="og:type" content="website">
<meta property="og:url" content="https://promptshelf-75139.web.app">
<meta property="og:title" content="PromptShelf - AI Prompt Management">
<meta property="og:description" content="Store, organize, and version your AI prompts. Cloud sync across devices. MCP integration for Claude Desktop.">
<meta property="og:image" content="https://promptshelf-75139.web.app/og-image.png">
<!-- Twitter -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:url" content="https://promptshelf-75139.web.app">
<meta name="twitter:title" content="PromptShelf - AI Prompt Management">
<meta name="twitter:description" content="Store, organize, and version your AI prompts. Cloud sync across devices. MCP integration for Claude Desktop.">
<meta name="twitter:image" content="https://promptshelf-75139.web.app/og-image.png">
<!-- Favicon -->
<link rel="icon" type="image/svg+xml" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><defs><linearGradient id='g' x1='0%25' y1='0%25' x2='100%25' y2='100%25'><stop offset='0%25' style='stop-color:%23667eea'/><stop offset='100%25' style='stop-color:%23764ba2'/></linearGradient></defs><rect width='100' height='100' rx='20' fill='url(%23g)'/><path d='M25 20h50a5 5 0 0 1 5 5v50a5 5 0 0 1-5 5H25a5 5 0 0 1-5-5V25a5 5 0 0 1 5-5z' fill='white' opacity='0.9'/><line x1='30' y1='35' x2='70' y2='35' stroke='%23667eea' stroke-width='4' stroke-linecap='round'/><line x1='30' y1='50' x2='60' y2='50' stroke='%23667eea' stroke-width='4' stroke-linecap='round' opacity='0.6'/><line x1='30' y1='65' x2='55' y2='65' stroke='%23667eea' stroke-width='4' stroke-linecap='round' opacity='0.4'/></svg>">
<link rel="apple-touch-icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><defs><linearGradient id='g' x1='0%25' y1='0%25' x2='100%25' y2='100%25'><stop offset='0%25' style='stop-color:%23667eea'/><stop offset='100%25' style='stop-color:%23764ba2'/></linearGradient></defs><rect width='100' height='100' rx='20' fill='url(%23g)'/><path d='M25 20h50a5 5 0 0 1 5 5v50a5 5 0 0 1-5 5H25a5 5 0 0 1-5-5V25a5 5 0 0 1 5-5z' fill='white' opacity='0.9'/><line x1='30' y1='35' x2='70' y2='35' stroke='%23667eea' stroke-width='4' stroke-linecap='round'/><line x1='30' y1='50' x2='60' y2='50' stroke='%23667eea' stroke-width='4' stroke-linecap='round' opacity='0.6'/><line x1='30' y1='65' x2='55' y2='65' stroke='%23667eea' stroke-width='4' stroke-linecap='round' opacity='0.4'/></svg>">
<title>PromptShelf - AI Prompt Management</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500&display=swap" rel="stylesheet" />
<link rel="stylesheet" href="styles.css?v=20260607">
<!-- Firebase SDK -->
<script src="https://www.gstatic.com/firebasejs/10.7.1/firebase-app-compat.js"></script>
<script src="https://www.gstatic.com/firebasejs/10.7.1/firebase-auth-compat.js"></script>
<script src="https://www.gstatic.com/firebasejs/10.7.1/firebase-firestore-compat.js"></script>
</head>
<body>
<!-- Loading Screen -->
<div id="loading-screen" class="loading-screen">
<div class="loading-content">
<h1>PromptShelf</h1>
<div class="loading-spinner"></div>
</div>
</div>
<!-- Login Screen -->
<div id="login-screen" class="login-screen hidden">
<div class="login-card">
<div class="login-brand-heading">
<svg viewBox="0 0 24 24" fill="none" width="32" height="32"><path d="M4 7h16M4 12h16M4 17h10" stroke="currentColor" stroke-width="2.2" stroke-linecap="round"/></svg>
<h1>PromptShelf</h1>
</div>
<p class="login-subtitle">Sign in to manage your prompts</p>
<form id="login-form" class="login-form">
<div class="form-group">
<label for="login-email">Email</label>
<input type="email" id="login-email" required placeholder="you@example.com" autocomplete="email">
</div>
<div class="form-group">
<label for="login-password">Password</label>
<input type="password" id="login-password" required placeholder="Password" minlength="6" autocomplete="current-password">
</div>
<div id="login-error" class="login-error hidden"></div>
<button type="submit" id="login-submit-btn" class="btn primary full-width">Sign In</button>
</form>
<div class="login-divider"><span>or</span></div>
<button type="button" id="github-login-btn" class="btn github-btn full-width">
<svg viewBox="0 0 24 24" fill="currentColor" width="20" height="20">
<path d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z"/>
</svg>
Continue with GitHub
</button>
<div class="login-switch">
<span id="login-switch-text">Don't have an account?</span>
<button type="button" id="login-switch-btn" class="btn-link">Sign Up</button>
</div>
</div>
</div>
<!-- Profile Page -->
<div id="profile-page" class="profile-page hidden">
<div class="profile-container">
<div class="profile-header">
<button id="profile-back-btn" class="btn-icon" title="Back">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M19 12H5M12 19l-7-7 7-7"/>
</svg>
</button>
<h1>Profile</h1>
</div>
<div class="profile-content">
<div class="profile-avatar-section">
<div id="profile-avatar" class="profile-avatar">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/>
<circle cx="12" cy="7" r="4"/>
</svg>
</div>
<div id="profile-name" class="profile-name"></div>
<div id="profile-email" class="profile-email-display"></div>
</div>
<div class="profile-section">
<h3>Account Information</h3>
<div class="profile-info-grid">
<div class="profile-info-item">
<span class="profile-label">Email</span>
<span id="profile-info-email" class="profile-value"></span>
</div>
<div class="profile-info-item">
<span class="profile-label">Account Created</span>
<span id="profile-created" class="profile-value"></span>
</div>
<div class="profile-info-item">
<span class="profile-label">Last Sign In</span>
<span id="profile-last-signin" class="profile-value"></span>
</div>
<div class="profile-info-item">
<span class="profile-label">User ID</span>
<span id="profile-uid" class="profile-value profile-uid"></span>
</div>
</div>
</div>
<div class="profile-section">
<h3>Connected Accounts</h3>
<div id="profile-providers" class="profile-providers"></div>
</div>
<div class="profile-section">
<h3>API Key</h3>
<p class="api-key-description">Use this key to access your prompts via the API.</p>
<div class="api-key-container">
<code id="profile-api-key" class="api-key-value">Loading...</code>
<button id="copy-api-key-btn" class="btn-icon" title="Copy API Key">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<rect x="9" y="9" width="13" height="13" rx="2" ry="2"/>
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/>
</svg>
</button>
</div>
<button id="regenerate-api-key-btn" class="btn secondary full-width" style="margin-top: 12px;">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" style="width: 16px; height: 16px; margin-right: 8px;">
<path d="M23 4v6h-6M1 20v-6h6"/>
<path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"/>
</svg>
Regenerate API Key
</button>
</div>
<div class="profile-section">
<h3>MCP Connection</h3>
<p class="api-key-description">Connect Claude Desktop or other MCP clients to access your prompts.</p>
<div class="mcp-endpoint">
<label>Endpoint URL</label>
<div class="api-key-container">
<code id="mcp-endpoint-url" class="api-key-value">https://us-central1-promptshelf-75139.cloudfunctions.net/mcp</code>
<button id="copy-mcp-url-btn" class="btn-icon" title="Copy URL">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<rect x="9" y="9" width="13" height="13" rx="2" ry="2"/>
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/>
</svg>
</button>
</div>
</div>
<div class="mcp-config" style="margin-top: 16px;">
<label>Claude Desktop Config</label>
<div class="mcp-config-container">
<pre id="mcp-config-json" class="mcp-config-code">Loading...</pre>
<button id="copy-mcp-config-btn" class="btn-icon" title="Copy Config">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<rect x="9" y="9" width="13" height="13" rx="2" ry="2"/>
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/>
</svg>
</button>
</div>
<p class="mcp-config-help">Add this to <code>~/Library/Application Support/Claude/claude_desktop_config.json</code></p>
</div>
</div>
<div class="profile-section">
<h3>Danger Zone</h3>
<button id="profile-signout-btn" class="btn danger full-width">Sign Out</button>
</div>
</div>
</div>
</div>
<div class="app-container hidden" id="app-container">
<!-- Header -->
<header class="header">
<div class="header-logo">PromptShelf</div>
<div class="header-actions">
<button id="import-btn" class="btn-icon" title="Import prompts">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/>
<polyline points="17 8 12 3 7 8"/>
<line x1="12" y1="3" x2="12" y2="15"/>
</svg>
</button>
<input type="file" id="import-input" accept=".json" hidden>
<button id="export-btn" class="btn-icon" title="Export prompt">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/>
<polyline points="7 10 12 15 17 10"/>
<line x1="12" y1="15" x2="12" y2="3"/>
</svg>
</button>
<button id="dark-mode-toggle" class="btn-icon" title="Toggle dark mode">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"/>
</svg>
</button>
<!-- Auth Button (logged out) -->
<button id="auth-btn" class="btn-icon" title="Sign in to sync">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/>
<circle cx="12" cy="7" r="4"/>
</svg>
</button>
<!-- User Menu (logged in) -->
<div id="user-menu" class="user-menu hidden">
<button id="user-menu-btn" class="btn-icon user-avatar" title="Account">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/>
<circle cx="12" cy="7" r="4"/>
</svg>
</button>
<div id="user-dropdown" class="user-dropdown hidden">
<div id="user-email" class="user-email"></div>
<div id="sync-status" class="sync-status"></div>
<button id="profile-btn" class="dropdown-item">Profile</button>
<button id="sync-now-btn" class="dropdown-item">Backup to Cloud</button>
<button id="logout-btn" class="dropdown-item danger">Sign Out</button>
</div>
</div>
</div>
</header>
<!-- Main Container -->
<main class="main-container">
<!-- Sidebar -->
<aside class="sidebar" id="sidebar">
<div class="sidebar-header">
<button id="new-prompt-btn" class="btn" style="width: 100%;">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" style="width: 16px; height: 16px;">
<line x1="12" y1="5" x2="12" y2="19"/>
<line x1="5" y1="12" x2="19" y2="12"/>
</svg>
New Prompt
</button>
<div class="search-container">
<input type="text" id="search-input" class="search-input" placeholder="Search prompts...">
</div>
</div>
<div id="tag-filter" class="tag-filter hidden"></div>
<div class="sidebar-content">
<div id="prompt-list" class="prompt-list"></div>
</div>
</aside>
<!-- Editor -->
<section class="editor" id="editor">
<!-- Empty State -->
<div id="editor-empty" class="editor-empty">
<p>Select a prompt or create a new one</p>
</div>
<!-- Editor Content -->
<div id="editor-content" class="editor-content hidden">
<div class="editor-header">
<div class="editor-row">
<div class="editor-field">
<label for="title-input">Title</label>
<input type="text" id="title-input" class="editor-input title" placeholder="Prompt title">
</div>
</div>
<div class="editor-row">
<div class="editor-field">
<label for="description-input">Description (optional)</label>
<input type="text" id="description-input" class="editor-input" placeholder="Brief description">
</div>
</div>
<div class="editor-row">
<div class="editor-field">
<label>Tags</label>
<div class="tag-input-row">
<div id="prompt-tags" class="prompt-tags"></div>
<div id="tag-input-container" class="tag-input-container">
<input type="text" id="tag-input" class="tag-input" placeholder="Add tag...">
<div id="tag-suggestions" class="tag-suggestions hidden"></div>
</div>
</div>
</div>
</div>
</div>
<div class="editor-body">
<div id="body-display" class="body-display"></div>
<textarea id="body-input" class="body-input hidden" placeholder="Write your prompt here..."></textarea>
</div>
<div class="editor-footer">
<div id="current-version-info" class="version-info"></div>
<div class="editor-actions">
<button id="delete-btn" class="btn danger" title="Delete prompt">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" style="width: 16px; height: 16px;">
<polyline points="3 6 5 6 21 6"/>
<path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/>
</svg>
</button>
<button id="history-btn" class="btn secondary" title="Version history">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" style="width: 16px; height: 16px;">
<circle cx="12" cy="12" r="10"/>
<polyline points="12 6 12 12 16 14"/>
</svg>
History
</button>
<button id="copy-btn" class="btn secondary" title="Copy prompt">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" style="width: 16px; height: 16px;">
<rect x="9" y="9" width="13" height="13" rx="2" ry="2"/>
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/>
</svg>
Copy
</button>
<button id="edit-btn" class="btn secondary" title="Edit prompt">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" style="width: 16px; height: 16px;">
<path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"/>
<path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"/>
</svg>
Edit
</button>
<button id="save-btn" class="btn hidden">Save</button>
<button id="cancel-edit-btn" class="btn secondary hidden">Cancel</button>
</div>
</div>
</div>
</section>
<!-- Version Panel -->
<aside id="version-panel" class="version-panel hidden">
<div class="version-panel-header">Version History</div>
<div id="version-list" class="version-list"></div>
</aside>
</main>
</div>
<!-- Modal -->
<div id="modal" class="modal hidden">
<div id="modal-content" class="modal-content"></div>
</div>
<!-- Auth Modal -->
<div id="auth-modal" class="modal hidden">
<div class="modal-content auth-modal-content">
<button class="modal-close" data-action="close-auth-modal">×</button>
<h2 id="auth-modal-title">Sign In</h2>
<p class="auth-subtitle">Sync your prompts across devices</p>
<form id="auth-form">
<div class="form-group">
<label for="auth-email">Email</label>
<input type="email" id="auth-email" required placeholder="you@example.com">
</div>
<div class="form-group">
<label for="auth-password">Password</label>
<input type="password" id="auth-password" required placeholder="Password" minlength="6" autocomplete="current-password">
</div>
<div id="auth-error" class="auth-error hidden"></div>
<button type="submit" id="auth-submit-btn" class="btn primary full-width">Sign In</button>
</form>
<div class="auth-switch">
<span id="auth-switch-text">Don't have an account?</span>
<button type="button" id="auth-switch-btn" class="btn-link">Sign Up</button>
</div>
</div>
</div>
<!-- Toast -->
<div id="toast" class="toast hidden"></div>
<!-- App Script -->
<script src="app.js?v=20241220-2"></script>
</body>
</html>