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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
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>AI Department Roadmap Builder</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        .timeline-item:not(:last-child)::after {
            content: '';
            position: absolute;
            left: 24px;
            top: 32px;
            height: calc(100% - 32px);
            width: 2px;
            background-color: #e5e7eb;
        }
        .draggable {
            cursor: move;
            user-select: none;
        }
        .dropzone {
            min-height: 100px;
            transition: background-color 0.3s;
        }
        .dropzone.active {
            background-color: rgba(59, 130, 246, 0.1);
            border: 1px dashed #3b82f6;
        }
    </style>
</head>
<body class="bg-gray-50 min-h-screen">
    <div class="container mx-auto px-4 py-8">
        <!-- Header -->
        <header class="mb-8">
            <div class="flex justify-between items-center">
                <div>
                    <h1 class="text-3xl font-bold text-gray-800">AI Department Roadmap Builder</h1>
                    <p class="text-gray-600">Strategic planning tool for AI initiatives</p>
                </div>
                <div class="flex space-x-4">
                    <button id="exportBtn" class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-lg flex items-center">
                        <i class="fas fa-file-export mr-2"></i> Export
                    </button>
                    <button id="printBtn" class="bg-gray-200 hover:bg-gray-300 text-gray-800 px-4 py-2 rounded-lg flex items-center">
                        <i class="fas fa-print mr-2"></i> Print
                    </button>
                </div>
            </div>
        </header>

        <div class="grid grid-cols-1 lg:grid-cols-4 gap-6">
            <!-- Left Panel - Components -->
            <div class="lg:col-span-1 bg-white rounded-xl shadow p-6">
                <h2 class="text-xl font-semibold mb-4 text-gray-800">Roadmap Components</h2>
                
                <div class="space-y-4">
                    <div class="component-group">
                        <h3 class="font-medium text-gray-700 mb-2 flex items-center">
                            <i class="fas fa-layer-group mr-2 text-blue-500"></i> Strategic Goals
                        </h3>
                        <div class="space-y-2">
                            <div draggable="true" class="draggable bg-blue-50 border border-blue-200 rounded-lg p-3 text-blue-800" data-type="goal">
                                <div class="flex items-center">
                                    <i class="fas fa-bullseye mr-2"></i>
                                    <span>Improve AI Model Accuracy</span>
                                </div>
                            </div>
                            <div draggable="true" class="draggable bg-blue-50 border border-blue-200 rounded-lg p-3 text-blue-800" data-type="goal">
                                <div class="flex items-center">
                                    <i class="fas fa-bullseye mr-2"></i>
                                    <span>Reduce Model Bias</span>
                                </div>
                            </div>
                            <div draggable="true" class="draggable bg-blue-50 border border-blue-200 rounded-lg p-3 text-blue-800" data-type="goal">
                                <div class="flex items-center">
                                    <i class="fas fa-bullseye mr-2"></i>
                                    <span>Enhance Explainability</span>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="component-group">
                        <h3 class="font-medium text-gray-700 mb-2 flex items-center">
                            <i class="fas fa-tasks mr-2 text-green-500"></i> Initiatives
                        </h3>
                        <div class="space-y-2">
                            <div draggable="true" class="draggable bg-green-50 border border-green-200 rounded-lg p-3 text-green-800" data-type="initiative">
                                <div class="flex items-center">
                                    <i class="fas fa-project-diagram mr-2"></i>
                                    <span>Model Optimization</span>
                                </div>
                            </div>
                            <div draggable="true" class="draggable bg-green-50 border border-green-200 rounded-lg p-3 text-green-800" data-type="initiative">
                                <div class="flex items-center">
                                    <i class="fas fa-project-diagram mr-2"></i>
                                    <span>Data Pipeline Upgrade</span>
                                </div>
                            </div>
                            <div draggable="true" class="draggable bg-green-50 border border-green-200 rounded-lg p-3 text-green-800" data-type="initiative">
                                <div class="flex items-center">
                                    <i class="fas fa-project-diagram mr-2"></i>
                                    <span>Ethics Framework</span>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="component-group">
                        <h3 class="font-medium text-gray-700 mb-2 flex items-center">
                            <i class="fas fa-calendar-check mr-2 text-purple-500"></i> Milestones
                        </h3>
                        <div class="space-y-2">
                            <div draggable="true" class="draggable bg-purple-50 border border-purple-200 rounded-lg p-3 text-purple-800" data-type="milestone">
                                <div class="flex items-center">
                                    <i class="fas fa-flag-checkered mr-2"></i>
                                    <span>Model Validation</span>
                                </div>
                            </div>
                            <div draggable="true" class="draggable bg-purple-50 border border-purple-200 rounded-lg p-3 text-purple-800" data-type="milestone">
                                <div class="flex items-center">
                                    <i class="fas fa-flag-checkered mr-2"></i>
                                    <span>Deployment</span>
                                </div>
                            </div>
                            <div draggable="true" class="draggable bg-purple-50 border border-purple-200 rounded-lg p-3 text-purple-800" data-type="milestone">
                                <div class="flex items-center">
                                    <i class="fas fa-flag-checkered mr-2"></i>
                                    <span>Audit Completion</span>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="component-group">
                        <h3 class="font-medium text-gray-700 mb-2 flex items-center">
                            <i class="fas fa-users mr-2 text-yellow-500"></i> Resources
                        </h3>
                        <div class="space-y-2">
                            <div draggable="true" class="draggable bg-yellow-50 border border-yellow-200 rounded-lg p-3 text-yellow-800" data-type="resource">
                                <div class="flex items-center">
                                    <i class="fas fa-user-tie mr-2"></i>
                                    <span>Research Team</span>
                                </div>
                            </div>
                            <div draggable="true" class="draggable bg-yellow-50 border border-yellow-200 rounded-lg p-3 text-yellow-800" data-type="resource">
                                <div class="flex items-center">
                                    <i class="fas fa-server mr-2"></i>
                                    <span>GPU Cluster</span>
                                </div>
                            </div>
                            <div draggable="true" class="draggable bg-yellow-50 border border-yellow-200 rounded-lg p-3 text-yellow-800" data-type="resource">
                                <div class="flex items-center">
                                    <i class="fas fa-money-bill-wave mr-2"></i>
                                    <span>Budget Allocation</span>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="mt-6">
                    <h3 class="font-medium text-gray-700 mb-2 flex items-center">
                        <i class="fas fa-plus-circle mr-2 text-red-500"></i> Custom Component
                    </h3>
                    <div class="flex">
                        <input type="text" id="customComponent" placeholder="New component name" class="flex-1 border rounded-l-lg px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500">
                        <button id="addCustomBtn" class="bg-red-500 hover:bg-red-600 text-white px-4 py-2 rounded-r-lg">
                            Add
                        </button>
                    </div>
                    <select id="customType" class="mt-2 w-full border rounded-lg px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500">
                        <option value="goal">Strategic Goal</option>
                        <option value="initiative">Initiative</option>
                        <option value="milestone">Milestone</option>
                        <option value="resource">Resource</option>
                    </select>
                </div>
            </div>

            <!-- Main Roadmap Area -->
            <div class="lg:col-span-3">
                <div class="bg-white rounded-xl shadow p-6 mb-6">
                    <div class="flex justify-between items-center mb-4">
                        <h2 class="text-xl font-semibold text-gray-800">AI Department Roadmap</h2>
                        <div class="flex space-x-2">
                            <select id="timeframe" class="border rounded-lg px-3 py-1 focus:outline-none focus:ring-2 focus:ring-blue-500">
                                <option value="quarterly">Quarterly View</option>
                                <option value="yearly">Yearly View</option>
                                <option value="3year">3-Year Plan</option>
                            </select>
                            <button id="clearAllBtn" class="bg-gray-200 hover:bg-gray-300 text-gray-800 px-3 py-1 rounded-lg text-sm">
                                Clear All
                            </button>
                        </div>
                    </div>

                    <div class="overflow-x-auto">
                        <div id="roadmapTimeline" class="min-w-full">
                            <!-- Timeline will be generated here -->
                            <div class="relative">
                                <!-- Q1 -->
                                <div class="timeline-item relative pb-8 pl-10">
                                    <div class="absolute left-0 top-0 w-8 h-8 rounded-full bg-blue-500 flex items-center justify-center text-white font-bold">
                                        Q1
                                    </div>
                                    <div class="dropzone p-3 rounded-lg border border-dashed border-gray-300" data-timeframe="q1">
                                        <h3 class="font-medium text-gray-700 mb-2">Q1 2024</h3>
                                        <div class="space-y-2" id="q1-items"></div>
                                    </div>
                                </div>

                                <!-- Q2 -->
                                <div class="timeline-item relative pb-8 pl-10">
                                    <div class="absolute left-0 top-0 w-8 h-8 rounded-full bg-green-500 flex items-center justify-center text-white font-bold">
                                        Q2
                                    </div>
                                    <div class="dropzone p-3 rounded-lg border border-dashed border-gray-300" data-timeframe="q2">
                                        <h3 class="font-medium text-gray-700 mb-2">Q2 2024</h3>
                                        <div class="space-y-2" id="q2-items"></div>
                                    </div>
                                </div>

                                <!-- Q3 -->
                                <div class="timeline-item relative pb-8 pl-10">
                                    <div class="absolute left-0 top-0 w-8 h-8 rounded-full bg-yellow-500 flex items-center justify-center text-white font-bold">
                                        Q3
                                    </div>
                                    <div class="dropzone p-3 rounded-lg border border-dashed border-gray-300" data-timeframe="q3">
                                        <h3 class="font-medium text-gray-700 mb-2">Q3 2024</h3>
                                        <div class="space-y-2" id="q3-items"></div>
                                    </div>
                                </div>

                                <!-- Q4 -->
                                <div class="timeline-item relative pb-8 pl-10">
                                    <div class="absolute left-0 top-0 w-8 h-8 rounded-full bg-purple-500 flex items-center justify-center text-white font-bold">
                                        Q4
                                    </div>
                                    <div class="dropzone p-3 rounded-lg border border-dashed border-gray-300" data-timeframe="q4">
                                        <h3 class="font-medium text-gray-700 mb-2">Q4 2024</h3>
                                        <div class="space-y-2" id="q4-items"></div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- Roadmap Summary -->
                <div class="bg-white rounded-xl shadow p-6">
                    <h2 class="text-xl font-semibold mb-4 text-gray-800">Roadmap Summary</h2>
                    <div id="roadmapSummary" class="space-y-4">
                        <div class="text-center text-gray-500 py-8">
                            <i class="fas fa-road text-4xl mb-2 text-gray-300"></i>
                            <p>Your roadmap summary will appear here</p>
                            <p class="text-sm">Drag and drop components to build your AI department roadmap</p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script>
        document.addEventListener('DOMContentLoaded', function() {
            // Drag and drop functionality
            const draggables = document.querySelectorAll('.draggable');
            const dropzones = document.querySelectorAll('.dropzone');
            let draggedItem = null;

            // Add event listeners for draggable items
            draggables.forEach(item => {
                item.addEventListener('dragstart', function() {
                    draggedItem = this;
                    setTimeout(() => {
                        this.style.opacity = '0.5';
                    }, 0);
                });

                item.addEventListener('dragend', function() {
                    this.style.opacity = '1';
                });
            });

            // Add event listeners for drop zones
            dropzones.forEach(zone => {
                zone.addEventListener('dragover', function(e) {
                    e.preventDefault();
                    this.classList.add('active');
                });

                zone.addEventListener('dragleave', function() {
                    this.classList.remove('active');
                });

                zone.addEventListener('drop', function(e) {
                    e.preventDefault();
                    this.classList.remove('active');
                    
                    if (draggedItem) {
                        const clone = draggedItem.cloneNode(true);
                        clone.classList.add('mt-2');
                        
                        // Add delete button to the cloned item
                        const deleteBtn = document.createElement('button');
                        deleteBtn.innerHTML = '<i class="fas fa-times"></i>';
                        deleteBtn.className = 'ml-2 text-red-500 hover:text-red-700 float-right';
                        deleteBtn.addEventListener('click', function() {
                            clone.remove();
                            updateRoadmapSummary();
                        });
                        
                        clone.appendChild(deleteBtn);
                        
                        const itemsContainer = this.querySelector('div[id$="-items"]');
                        itemsContainer.appendChild(clone);
                        
                        updateRoadmapSummary();
                    }
                });
            });

            // Add custom component
            document.getElementById('addCustomBtn').addEventListener('click', function() {
                const componentName = document.getElementById('customComponent').value.trim();
                const componentType = document.getElementById('customType').value;
                
                if (componentName) {
                    let bgColor, borderColor, textColor, icon;
                    
                    switch(componentType) {
                        case 'goal':
                            bgColor = 'bg-blue-50';
                            borderColor = 'border-blue-200';
                            textColor = 'text-blue-800';
                            icon = 'fa-bullseye';
                            break;
                        case 'initiative':
                            bgColor = 'bg-green-50';
                            borderColor = 'border-green-200';
                            textColor = 'text-green-800';
                            icon = 'fa-project-diagram';
                            break;
                        case 'milestone':
                            bgColor = 'bg-purple-50';
                            borderColor = 'border-purple-200';
                            textColor = 'text-purple-800';
                            icon = 'fa-flag-checkered';
                            break;
                        case 'resource':
                            bgColor = 'bg-yellow-50';
                            borderColor = 'border-yellow-200';
                            textColor = 'text-yellow-800';
                            icon = 'fa-user-tie';
                            break;
                    }
                    
                    const newComponent = document.createElement('div');
                    newComponent.className = `draggable ${bgColor} border ${borderColor} rounded-lg p-3 ${textColor}`;
                    newComponent.setAttribute('draggable', 'true');
                    newComponent.setAttribute('data-type', componentType);
                    newComponent.innerHTML = `
                        <div class="flex items-center">
                            <i class="fas ${icon} mr-2"></i>
                            <span>${componentName}</span>
                        </div>
                    `;
                    
                    // Add drag events to the new component
                    newComponent.addEventListener('dragstart', function() {
                        draggedItem = this;
                        setTimeout(() => {
                            this.style.opacity = '0.5';
                        }, 0);
                    });

                    newComponent.addEventListener('dragend', function() {
                        this.style.opacity = '1';
                    });
                    
                    // Add to the appropriate component group
                    const componentGroups = document.querySelectorAll('.component-group');
                    componentGroups.forEach(group => {
                        const heading = group.querySelector('h3');
                        if (heading.textContent.includes(componentType.replace(/([A-Z])/g, ' $1').replace(/^./, str => str.toUpperCase()))) {
                            group.querySelector('.space-y-2').appendChild(newComponent);
                        }
                    });
                    
                    document.getElementById('customComponent').value = '';
                }
            });

            // Update roadmap summary
            function updateRoadmapSummary() {
                const summaryContainer = document.getElementById('roadmapSummary');
                summaryContainer.innerHTML = '';
                
                const quarters = ['q1', 'q2', 'q3', 'q4'];
                let hasContent = false;
                
                quarters.forEach(q => {
                    const quarterItems = document.getElementById(`${q}-items`).children;
                    if (quarterItems.length > 0) {
                        hasContent = true;
                        
                        const quarterSection = document.createElement('div');
                        quarterSection.className = 'bg-gray-50 rounded-lg p-4';
                        
                        const quarterTitle = document.createElement('h3');
                        quarterTitle.className = 'font-semibold text-lg mb-2';
                        quarterTitle.textContent = document.querySelector(`[data-timeframe="${q}"] h3`).textContent;
                        
                        quarterSection.appendChild(quarterTitle);
                        
                        const itemsList = document.createElement('ul');
                        itemsList.className = 'space-y-2';
                        
                        Array.from(quarterItems).forEach(item => {
                            const listItem = document.createElement('li');
                            listItem.className = 'flex items-center';
                            
                            const itemType = item.getAttribute('data-type');
                            let typeBadge;
                            
                            switch(itemType) {
                                case 'goal':
                                    typeBadge = '<span class="bg-blue-100 text-blue-800 text-xs px-2 py-1 rounded mr-2">Goal</span>';
                                    break;
                                case 'initiative':
                                    typeBadge = '<span class="bg-green-100 text-green-800 text-xs px-2 py-1 rounded mr-2">Initiative</span>';
                                    break;
                                case 'milestone':
                                    typeBadge = '<span class="bg-purple-100 text-purple-800 text-xs px-2 py-1 rounded mr-2">Milestone</span>';
                                    break;
                                case 'resource':
                                    typeBadge = '<span class="bg-yellow-100 text-yellow-800 text-xs px-2 py-1 rounded mr-2">Resource</span>';
                                    break;
                            }
                            
                            listItem.innerHTML = `
                                ${typeBadge}
                                <span>${item.querySelector('span').textContent}</span>
                            `;
                            
                            itemsList.appendChild(listItem);
                        });
                        
                        quarterSection.appendChild(itemsList);
                        summaryContainer.appendChild(quarterSection);
                    }
                });
                
                if (!hasContent) {
                    summaryContainer.innerHTML = `
                        <div class="text-center text-gray-500 py-8">
                            <i class="fas fa-road text-4xl mb-2 text-gray-300"></i>
                            <p>Your roadmap summary will appear here</p>
                            <p class="text-sm">Drag and drop components to build your AI department roadmap</p>
                        </div>
                    `;
                }
            }

            // Clear all button
            document.getElementById('clearAllBtn').addEventListener('click', function() {
                if (confirm('Are you sure you want to clear all items from the roadmap?')) {
                    const itemContainers = document.querySelectorAll('[id$="-items"]');
                    itemContainers.forEach(container => {
                        container.innerHTML = '';
                    });
                    updateRoadmapSummary();
                }
            });

            // Export button
            document.getElementById('exportBtn').addEventListener('click', function() {
                alert('Export functionality would be implemented here. In a real app, this would generate a PDF or image of the roadmap.');
            });

            // Print button
            document.getElementById('printBtn').addEventListener('click', function() {
                window.print();
            });

            // Timeframe selector
            document.getElementById('timeframe').addEventListener('change', function() {
                // In a real app, this would change the view of the timeline
                alert(`View changed to ${this.value}. In a real app, this would adjust the timeline display.`);
            });
        });
    </script>
<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=aceeee/roadmap-builder" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>