a40login commited on
Commit
7881238
·
verified ·
1 Parent(s): 7151bab

Add 2 files

Browse files
Files changed (2) hide show
  1. index.html +490 -133
  2. prompts.txt +3 -1
index.html CHANGED
@@ -1,149 +1,506 @@
1
  <!DOCTYPE html>
2
- <html lang="de">
3
  <head>
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>KI Dashboard MVP</title>
7
- <script src="https://unpkg.com/react@18/umd/react.development.js"></script>
8
- <script src="https://unpkg.com/react-dom@18/umd/react-dom.development.js"></script>
9
- <script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
10
  <style>
11
- body { font-family: sans-serif; max-width: 800px; margin: 0 auto; padding: 20px; }
12
- section { margin-bottom: 30px; border: 1px solid #ddd; padding: 15px; border-radius: 5px; }
13
- button { padding: 8px 15px; margin-right: 10px; cursor: pointer; }
14
- input, textarea { width: 100%; padding: 8px; margin: 5px 0; }
15
- pre { background: #f5f5f5; padding: 10px; border-radius: 3px; overflow-x: auto; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  </style>
17
  </head>
18
- <body>
19
- <div id="root"></div>
20
-
21
- <script type="text/babel">
22
- const { useState } = React;
23
-
24
- function App() {
25
- // Webhook State
26
- const [webhookResponse, setWebhookResponse] = useState(null);
27
- const [webhookLoading, setWebhookLoading] = useState(false);
28
-
29
- // Chat State
30
- const [message, setMessage] = useState('');
31
- const [chatHistory, setChatHistory] = useState([]);
32
- const [chatLoading, setChatLoading] = useState(false);
33
- const [apiKey] = useState('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'); // Nur für Demo - in Produktion niemals hartkodieren!
34
-
35
- // Webhook Handler
36
- const triggerWebhook = async (type) => {
37
- setWebhookLoading(true);
38
- try {
39
- const endpoint = type === 'generate'
40
- ? 'https://flowherodemo.app.n8n.cloud/webhook-test/4cd24f4b-e372-4403-990f-d3f974e5fe34t'
41
- : 'https://flowherodemo.app.n8n.cloud/webhook-test/d84f2fa2-fac1-47cb-ad21-fc8c88f9d972';
42
-
43
- const response = await fetch(endpoint, {
44
- method: 'POST',
45
- headers: { 'Content-Type': 'application/json' },
46
- body: JSON.stringify({ action: type })
47
- });
48
-
49
- const data = await response.json();
50
- setWebhookResponse(data);
51
- } catch (error) {
52
- setWebhookResponse({ error: error.message });
53
- } finally {
54
- setWebhookLoading(false);
55
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
  };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
 
58
- // Chat Handler
59
- const sendMessage = async () => {
60
- if (!message.trim()) return;
61
-
62
- setChatLoading(true);
63
- const userMessage = { role: 'user', content: message };
64
- setChatHistory(prev => [...prev, userMessage]);
65
- setMessage('');
66
-
67
- try {
68
- // Mock API Call - in echt würde man OpenAI etc. anfragen
69
- const response = await fetch('https://api.openai.com/v1/chat/completions', {
70
- method: 'POST',
71
- headers: {
72
- 'Content-Type': 'application/json',
73
- 'Authorization': `Bearer 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`
74
- },
75
- body: JSON.stringify({
76
- model: "gpt-3.5-turbo",
77
- messages: [...chatHistory, userMessage],
78
- temperature: 0.7
79
- })
80
- });
81
-
82
- const data = await response.json();
83
- const aiMessage = { role: 'assistant', content: data.choices[0].message.content };
84
- setChatHistory(prev => [...prev, aiMessage]);
85
- } catch (error) {
86
- const errorMessage = { role: 'assistant', content: `Fehler: ${error.message}` };
87
- setChatHistory(prev => [...prev, errorMessage]);
88
- } finally {
89
- setChatLoading(false);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
90
  }
91
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92
 
93
- return (
94
- <div>
95
- <h1>KI Dashboard MVP</h1>
96
-
97
- {/* Webhook Section */}
98
- <section>
99
- <h2>Webhook Trigger</h2>
100
- <div>
101
- <button onClick={() => triggerWebhook('generate')} disabled={webhookLoading}>
102
- {webhookLoading ? 'Lädt...' : 'Text generieren'}
103
- </button>
104
- <button onClick={() => triggerWebhook('analyze')} disabled={webhookLoading}>
105
- {webhookLoading ? 'Lädt...' : 'Analyse starten'}
106
- </button>
107
- </div>
108
-
109
- {webhookResponse && (
110
- <div style={{ marginTop: '15px' }}>
111
- <h3>Antwort:</h3>
112
- <pre>{JSON.stringify(webhookResponse, null, 2)}</pre>
113
- </div>
114
- )}
115
- </section>
116
-
117
- {/* Chat Section */}
118
- <section>
119
- <h2>AI Chat</h2>
120
- <div>
121
- {chatHistory.map((msg, i) => (
122
- <div key={i} style={{ margin: '5px 0', color: msg.role === 'user' ? 'blue' : 'green' }}>
123
- <strong>{msg.role === 'user' ? 'You:' : 'AI:'}</strong> {msg.content}
124
- </div>
125
- ))}
126
- </div>
127
-
128
- <div style={{ display: 'flex', marginTop: '10px' }}>
129
- <input
130
- type="text"
131
- value={message}
132
- onChange={(e) => setMessage(e.target.value)}
133
- placeholder="Nachricht eingeben..."
134
- onKeyPress={(e) => e.key === 'Enter' && sendMessage()}
135
- />
136
- <button onClick={sendMessage} disabled={chatLoading}>
137
- {chatLoading ? 'Sendet...' : 'Senden'}
138
- </button>
139
- </div>
140
- </section>
141
- </div>
142
- );
 
 
 
 
 
 
 
 
 
 
 
 
143
  }
144
 
145
- const root = ReactDOM.createRoot(document.getElementById('root'));
146
- root.render(<App />);
 
 
 
 
 
 
147
  </script>
148
  <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=a40login/dashboard-mvp" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
149
  </html>
 
1
  <!DOCTYPE html>
2
+ <html lang="en">
3
  <head>
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>AI Workflow Dashboard</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
+ <script src="https://cdn.jsdelivr.net/npm/sortablejs@1.14.0/Sortable.min.js"></script>
10
  <style>
11
+ .kanban-column {
12
+ min-height: 300px;
13
+ background-color: #f8fafc;
14
+ border-radius: 0.5rem;
15
+ }
16
+ .kanban-card {
17
+ transition: all 0.2s ease;
18
+ cursor: grab;
19
+ }
20
+ .kanban-card:hover {
21
+ transform: translateY(-2px);
22
+ box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
23
+ }
24
+ .kanban-card:active {
25
+ cursor: grabbing;
26
+ }
27
+ .tab-active {
28
+ border-bottom: 3px solid #3b82f6;
29
+ color: #3b82f6;
30
+ }
31
+ .workflow-btn {
32
+ transition: all 0.2s ease;
33
+ }
34
+ .workflow-btn:hover {
35
+ transform: translateY(-2px);
36
+ }
37
+ #loading-overlay {
38
+ display: none;
39
+ }
40
+ .sortable-chosen {
41
+ opacity: 0.8;
42
+ background: #f0f9ff;
43
+ }
44
+ .sortable-ghost {
45
+ opacity: 0.4;
46
+ background: #dbeafe;
47
+ }
48
  </style>
49
  </head>
50
+ <body class="bg-gray-50 min-h-screen">
51
+ <div class="container mx-auto px-4 py-8">
52
+ <header class="mb-8">
53
+ <h1 class="text-3xl font-bold text-gray-800">AI Workflow Dashboard</h1>
54
+ <p class="text-gray-600">Manage all your AI workflows in one place</p>
55
+ </header>
56
+
57
+ <!-- Tabs -->
58
+ <div class="flex border-b mb-6">
59
+ <button id="workflows-tab" class="px-4 py-2 font-medium tab-active">
60
+ <i class="fas fa-bolt mr-2"></i>AI Workflows
61
+ </button>
62
+ <button id="chat-tab" class="px-4 py-2 font-medium text-gray-500">
63
+ <i class="fas fa-comment mr-2"></i>AI Chat
64
+ </button>
65
+ <button id="content-tab" class="px-4 py-2 font-medium text-gray-500">
66
+ <i class="fas fa-columns mr-2"></i>AI Content
67
+ </button>
68
+ </div>
69
+
70
+ <!-- Workflows Tab -->
71
+ <div id="workflows-content" class="bg-white rounded-lg shadow p-6">
72
+ <h2 class="text-xl font-semibold mb-4 text-gray-800">AI Workflows</h2>
73
+ <p class="text-gray-600 mb-6">Select a workflow to execute</p>
74
+
75
+ <div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-5 gap-4">
76
+ <!-- Summarize -->
77
+ <button onclick="triggerWorkflow('summarize')" class="bg-blue-100 hover:bg-blue-200 text-blue-800 workflow-btn rounded-lg p-4 flex flex-col items-center justify-center h-32 shadow-sm">
78
+ <i class="fas fa-file-lines text-2xl mb-2"></i>
79
+ <span>Summarize</span>
80
+ </button>
81
+
82
+ <!-- Translate -->
83
+ <button onclick="triggerWorkflow('translate')" class="bg-green-100 hover:bg-green-200 text-green-800 workflow-btn rounded-lg p-4 flex flex-col items-center justify-center h-32 shadow-sm">
84
+ <i class="fas fa-language text-2xl mb-2"></i>
85
+ <span>Translate</span>
86
+ </button>
87
+
88
+ <!-- Generate Text -->
89
+ <button onclick="triggerWorkflow('generate')" class="bg-purple-100 hover:bg-purple-200 text-purple-800 workflow-btn rounded-lg p-4 flex flex-col items-center justify-center h-32 shadow-sm">
90
+ <i class="fas fa-pen text-2xl mb-2"></i>
91
+ <span>Generate Text</span>
92
+ </button>
93
+
94
+ <!-- Analyze -->
95
+ <button onclick="triggerWorkflow('analyze')" class="bg-yellow-100 hover:bg-yellow-200 text-yellow-800 workflow-btn rounded-lg p-4 flex flex-col items-center justify-center h-32 shadow-sm">
96
+ <i class="fas fa-chart-bar text-2xl mb-2"></i>
97
+ <span>Analyze</span>
98
+ </button>
99
+
100
+ <!-- Extract -->
101
+ <button onclick="triggerWorkflow('extract')" class="bg-red-100 hover:bg-red-200 text-red-800 workflow-btn rounded-lg p-4 flex flex-col items-center justify-center h-32 shadow-sm">
102
+ <i class="fas fa-filter text-2xl mb-2"></i>
103
+ <span>Extract</span>
104
+ </button>
105
+
106
+ <!-- Classify -->
107
+ <button onclick="triggerWorkflow('classify')" class="bg-indigo-100 hover:bg-indigo-200 text-indigo-800 workflow-btn rounded-lg p-4 flex flex-col items-center justify-center h-32 shadow-sm">
108
+ <i class="fas fa-tags text-2xl mb-2"></i>
109
+ <span>Classify</span>
110
+ </button>
111
+
112
+ <!-- Rewrite -->
113
+ <button onclick="triggerWorkflow('rewrite')" class="bg-pink-100 hover:bg-pink-200 text-pink-800 workflow-btn rounded-lg p-4 flex flex-col items-center justify-center h-32 shadow-sm">
114
+ <i class="fas fa-pen-fancy text-2xl mb-2"></i>
115
+ <span>Rewrite</span>
116
+ </button>
117
+
118
+ <!-- Generate Code -->
119
+ <button onclick="triggerWorkflow('code')" class="bg-gray-100 hover:bg-gray-200 text-gray-800 workflow-btn rounded-lg p-4 flex flex-col items-center justify-center h-32 shadow-sm">
120
+ <i class="fas fa-code text-2xl mb-2"></i>
121
+ <span>Generate Code</span>
122
+ </button>
123
+
124
+ <!-- Q&A -->
125
+ <button onclick="triggerWorkflow('qa')" class="bg-teal-100 hover:bg-teal-200 text-teal-800 workflow-btn rounded-lg p-4 flex flex-col items-center justify-center h-32 shadow-sm">
126
+ <i class="fas fa-question text-2xl mb-2"></i>
127
+ <span>Q&A</span>
128
+ </button>
129
+
130
+ <!-- Generate Image -->
131
+ <button onclick="triggerWorkflow('image')" class="bg-orange-100 hover:bg-orange-200 text-orange-800 workflow-btn rounded-lg p-4 flex flex-col items-center justify-center h-32 shadow-sm">
132
+ <i class="fas fa-image text-2xl mb-2"></i>
133
+ <span>Generate Image</span>
134
+ </button>
135
+
136
+ <!-- Generate Audio -->
137
+ <button onclick="triggerWorkflow('audio')" class="bg-blue-100 hover:bg-blue-200 text-blue-800 workflow-btn rounded-lg p-4 flex flex-col items-center justify-center h-32 shadow-sm">
138
+ <i class="fas fa-music text-2xl mb-2"></i>
139
+ <span>Generate Audio</span>
140
+ </button>
141
+
142
+ <!-- Generate Video -->
143
+ <button onclick="triggerWorkflow('video')" class="bg-green-100 hover:bg-green-200 text-green-800 workflow-btn rounded-lg p-4 flex flex-col items-center justify-center h-32 shadow-sm">
144
+ <i class="fas fa-video text-2xl mb-2"></i>
145
+ <span>Generate Video</span>
146
+ </button>
147
+
148
+ <!-- Process Data -->
149
+ <button onclick="triggerWorkflow('data')" class="bg-purple-100 hover:bg-purple-200 text-purple-800 workflow-btn rounded-lg p-4 flex flex-col items-center justify-center h-32 shadow-sm">
150
+ <i class="fas fa-database text-2xl mb-2"></i>
151
+ <span>Process Data</span>
152
+ </button>
153
+
154
+ <!-- Generate Report -->
155
+ <button onclick="triggerWorkflow('report')" class="bg-yellow-100 hover:bg-yellow-200 text-yellow-800 workflow-btn rounded-lg p-4 flex flex-col items-center justify-center h-32 shadow-sm">
156
+ <i class="fas fa-file-alt text-2xl mb-2"></i>
157
+ <span>Generate Report</span>
158
+ </button>
159
+
160
+ <!-- Automate -->
161
+ <button onclick="triggerWorkflow('automate')" class="bg-red-100 hover:bg-red-200 text-red-800 workflow-btn rounded-lg p-4 flex flex-col items-center justify-center h-32 shadow-sm">
162
+ <i class="fas fa-robot text-2xl mb-2"></i>
163
+ <span>Automate</span>
164
+ </button>
165
+ </div>
166
+
167
+ <div id="response-container" class="mt-8 p-4 bg-gray-50 rounded-lg hidden">
168
+ <h3 class="font-medium text-gray-700 mb-2">Last Response:</h3>
169
+ <pre id="webhook-response" class="bg-white p-3 rounded overflow-x-auto text-sm"></pre>
170
+ </div>
171
+ </div>
172
+
173
+ <!-- Chat Tab -->
174
+ <div id="chat-content" class="bg-white rounded-lg shadow p-6 hidden">
175
+ <h2 class="text-xl font-semibold mb-4 text-gray-800">AI Chat</h2>
176
+
177
+ <div id="chat-history" class="mb-4 h-64 overflow-y-auto p-3 bg-gray-50 rounded-lg">
178
+ <!-- Chat messages will appear here -->
179
+ </div>
180
+
181
+ <div class="flex gap-2">
182
+ <input
183
+ type="text"
184
+ id="message-input"
185
+ placeholder="Type your message..."
186
+ class="flex-1 p-3 border rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500"
187
+ onkeypress="if(event.key === 'Enter') sendMessage()"
188
+ />
189
+ <button
190
+ id="send-button"
191
+ onclick="sendMessage()"
192
+ class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-lg flex items-center"
193
+ >
194
+ <i class="fas fa-paper-plane mr-2"></i> Send
195
+ </button>
196
+ </div>
197
+ </div>
198
+
199
+ <!-- AI Content Tab (Kanban) -->
200
+ <div id="content-content" class="bg-white rounded-lg shadow p-6 hidden">
201
+ <h2 class="text-xl font-semibold mb-6 text-gray-800">AI Content Kanban</h2>
202
+
203
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-4">
204
+ <!-- To Do Column -->
205
+ <div class="kanban-column p-4">
206
+ <h3 class="font-medium text-gray-700 mb-4 flex items-center">
207
+ <i class="fas fa-list-ul mr-2"></i> To Do
208
+ </h3>
209
+ <div id="todo-column" class="space-y-3 min-h-[300px]">
210
+ <!-- Cards will be added here -->
211
+ </div>
212
+ </div>
213
+
214
+ <!-- In Progress Column -->
215
+ <div class="kanban-column p-4">
216
+ <h3 class="font-medium text-gray-700 mb-4 flex items-center">
217
+ <i class="fas fa-spinner fa-spin mr-2"></i> In Progress
218
+ </h3>
219
+ <div id="inprogress-column" class="space-y-3 min-h-[300px]">
220
+ <!-- Cards will be added here -->
221
+ </div>
222
+ </div>
223
+
224
+ <!-- Done Column -->
225
+ <div class="kanban-column p-4">
226
+ <h3 class="font-medium text-gray-700 mb-4 flex items-center">
227
+ <i class="fas fa-check-circle mr-2"></i> Done
228
+ </h3>
229
+ <div id="done-column" class="space-y-3 min-h-[300px]">
230
+ <!-- Cards will be added here -->
231
+ </div>
232
+ </div>
233
+ </div>
234
+ </div>
235
+ </div>
236
+
237
+ <!-- Loading Overlay -->
238
+ <div id="loading-overlay" class="fixed inset-0 bg-black bg-opacity-30 flex items-center justify-center z-50 hidden">
239
+ <div class="bg-white p-6 rounded-lg shadow-xl flex items-center">
240
+ <i class="fas fa-spinner fa-spin text-blue-500 text-2xl mr-3"></i>
241
+ <span>Processing your request...</span>
242
+ </div>
243
+ </div>
244
+
245
+ <script>
246
+ // Tab switching functionality
247
+ document.getElementById('workflows-tab').addEventListener('click', () => switchTab('workflows'));
248
+ document.getElementById('chat-tab').addEventListener('click', () => switchTab('chat'));
249
+ document.getElementById('content-tab').addEventListener('click', () => switchTab('content'));
250
+
251
+ function switchTab(tabName) {
252
+ // Hide all content
253
+ document.getElementById('workflows-content').classList.add('hidden');
254
+ document.getElementById('chat-content').classList.add('hidden');
255
+ document.getElementById('content-content').classList.add('hidden');
256
+
257
+ // Remove active from all tabs
258
+ document.getElementById('workflows-tab').classList.remove('tab-active');
259
+ document.getElementById('chat-tab').classList.remove('tab-active');
260
+ document.getElementById('content-tab').classList.remove('tab-active');
261
+
262
+ // Show selected content and mark tab as active
263
+ document.getElementById(`${tabName}-content`).classList.remove('hidden');
264
+ document.getElementById(`${tabName}-tab`).classList.add('tab-active');
265
+ }
266
+
267
+ // Kanban board state
268
+ const kanbanColumns = {
269
+ todo: [],
270
+ inProgress: [],
271
+ done: []
272
+ };
273
+
274
+ // Initialize SortableJS for drag and drop
275
+ document.addEventListener('DOMContentLoaded', () => {
276
+ new Sortable(document.getElementById('todo-column'), {
277
+ group: 'shared',
278
+ animation: 150,
279
+ ghostClass: 'sortable-ghost',
280
+ chosenClass: 'sortable-chosen',
281
+ onEnd: (evt) => handleDrop(evt, 'todo')
282
+ });
283
+
284
+ new Sortable(document.getElementById('inprogress-column'), {
285
+ group: 'shared',
286
+ animation: 150,
287
+ ghostClass: 'sortable-ghost',
288
+ chosenClass: 'sortable-chosen',
289
+ onEnd: (evt) => handleDrop(evt, 'inProgress')
290
+ });
291
+
292
+ new Sortable(document.getElementById('done-column'), {
293
+ group: 'shared',
294
+ animation: 150,
295
+ ghostClass: 'sortable-ghost',
296
+ chosenClass: 'sortable-chosen',
297
+ onEnd: (evt) => handleDrop(evt, 'done')
298
+ });
299
+ });
300
+
301
+ function handleDrop(evt, toColumn) {
302
+ const itemId = evt.item.dataset.id;
303
+ const fromColumn = evt.from.id.replace('-column', '');
304
+
305
+ if (fromColumn === toColumn) return;
306
+
307
+ // Find the item in the source column
308
+ const itemIndex = kanbanColumns[fromColumn].findIndex(item => item.id === itemId);
309
+ if (itemIndex === -1) return;
310
+
311
+ // Move the item
312
+ const [movedItem] = kanbanColumns[fromColumn].splice(itemIndex, 1);
313
+ kanbanColumns[toColumn].push(movedItem);
314
+
315
+ // Update UI
316
+ renderKanbanColumns();
317
+ }
318
+
319
+ function addToKanban(content, title = 'AI Response') {
320
+ const newItem = {
321
+ id: Date.now().toString(),
322
+ title,
323
+ content,
324
+ timestamp: new Date().toLocaleTimeString()
325
  };
326
+
327
+ kanbanColumns.todo.push(newItem);
328
+ renderKanbanColumns();
329
+ }
330
+
331
+ function renderKanbanColumns() {
332
+ renderKanbanColumn('todo');
333
+ renderKanbanColumn('inProgress');
334
+ renderKanbanColumn('done');
335
+ }
336
+
337
+ function renderKanbanColumn(columnName) {
338
+ const columnElement = document.getElementById(`${columnName.toLowerCase()}-column`);
339
+ columnElement.innerHTML = '';
340
+
341
+ kanbanColumns[columnName].forEach(item => {
342
+ const card = document.createElement('div');
343
+ card.className = 'kanban-card bg-white p-3 rounded-lg shadow border cursor-move';
344
+ if (columnName === 'inProgress') card.classList.add('border-blue-200');
345
+ if (columnName === 'done') card.classList.add('border-green-200');
346
+ card.dataset.id = item.id;
347
+
348
+ card.innerHTML = `
349
+ <div class="flex justify-between items-start mb-2">
350
+ <h4 class="font-medium text-gray-800">${item.title}</h4>
351
+ <span class="text-xs text-gray-500">${item.timestamp}</span>
352
+ </div>
353
+ <pre class="text-xs bg-gray-50 p-2 rounded overflow-x-auto">${item.content}</pre>
354
+ `;
355
+
356
+ columnElement.appendChild(card);
357
+ });
358
+ }
359
 
360
+ // Workflow functions
361
+ async function triggerWorkflow(workflowType) {
362
+ showLoading();
363
+
364
+ try {
365
+ // Simulate different API responses based on workflow type
366
+ let response;
367
+ switch(workflowType) {
368
+ case 'summarize':
369
+ response = { summary: "This is a generated summary of the content..." };
370
+ break;
371
+ case 'translate':
372
+ response = { translation: "Translated text goes here..." };
373
+ break;
374
+ case 'generate':
375
+ response = { generatedText: "This is AI-generated content based on your prompt..." };
376
+ break;
377
+ case 'analyze':
378
+ response = { analysis: "Sentiment analysis shows positive sentiment..." };
379
+ break;
380
+ case 'extract':
381
+ response = { entities: ["Person", "Location", "Organization"] };
382
+ break;
383
+ case 'classify':
384
+ response = { categories: ["Technology", "AI", "Machine Learning"] };
385
+ break;
386
+ case 'rewrite':
387
+ response = { rewrittenText: "This is a rewritten version of your text..." };
388
+ break;
389
+ case 'code':
390
+ response = { codeSnippet: "function example() {\n return 'Hello World';\n}" };
391
+ break;
392
+ case 'qa':
393
+ response = { answer: "The answer to your question is..." };
394
+ break;
395
+ case 'image':
396
+ response = { imageUrl: "https://via.placeholder.com/300" };
397
+ break;
398
+ case 'audio':
399
+ response = { audioUrl: "https://example.com/audio.mp3" };
400
+ break;
401
+ case 'video':
402
+ response = { videoUrl: "https://example.com/video.mp4" };
403
+ break;
404
+ case 'data':
405
+ response = { data: { key1: "value1", key2: "value2" } };
406
+ break;
407
+ case 'report':
408
+ response = { report: "Your detailed report is ready..." };
409
+ break;
410
+ case 'automate':
411
+ response = { status: "Workflow automation completed successfully" };
412
+ break;
413
+ default:
414
+ response = { message: "Workflow executed successfully" };
415
  }
416
+
417
+ // Show response
418
+ document.getElementById('webhook-response').textContent = JSON.stringify(response, null, 2);
419
+ document.getElementById('response-container').classList.remove('hidden');
420
+
421
+ // Add to kanban
422
+ addToKanban(JSON.stringify(response, null, 2), `Workflow: ${workflowType}`);
423
+ } catch (error) {
424
+ document.getElementById('webhook-response').textContent = error.message;
425
+ document.getElementById('response-container').classList.remove('hidden');
426
+ addToKanban(error.message, "Error");
427
+ } finally {
428
+ hideLoading();
429
+ }
430
+ }
431
 
432
+ // Chat functions
433
+ const chatHistory = [];
434
+
435
+ async function sendMessage() {
436
+ const messageInput = document.getElementById('message-input');
437
+ const message = messageInput.value.trim();
438
+ if (!message) return;
439
+
440
+ showLoading();
441
+ document.getElementById('send-button').disabled = true;
442
+
443
+ try {
444
+ // Add user message
445
+ const userMessage = { role: 'user', content: message, id: Date.now() };
446
+ chatHistory.push(userMessage);
447
+ renderChatHistory();
448
+ messageInput.value = '';
449
+
450
+ // Simulate AI response after delay
451
+ await new Promise(resolve => setTimeout(resolve, 1000));
452
+
453
+ // Add AI response
454
+ const aiMessage = {
455
+ role: 'assistant',
456
+ content: `This is a simulated response to: "${userMessage.content}"`,
457
+ id: Date.now() + 1
458
+ };
459
+ chatHistory.push(aiMessage);
460
+ renderChatHistory();
461
+
462
+ // Add to kanban
463
+ addToKanban(aiMessage.content, "Chat Response");
464
+ } catch (error) {
465
+ const errorMessage = { role: 'assistant', content: `Error: ${error.message}`, id: Date.now() + 1 };
466
+ chatHistory.push(errorMessage);
467
+ renderChatHistory();
468
+ addToKanban(error.message, "Error");
469
+ } finally {
470
+ hideLoading();
471
+ document.getElementById('send-button').disabled = false;
472
+ messageInput.focus();
473
+ }
474
+ }
475
+
476
+ function renderChatHistory() {
477
+ const chatHistoryElement = document.getElementById('chat-history');
478
+ chatHistoryElement.innerHTML = '';
479
+
480
+ chatHistory.forEach(msg => {
481
+ const messageElement = document.createElement('div');
482
+ messageElement.className = `mb-3 p-3 rounded-lg max-w-3xl ${msg.role === 'user' ? 'ml-auto bg-blue-100 text-blue-900' : 'mr-auto bg-gray-100 text-gray-900'}`;
483
+
484
+ messageElement.innerHTML = `
485
+ <div class="font-medium">${msg.role === 'user' ? 'You' : 'AI Assistant'}</div>
486
+ <div>${msg.content}</div>
487
+ `;
488
+
489
+ chatHistoryElement.appendChild(messageElement);
490
+ });
491
+
492
+ // Scroll to bottom
493
+ chatHistoryElement.scrollTop = chatHistoryElement.scrollHeight;
494
  }
495
 
496
+ // Loading functions
497
+ function showLoading() {
498
+ document.getElementById('loading-overlay').classList.remove('hidden');
499
+ }
500
+
501
+ function hideLoading() {
502
+ document.getElementById('loading-overlay').classList.add('hidden');
503
+ }
504
  </script>
505
  <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=a40login/dashboard-mvp" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
506
  </html>
prompts.txt CHANGED
@@ -1 +1,3 @@
1
- Perfekt – hier ist der reduzierte Prompt für eine MVP-WebApp ohne Login, die direkt ein KI-Dashboard mit Webhook-Triggern und AI-Chat enthält. Der Fokus liegt auf: funktioniert sofort, minimaler Code, einfach testbar, kein Styling notwendig. ⸻ 🧠 Prompt: MVP-KI-Dashboard ohne Login – mit Webhook-Triggers & AI-Chat Erstelle eine einfache WebApp (React oder Next.js), die direkt ein Dashboard anzeigt – ohne Authentifizierung. Ziel ist eine funktionierende Proof-of-Concept-Oberfläche, mit der man: 1. ✅ Webhooks auslösen kann • Zwei Buttons im Dashboard: • Text generieren → POST an https://example.com/webhook1 • Analyse starten → POST an https://example.com/webhook2 • Zeige die Antwort aus dem Webhook (Text oder JSON) im Interface (unterhalb) 2. 🤖 Einfache AI-Chat-Komponente • Textfeld + Senden-Button • Anfrage wird an eine auswählbare AI-API geschickt (z. B. OpenAI via fetch an https://api.openai.com/v1/chat/completions) • API-Key wird im Code hartkodiert (nur für Testzwecke) • Zeige Antwort der AI im Interface 3. 💻 UI & Technologie • Keine Auth, kein Design, keine Navigation nötig • Nur eine Seite (/) mit: • Sektion 1: Webhook-Trigger • Sektion 2: AI-Chat • Plain React, CRA oder Next.js – ohne zusätzliche Libraries • Verwendung von useState, useEffect für einfache Logik 🧪 Ziel • Schnell testbares MVP für Webhook-basierte Aktionen & AI-Interaktion • Fokus: Funktion über Form – UI kann komplett roh sein • Grundlage für spätere Prototyp-Erweiterung mit Auth, Styling, Datenbank etc. ⸻ Willst du diese MVP-Version jetzt auch als kompletten Codeblock oder GitHub-Template?
 
 
 
1
+ Perfekt – hier ist der reduzierte Prompt für eine MVP-WebApp ohne Login, die direkt ein KI-Dashboard mit Webhook-Triggern und AI-Chat enthält. Der Fokus liegt auf: funktioniert sofort, minimaler Code, einfach testbar, kein Styling notwendig. ⸻ 🧠 Prompt: MVP-KI-Dashboard ohne Login – mit Webhook-Triggers & AI-Chat Erstelle eine einfache WebApp (React oder Next.js), die direkt ein Dashboard anzeigt – ohne Authentifizierung. Ziel ist eine funktionierende Proof-of-Concept-Oberfläche, mit der man: 1. ✅ Webhooks auslösen kann • Zwei Buttons im Dashboard: • Text generieren → POST an https://example.com/webhook1 • Analyse starten → POST an https://example.com/webhook2 • Zeige die Antwort aus dem Webhook (Text oder JSON) im Interface (unterhalb) 2. 🤖 Einfache AI-Chat-Komponente • Textfeld + Senden-Button • Anfrage wird an eine auswählbare AI-API geschickt (z. B. OpenAI via fetch an https://api.openai.com/v1/chat/completions) • API-Key wird im Code hartkodiert (nur für Testzwecke) • Zeige Antwort der AI im Interface 3. 💻 UI & Technologie • Keine Auth, kein Design, keine Navigation nötig • Nur eine Seite (/) mit: • Sektion 1: Webhook-Trigger • Sektion 2: AI-Chat • Plain React, CRA oder Next.js – ohne zusätzliche Libraries • Verwendung von useState, useEffect für einfache Logik 🧪 Ziel • Schnell testbares MVP für Webhook-basierte Aktionen & AI-Interaktion • Fokus: Funktion über Form – UI kann komplett roh sein • Grundlage für spätere Prototyp-Erweiterung mit Auth, Styling, Datenbank etc. ⸻ Willst du diese MVP-Version jetzt auch als kompletten Codeblock oder GitHub-Template?
2
+ improve the ux and add 15 buttons for all kinds of AI-Workflows. Display Response in Tab "AI-Content" in a kanban style with cards that are drag&dropable
3
+ doesnt seem to work