developerwoodstudios commited on
Commit
d65e611
·
verified ·
1 Parent(s): 08f7bae

Act as if you are a world class #1 AI application creating software engineer that can perfectly integrate with the worlds best Ai Agent and software applications builder which is DeepSite v2? Then can you create a Figma/Miro-like real-time whiteboard application, that is optimized through the industries top performing pipelines and websites - Initial Deployment

Browse files
Files changed (2) hide show
  1. README.md +7 -5
  2. index.html +389 -19
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Index Html
3
- emoji: 🐠
4
- colorFrom: green
5
- colorTo: yellow
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: index-html
3
+ emoji: 🐳
4
+ colorFrom: purple
5
+ colorTo: pink
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
index.html CHANGED
@@ -1,19 +1,389 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </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>DeepBoard - Collaborative Whiteboard</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/fabric.min.js"></script>
9
+ <script src="https://cdn.socket.io/4.7.2/socket.io.min.js"></script>
10
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
11
+ <style>
12
+ .tooltip {
13
+ position: relative;
14
+ display: inline-block;
15
+ }
16
+ .tooltip .tooltiptext {
17
+ visibility: hidden;
18
+ width: 120px;
19
+ background-color: #555;
20
+ color: #fff;
21
+ text-align: center;
22
+ border-radius: 6px;
23
+ padding: 5px;
24
+ position: absolute;
25
+ z-index: 1;
26
+ bottom: 125%;
27
+ left: 50%;
28
+ margin-left: -60px;
29
+ opacity: 0;
30
+ transition: opacity 0.3s;
31
+ }
32
+ .tooltip:hover .tooltiptext {
33
+ visibility: visible;
34
+ opacity: 1;
35
+ }
36
+ .canvas-container {
37
+ box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
38
+ }
39
+ .color-option {
40
+ width: 24px;
41
+ height: 24px;
42
+ border-radius: 50%;
43
+ margin: 2px;
44
+ cursor: pointer;
45
+ border: 2px solid transparent;
46
+ }
47
+ .color-option:hover, .color-option.active {
48
+ border-color: #000;
49
+ }
50
+ .user-cursor {
51
+ position: absolute;
52
+ width: 10px;
53
+ height: 10px;
54
+ border-radius: 50%;
55
+ pointer-events: none;
56
+ z-index: 1000;
57
+ }
58
+ .user-label {
59
+ position: absolute;
60
+ font-size: 12px;
61
+ padding: 2px 5px;
62
+ border-radius: 3px;
63
+ pointer-events: none;
64
+ z-index: 1000;
65
+ white-space: nowrap;
66
+ }
67
+ </style>
68
+ </head>
69
+ <body class="bg-gray-100 h-screen flex flex-col">
70
+ <!-- Top Navigation Bar -->
71
+ <header class="bg-white shadow-sm py-2 px-4 flex items-center justify-between">
72
+ <div class="flex items-center space-x-4">
73
+ <div class="flex items-center">
74
+ <i class="fas fa-palette text-blue-600 text-2xl mr-2"></i>
75
+ <h1 class="text-xl font-bold text-gray-800">DeepBoard</h1>
76
+ </div>
77
+ <div class="hidden md:flex items-center space-x-2">
78
+ <button id="save-btn" class="px-3 py-1 bg-blue-50 text-blue-600 rounded hover:bg-blue-100 text-sm">
79
+ <i class="fas fa-save mr-1"></i> Save
80
+ </button>
81
+ <button id="export-btn" class="px-3 py-1 bg-blue-50 text-blue-600 rounded hover:bg-blue-100 text-sm">
82
+ <i class="fas fa-download mr-1"></i> Export
83
+ </button>
84
+ <button id="share-btn" class="px-3 py-1 bg-blue-600 text-white rounded hover:bg-blue-700 text-sm">
85
+ <i class="fas fa-user-plus mr-1"></i> Share
86
+ </button>
87
+ </div>
88
+ </div>
89
+
90
+ <div class="flex items-center space-x-4">
91
+ <div class="relative">
92
+ <input type="text" placeholder="Search boards..." class="pl-8 pr-4 py-1 border rounded-full text-sm w-40 md:w-64 focus:outline-none focus:ring-1 focus:ring-blue-500">
93
+ <i class="fas fa-search absolute left-3 top-2 text-gray-400"></i>
94
+ </div>
95
+ <div class="flex items-center space-x-2">
96
+ <div class="relative">
97
+ <button id="notifications-btn" class="p-1 rounded-full hover:bg-gray-100">
98
+ <i class="fas fa-bell text-gray-600"></i>
99
+ <span class="absolute top-0 right-0 h-2 w-2 rounded-full bg-red-500"></span>
100
+ </button>
101
+ </div>
102
+ <div class="relative">
103
+ <button id="user-menu-btn" class="flex items-center space-x-1">
104
+ <div class="w-8 h-8 rounded-full bg-blue-500 flex items-center justify-center text-white font-semibold">U</div>
105
+ </button>
106
+ </div>
107
+ </div>
108
+ </div>
109
+ </header>
110
+
111
+ <!-- Main Content Area -->
112
+ <div class="flex flex-1 overflow-hidden">
113
+ <!-- Left Toolbar -->
114
+ <div class="w-14 bg-white shadow-sm flex flex-col items-center py-4 space-y-4">
115
+ <div class="tooltip">
116
+ <button id="select-tool" class="p-2 rounded hover:bg-gray-100 active:bg-gray-200">
117
+ <i class="fas fa-mouse-pointer text-gray-700"></i>
118
+ </button>
119
+ <span class="tooltiptext">Select (V)</span>
120
+ </div>
121
+ <div class="tooltip">
122
+ <button id="pen-tool" class="p-2 rounded hover:bg-gray-100 active:bg-gray-200">
123
+ <i class="fas fa-pen text-gray-700"></i>
124
+ </button>
125
+ <span class="tooltiptext">Pen (P)</span>
126
+ </div>
127
+ <div class="tooltip">
128
+ <button id="text-tool" class="p-2 rounded hover:bg-gray-100 active:bg-gray-200">
129
+ <i class="fas fa-font text-gray-700"></i>
130
+ </button>
131
+ <span class="tooltiptext">Text (T)</span>
132
+ </div>
133
+ <div class="tooltip">
134
+ <button id="shape-tool" class="p-2 rounded hover:bg-gray-100 active:bg-gray-200">
135
+ <i class="fas fa-square text-gray-700"></i>
136
+ </button>
137
+ <span class="tooltiptext">Shapes (S)</span>
138
+ </div>
139
+ <div class="tooltip">
140
+ <button id="sticky-tool" class="p-2 rounded hover:bg-gray-100 active:bg-gray-200">
141
+ <i class="fas fa-sticky-note text-gray-700"></i>
142
+ </button>
143
+ <span class="tooltiptext">Sticky (N)</span>
144
+ </div>
145
+ <div class="border-t border-gray-200 w-8 mx-auto my-2"></div>
146
+ <div class="tooltip">
147
+ <button id="zoom-in" class="p-2 rounded hover:bg-gray-100 active:bg-gray-200">
148
+ <i class="fas fa-search-plus text-gray-700"></i>
149
+ </button>
150
+ <span class="tooltiptext">Zoom In (+)</span>
151
+ </div>
152
+ <div class="tooltip">
153
+ <button id="zoom-out" class="p-2 rounded hover:bg-gray-100 active:bg-gray-200">
154
+ <i class="fas fa-search-minus text-gray-700"></i>
155
+ </button>
156
+ <span class="tooltiptext">Zoom Out (-)</span>
157
+ </div>
158
+ <div class="tooltip">
159
+ <button id="zoom-fit" class="p-2 rounded hover:bg-gray-100 active:bg-gray-200">
160
+ <i class="fas fa-expand text-gray-700"></i>
161
+ </button>
162
+ <span class="tooltiptext">Fit to Screen (0)</span>
163
+ </div>
164
+ </div>
165
+
166
+ <!-- Canvas Area -->
167
+ <div class="flex-1 relative overflow-auto bg-gray-200 flex items-center justify-center p-4">
168
+ <div id="canvas-container" class="canvas-container bg-white">
169
+ <canvas id="whiteboard" width="2000" height="2000"></canvas>
170
+ </div>
171
+
172
+ <!-- Right Toolbar (Color/Properties) -->
173
+ <div class="absolute right-4 top-4 bg-white rounded-lg shadow-md p-3 w-48">
174
+ <div class="mb-3">
175
+ <label class="block text-xs font-medium text-gray-500 mb-1">Stroke Color</label>
176
+ <div class="flex flex-wrap">
177
+ <div class="color-option bg-black active" data-color="#000000"></div>
178
+ <div class="color-option bg-red-500" data-color="#ef4444"></div>
179
+ <div class="color-option bg-blue-500" data-color="#3b82f6"></div>
180
+ <div class="color-option bg-green-500" data-color="#10b981"></div>
181
+ <div class="color-option bg-yellow-500" data-color="#f59e0b"></div>
182
+ <div class="color-option bg-purple-500" data-color="#8b5cf6"></div>
183
+ <div class="color-option bg-pink-500" data-color="#ec4899"></div>
184
+ <div class="color-option bg-gray-500" data-color="#6b7280"></div>
185
+ </div>
186
+ </div>
187
+ <div class="mb-3">
188
+ <label class="block text-xs font-medium text-gray-500 mb-1">Fill Color</label>
189
+ <div class="flex flex-wrap">
190
+ <div class="color-option bg-transparent border border-gray-300 active" data-color="transparent"></div>
191
+ <div class="color-option bg-red-100" data-color="#fee2e2"></div>
192
+ <div class="color-option bg-blue-100" data-color="#dbeafe"></div>
193
+ <div class="color-option bg-green-100" data-color="#d1fae5"></div>
194
+ <div class="color-option bg-yellow-100" data-color="#fef3c7"></div>
195
+ <div class="color-option bg-purple-100" data-color="#ede9fe"></div>
196
+ <div class="color-option bg-pink-100" data-color="#fce7f3"></div>
197
+ <div class="color-option bg-gray-100" data-color="#f3f4f6"></div>
198
+ </div>
199
+ </div>
200
+ <div class="mb-3">
201
+ <label class="block text-xs font-medium text-gray-500 mb-1">Stroke Width</label>
202
+ <input id="stroke-width" type="range" min="1" max="20" value="3" class="w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer">
203
+ </div>
204
+ <div class="mb-3">
205
+ <label class="block text-xs font-medium text-gray-500 mb-1">Opacity</label>
206
+ <input id="opacity" type="range" min="10" max="100" value="100" class="w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer">
207
+ </div>
208
+ </div>
209
+
210
+ <!-- Bottom Status Bar -->
211
+ <div class="absolute bottom-4 left-1/2 transform -translate-x-1/2 bg-white rounded-full shadow-md px-4 py-1 flex items-center space-x-4 text-sm">
212
+ <div class="flex items-center">
213
+ <span class="text-gray-500">Zoom:</span>
214
+ <span id="zoom-level" class="ml-1 font-medium">100%</span>
215
+ </div>
216
+ <div class="h-4 border-l border-gray-300"></div>
217
+ <div class="flex items-center">
218
+ <span class="text-gray-500">Tool:</span>
219
+ <span id="current-tool" class="ml-1 font-medium">Select</span>
220
+ </div>
221
+ <div class="h-4 border-l border-gray-300"></div>
222
+ <div class="flex items-center">
223
+ <span class="text-gray-500">Users:</span>
224
+ <div id="user-count" class="ml-1 font-medium">1</div>
225
+ </div>
226
+ </div>
227
+ </div>
228
+ </div>
229
+
230
+ <!-- Shape Selection Modal -->
231
+ <div id="shape-modal" class="hidden fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50">
232
+ <div class="bg-white rounded-lg shadow-xl p-4 w-64">
233
+ <div class="flex justify-between items-center mb-3">
234
+ <h3 class="font-medium text-gray-800">Add Shape</h3>
235
+ <button id="close-shape-modal" class="text-gray-500 hover:text-gray-700">
236
+ <i class="fas fa-times"></i>
237
+ </button>
238
+ </div>
239
+ <div class="grid grid-cols-3 gap-3">
240
+ <button class="shape-option p-3 border rounded hover:bg-gray-50 flex flex-col items-center" data-shape="rect">
241
+ <i class="fas fa-square text-xl mb-1 text-blue-500"></i>
242
+ <span class="text-xs">Rectangle</span>
243
+ </button>
244
+ <button class="shape-option p-3 border rounded hover:bg-gray-50 flex flex-col items-center" data-shape="circle">
245
+ <i class="fas fa-circle text-xl mb-1 text-blue-500"></i>
246
+ <span class="text-xs">Circle</span>
247
+ </button>
248
+ <button class="shape-option p-3 border rounded hover:bg-gray-50 flex flex-col items-center" data-shape="triangle">
249
+ <i class="fas fa-play text-xl mb-1 text-blue-500 transform rotate-90"></i>
250
+ <span class="text-xs">Triangle</span>
251
+ </button>
252
+ <button class="shape-option p-3 border rounded hover:bg-gray-50 flex flex-col items-center" data-shape="line">
253
+ <i class="fas fa-minus text-xl mb-1 text-blue-500"></i>
254
+ <span class="text-xs">Line</span>
255
+ </button>
256
+ <button class="shape-option p-3 border rounded hover:bg-gray-50 flex flex-col items-center" data-shape="arrow">
257
+ <i class="fas fa-arrow-right text-xl mb-1 text-blue-500"></i>
258
+ <span class="text-xs">Arrow</span>
259
+ </button>
260
+ <button class="shape-option p-3 border rounded hover:bg-gray-50 flex flex-col items-center" data-shape="star">
261
+ <i class="fas fa-star text-xl mb-1 text-blue-500"></i>
262
+ <span class="text-xs">Star</span>
263
+ </button>
264
+ </div>
265
+ </div>
266
+ </div>
267
+
268
+ <!-- Share Modal -->
269
+ <div id="share-modal" class="hidden fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50">
270
+ <div class="bg-white rounded-lg shadow-xl p-6 w-96">
271
+ <div class="flex justify-between items-center mb-4">
272
+ <h3 class="text-lg font-medium text-gray-800">Share Board</h3>
273
+ <button id="close-share-modal" class="text-gray-500 hover:text-gray-700">
274
+ <i class="fas fa-times"></i>
275
+ </button>
276
+ </div>
277
+ <div class="mb-4">
278
+ <label class="block text-sm font-medium text-gray-700 mb-1">Invite by email</label>
279
+ <div class="flex">
280
+ <input type="email" placeholder="[email protected]" class="flex-1 border rounded-l px-3 py-2 focus:outline-none focus:ring-1 focus:ring-blue-500">
281
+ <button class="bg-blue-600 text-white px-4 py-2 rounded-r hover:bg-blue-700">Invite</button>
282
+ </div>
283
+ </div>
284
+ <div class="mb-4">
285
+ <label class="block text-sm font-medium text-gray-700 mb-1">Shareable link</label>
286
+ <div class="flex">
287
+ <input type="text" value="https://deepboard.app/board/abc123" readonly class="flex-1 border rounded-l px-3 py-2 bg-gray-100 text-gray-700">
288
+ <button class="bg-gray-200 text-gray-700 px-3 py-2 border-t border-r border-b border-gray-300 hover:bg-gray-300">
289
+ <i class="fas fa-copy"></i>
290
+ </button>
291
+ </div>
292
+ </div>
293
+ <div>
294
+ <label class="block text-sm font-medium text-gray-700 mb-2">Access level</label>
295
+ <div class="flex space-x-4">
296
+ <label class="inline-flex items-center">
297
+ <input type="radio" name="access" checked class="h-4 w-4 text-blue-600">
298
+ <span class="ml-2 text-gray-700">Can edit</span>
299
+ </label>
300
+ <label class="inline-flex items-center">
301
+ <input type="radio" name="access" class="h-4 w-4 text-blue-600">
302
+ <span class="ml-2 text-gray-700">Can view</span>
303
+ </label>
304
+ </div>
305
+ </div>
306
+ </div>
307
+ </div>
308
+
309
+ <script>
310
+ // Initialize Fabric.js canvas
311
+ const canvas = new fabric.Canvas('whiteboard', {
312
+ isDrawingMode: false,
313
+ selection: true,
314
+ preserveObjectStacking: true
315
+ });
316
+
317
+ // Set canvas background
318
+ canvas.setBackgroundColor('#ffffff', canvas.renderAll.bind(canvas));
319
+
320
+ // Socket.io for real-time collaboration
321
+ const socket = io('https://deepsite-socket-server.example.com');
322
+ const roomId = window.location.pathname.split('/').pop() || 'default-room';
323
+ const userId = 'user-' + Math.random().toString(36).substr(2, 9);
324
+ const userColor = `hsl(${Math.floor(Math.random() * 360)}, 70%, 60%)`;
325
+
326
+ // Join the room
327
+ socket.emit('join-room', roomId, userId);
328
+
329
+ // Track active users
330
+ const activeUsers = {};
331
+
332
+ // Current tool state
333
+ let currentTool = 'select';
334
+ let currentColor = '#000000';
335
+ let currentFill = 'transparent';
336
+ let currentStrokeWidth = 3;
337
+ let currentOpacity = 1;
338
+
339
+ // Zoom state
340
+ let zoomLevel = 1;
341
+
342
+ // DOM Elements
343
+ const canvasContainer = document.getElementById('canvas-container');
344
+ const zoomLevelDisplay = document.getElementById('zoom-level');
345
+ const currentToolDisplay = document.getElementById('current-tool');
346
+ const userCountDisplay = document.getElementById('user-count');
347
+
348
+ // Tool buttons
349
+ document.getElementById('select-tool').addEventListener('click', () => setTool('select'));
350
+ document.getElementById('pen-tool').addEventListener('click', () => setTool('pen'));
351
+ document.getElementById('text-tool').addEventListener('click', () => setTool('text'));
352
+ document.getElementById('shape-tool').addEventListener('click', () => showShapeModal());
353
+ document.getElementById('sticky-tool').addEventListener('click', () => addStickyNote());
354
+
355
+ // Zoom buttons
356
+ document.getElementById('zoom-in').addEventListener('click', () => zoomCanvas(0.1));
357
+ document.getElementById('zoom-out').addEventListener('click', () => zoomCanvas(-0.1));
358
+ document.getElementById('zoom-fit').addEventListener('click', () => fitCanvasToScreen());
359
+
360
+ // Color pickers
361
+ document.querySelectorAll('.color-option[data-color]').forEach(option => {
362
+ option.addEventListener('click', function() {
363
+ const color = this.getAttribute('data-color');
364
+
365
+ // Remove active class from all options in this group
366
+ this.parentNode.querySelectorAll('.color-option').forEach(opt => {
367
+ opt.classList.remove('active');
368
+ });
369
+
370
+ // Add active class to clicked option
371
+ this.classList.add('active');
372
+
373
+ // Determine if this is stroke or fill color
374
+ if (this.parentNode.previousElementSibling.textContent.includes('Stroke')) {
375
+ currentColor = color;
376
+ canvas.freeDrawingBrush.color = color;
377
+ } else {
378
+ currentFill = color;
379
+ }
380
+
381
+ // Update selected object if exists
382
+ const activeObject = canvas.getActiveObject();
383
+ if (activeObject) {
384
+ if (this.parentNode.previousElementSibling.textContent.includes('Stroke')) {
385
+ activeObject.set('stroke', color);
386
+ } else {
387
+ activeObject.set('fill', color === 'transparent' ? ''
388
+ <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=developerwoodstudios/index-html" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
389
+ </html>