Boobs00 commited on
Commit
a2079e7
·
verified ·
1 Parent(s): cf29010

Add 3 files

Browse files
Files changed (3) hide show
  1. README.md +7 -5
  2. index.html +638 -19
  3. prompts.txt +1 -0
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Codegen Ai Studio
3
- emoji: 🏆
4
- colorFrom: blue
5
- colorTo: pink
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: codegen-ai-studio
3
+ emoji: 🐳
4
+ colorFrom: yellow
5
+ colorTo: yellow
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,638 @@
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>Advanced AI Code Generation Interface</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
+ <style>
10
+ .gradient-bg {
11
+ background: linear-gradient(135deg, #1e3a8a 0%, #0ea5e9 100%);
12
+ }
13
+ .message-animation {
14
+ animation: fadeIn 0.3s ease-in-out;
15
+ }
16
+ @keyframes fadeIn {
17
+ from { opacity: 0; transform: translateY(10px); }
18
+ to { opacity: 1; transform: translateY(0); }
19
+ }
20
+ .settings-panel {
21
+ transition: all 0.3s ease;
22
+ max-height: 0;
23
+ overflow: hidden;
24
+ }
25
+ .settings-panel.open {
26
+ max-height: 1000px;
27
+ }
28
+ .code-block {
29
+ font-family: 'Courier New', Courier, monospace;
30
+ background-color: #1e293b;
31
+ border-radius: 0.375rem;
32
+ padding: 1rem;
33
+ position: relative;
34
+ }
35
+ .copy-btn {
36
+ position: absolute;
37
+ top: 0.5rem;
38
+ right: 0.5rem;
39
+ background-color: #334155;
40
+ border: none;
41
+ color: white;
42
+ padding: 0.25rem 0.5rem;
43
+ border-radius: 0.25rem;
44
+ cursor: pointer;
45
+ font-size: 0.75rem;
46
+ }
47
+ .prompt-refinement {
48
+ background-color: rgba(254, 243, 199, 0.3);
49
+ border-left: 4px solid #f59e0b;
50
+ }
51
+ .resizeable-textarea {
52
+ resize: vertical;
53
+ min-height: 100px;
54
+ max-height: 300px;
55
+ }
56
+ .tab-content {
57
+ display: none;
58
+ }
59
+ .tab-content.active {
60
+ display: block;
61
+ }
62
+ .token-counter {
63
+ position: absolute;
64
+ bottom: 0.5rem;
65
+ right: 0.5rem;
66
+ font-size: 0.75rem;
67
+ color: #64748b;
68
+ }
69
+ </style>
70
+ </head>
71
+ <body class="bg-gray-100 h-screen flex flex-col">
72
+ <header class="gradient-bg text-white p-4 shadow-lg">
73
+ <div class="container mx-auto flex justify-between items-center">
74
+ <h1 class="text-2xl font-bold flex items-center">
75
+ <i class="fas fa-robot mr-2"></i> CodeGen AI Studio
76
+ </h1>
77
+ <div class="flex space-x-4">
78
+ <button id="settings-btn" class="bg-white text-blue-800 px-4 py-2 rounded-lg font-medium hover:bg-blue-100 transition">
79
+ <i class="fas fa-cog mr-2"></i>Settings
80
+ </button>
81
+ <button class="bg-emerald-500 text-white px-4 py-2 rounded-lg font-medium hover:bg-emerald-600 transition">
82
+ <i class="fas fa-save mr-2"></i>Save Project
83
+ </button>
84
+ </div>
85
+ </div>
86
+ </header>
87
+
88
+ <div class="flex flex-1 overflow-hidden">
89
+ <!-- Sidebar -->
90
+ <div class="w-64 bg-gray-800 text-white p-4 flex flex-col">
91
+ <div class="mb-6">
92
+ <h2 class="text-lg font-semibold mb-2 flex items-center">
93
+ <i class="fas fa-project-diagram mr-2"></i> Projects
94
+ </h2>
95
+ <div class="space-y-1">
96
+ <button class="w-full text-left px-3 py-2 bg-blue-700 rounded">Current Project</button>
97
+ <button class="w-full text-left px-3 py-2 hover:bg-gray-700 rounded">New Project</button>
98
+ <button class="w-full text-left px-3 py-2 hover:bg-gray-700 rounded">Templates</button>
99
+ </div>
100
+ </div>
101
+
102
+ <div class="mb-6">
103
+ <h2 class="text-lg font-semibold mb-2 flex items-center">
104
+ <i class="fas fa-code mr-2"></i> Code Generation
105
+ </h2>
106
+ <div class="space-y-1">
107
+ <button class="w-full text-left px-3 py-2 hover:bg-gray-700 rounded">Frontend</button>
108
+ <button class="w-full text-left px-3 py-2 hover:bg-gray-700 rounded">Backend</button>
109
+ <button class="w-full text-left px-3 py-2 hover:bg-gray-700 rounded">Database</button>
110
+ <button class="w-full text-left px-3 py-2 hover:bg-gray-700 rounded">Full Stack</button>
111
+ </div>
112
+ </div>
113
+
114
+ <div class="mb-6">
115
+ <h2 class="text-lg font-semibold mb-2 flex items-center">
116
+ <i class="fas fa-magic mr-2"></i> Prompt Tools
117
+ </h2>
118
+ <div class="space-y-1">
119
+ <button class="w-full text-left px-3 py-2 hover:bg-gray-700 rounded">Prompt Refinement</button>
120
+ <button class="w-full text-left px-3 py-2 hover:bg-gray-700 rounded">Chain Generation</button>
121
+ <button class="w-full text-left px-3 py-2 hover:bg-gray-700 rounded">Iterative Refinement</button>
122
+ </div>
123
+ </div>
124
+
125
+ <div class="mt-auto">
126
+ <div class="bg-gray-700 p-3 rounded-lg">
127
+ <h3 class="font-medium mb-1">Token Usage</h3>
128
+ <div class="h-2 bg-gray-600 rounded-full mb-1">
129
+ <div class="h-2 bg-blue-500 rounded-full" style="width: 45%;"></div>
130
+ </div>
131
+ <div class="flex justify-between text-xs">
132
+ <span>4,231 used</span>
133
+ <span>10,000 limit</span>
134
+ </div>
135
+ </div>
136
+ </div>
137
+ </div>
138
+
139
+ <!-- Main Content -->
140
+ <div class="flex-1 flex flex-col overflow-hidden">
141
+ <!-- Settings Panel -->
142
+ <div id="settings-panel" class="settings-panel bg-white shadow-md">
143
+ <div class="p-4 border-b">
144
+ <h2 class="text-xl font-bold">Advanced Settings</h2>
145
+ </div>
146
+ <div class="p-4 grid grid-cols-1 md:grid-cols-2 gap-6">
147
+ <div>
148
+ <h3 class="font-semibold mb-3">AI Persona Configuration</h3>
149
+ <div class="space-y-4">
150
+ <div>
151
+ <label class="block text-sm font-medium mb-1">Persona Name</label>
152
+ <input type="text" class="w-full p-2 border rounded" value="CodeGen Expert">
153
+ </div>
154
+ <div>
155
+ <label class="block text-sm font-medium mb-1">Role</label>
156
+ <select class="w-full p-2 border rounded">
157
+ <option>Full-Stack Developer</option>
158
+ <option>Frontend Specialist</option>
159
+ <option>Backend Architect</option>
160
+ <option>DevOps Engineer</option>
161
+ </select>
162
+ </div>
163
+ <div>
164
+ <label class="block text-sm font-medium mb-1">Expertise Level</label>
165
+ <select class="w-full p-2 border rounded">
166
+ <option>Beginner</option>
167
+ <option>Intermediate</option>
168
+ <option selected>Advanced</option>
169
+ <option>Expert</option>
170
+ </select>
171
+ </div>
172
+ </div>
173
+ </div>
174
+ <div>
175
+ <h3 class="font-semibold mb-3">System Instructions</h3>
176
+ <textarea class="w-full p-2 border rounded resizeable-textarea h-40" placeholder="Enter detailed system instructions for the AI...">You are CodeGen AI, an advanced full-stack development assistant. Your role is to help users build complete web applications from scratch. You should:
177
+ - Provide complete, production-ready code
178
+ - Explain technical concepts clearly
179
+ - Suggest best practices
180
+ - Offer multiple implementation options
181
+ - Identify potential issues
182
+ - Help with debugging
183
+ - Guide through deployment</textarea>
184
+ <div class="token-counter">Tokens: 127</div>
185
+ </div>
186
+ <div>
187
+ <h3 class="font-semibold mb-3">Model Parameters</h3>
188
+ <div class="space-y-4">
189
+ <div>
190
+ <label class="block text-sm font-medium mb-1">Temperature</label>
191
+ <input type="range" min="0" max="1" step="0.1" value="0.7" class="w-full">
192
+ <div class="flex justify-between text-xs">
193
+ <span>Precise (0)</span>
194
+ <span>Balanced (0.7)</span>
195
+ <span>Creative (1)</span>
196
+ </div>
197
+ </div>
198
+ <div>
199
+ <label class="block text-sm font-medium mb-1">Max Tokens</label>
200
+ <input type="number" class="w-full p-2 border rounded" value="2048">
201
+ </div>
202
+ <div>
203
+ <label class="block text-sm font-medium mb-1">Response Length</label>
204
+ <select class="w-full p-2 border rounded">
205
+ <option>Short</option>
206
+ <option selected>Medium</option>
207
+ <option>Long</option>
208
+ <option>Very Long</option>
209
+ </select>
210
+ </div>
211
+ </div>
212
+ </div>
213
+ <div>
214
+ <h3 class="font-semibold mb-3">Code Preferences</h3>
215
+ <div class="space-y-4">
216
+ <div>
217
+ <label class="block text-sm font-medium mb-1">Frontend Framework</label>
218
+ <select class="w-full p-2 border rounded">
219
+ <option>React</option>
220
+ <option>Vue</option>
221
+ <option selected>Next.js</option>
222
+ <option>Svelte</option>
223
+ <option>Angular</option>
224
+ </select>
225
+ </div>
226
+ <div>
227
+ <label class="block text-sm font-medium mb-1">Backend Framework</label>
228
+ <select class="w-full p-2 border rounded">
229
+ <option>Node.js</option>
230
+ <option selected>Express</option>
231
+ <option>NestJS</option>
232
+ <option>Django</option>
233
+ <option>Laravel</option>
234
+ </select>
235
+ </div>
236
+ <div>
237
+ <label class="block text-sm font-medium mb-1">Database</label>
238
+ <select class="w-full p-2 border rounded">
239
+ <option>MongoDB</option>
240
+ <option selected>PostgreSQL</option>
241
+ <option>MySQL</option>
242
+ <option>Firebase</option>
243
+ </select>
244
+ </div>
245
+ </div>
246
+ </div>
247
+ </div>
248
+ <div class="p-4 border-t flex justify-end space-x-2">
249
+ <button id="close-settings" class="px-4 py-2 border rounded">Cancel</button>
250
+ <button class="px-4 py-2 bg-blue-600 text-white rounded">Save Settings</button>
251
+ </div>
252
+ </div>
253
+
254
+ <!-- Chat Area -->
255
+ <div id="chat-container" class="flex-1 overflow-y-auto p-4 space-y-4">
256
+ <!-- System Message -->
257
+ <div class="message-animation flex">
258
+ <div class="bg-blue-100 p-4 rounded-lg max-w-3xl">
259
+ <div class="font-semibold text-blue-800 mb-1">System</div>
260
+ <p>Welcome to CodeGen AI Studio! I'm your AI assistant specialized in full-stack development. How can I help you build your application today?</p>
261
+ <div class="mt-2 flex space-x-2">
262
+ <button class="text-xs bg-blue-600 text-white px-2 py-1 rounded">Quick Start Guide</button>
263
+ <button class="text-xs border px-2 py-1 rounded">View Templates</button>
264
+ </div>
265
+ </div>
266
+ </div>
267
+
268
+ <!-- User Message -->
269
+ <div class="message-animation flex justify-end">
270
+ <div class="bg-gray-200 p-4 rounded-lg max-w-3xl">
271
+ <div class="font-semibold text-gray-800 mb-1">You</div>
272
+ <p>I need to build a full-stack e-commerce application with Next.js, Express, and PostgreSQL. Can you help me set up the basic structure?</p>
273
+ </div>
274
+ </div>
275
+
276
+ <!-- AI Response -->
277
+ <div class="message-animation flex">
278
+ <div class="bg-white p-4 rounded-lg max-w-3xl shadow border">
279
+ <div class="font-semibold text-gray-800 mb-1 flex items-center">
280
+ <i class="fas fa-robot text-blue-600 mr-2"></i> CodeGen AI
281
+ </div>
282
+ <p>Absolutely! Let's set up a robust e-commerce application. Here's the recommended structure:</p>
283
+
284
+ <div class="mt-3 mb-3">
285
+ <ul class="list-disc pl-5 space-y-1">
286
+ <li><strong>Frontend</strong>: Next.js with TypeScript</li>
287
+ <li><strong>Backend</strong>: Express API with JWT authentication</li>
288
+ <li><strong>Database</strong>: PostgreSQL with Prisma ORM</li>
289
+ <li><strong>State Management</strong>: React Context or Redux</li>
290
+ <li><strong>Styling</strong>: Tailwind CSS (already included)</li>
291
+ </ul>
292
+ </div>
293
+
294
+ <p>Let me generate the initial project structure and basic configuration files:</p>
295
+
296
+ <div class="mt-4">
297
+ <div class="flex border-b">
298
+ <button class="tab-btn active px-4 py-2 border-b-2 border-blue-500" data-tab="frontend">Frontend</button>
299
+ <button class="tab-btn px-4 py-2" data-tab="backend">Backend</button>
300
+ <button class="tab-btn px-4 py-2" data-tab="database">Database</button>
301
+ </div>
302
+
303
+ <div class="tab-content active mt-2" id="frontend">
304
+ <div class="code-block text-white">
305
+ <button class="copy-btn"><i class="fas fa-copy"></i> Copy</button>
306
+ <pre><code>// Initialize Next.js project
307
+ npx create-next-app@latest ecommerce-frontend --typescript
308
+ cd ecommerce-frontend
309
+
310
+ // Recommended folder structure:
311
+ ├── components/
312
+ │ ├── common/ # Reusable UI components
313
+ │ ├── layout/ # Layout components
314
+ │ └── products/ # Product-related components
315
+ ├── context/ # React context providers
316
+ ├── hooks/ # Custom hooks
317
+ ├── pages/
318
+ │ ├── api/ # API routes (optional)
319
+ │ ├── products/ # Product pages
320
+ │ ├── cart/ # Cart pages
321
+ │ └── _app.tsx # Custom App component
322
+ ├── public/ # Static assets
323
+ ├── styles/ # Global styles
324
+ ├── types/ # TypeScript types
325
+ └── utils/ # Utility functions</code></pre>
326
+ </div>
327
+ </div>
328
+
329
+ <div class="tab-content mt-2" id="backend">
330
+ <div class="code-block text-white">
331
+ <button class="copy-btn"><i class="fas fa-copy"></i> Copy</button>
332
+ <pre><code>// Initialize Express backend
333
+ mkdir ecommerce-backend
334
+ cd ecommerce-backend
335
+ npm init -y
336
+ npm install express typescript ts-node @types/node @types/express --save-dev
337
+
338
+ // Recommended folder structure:
339
+ ├── src/
340
+ │ ├── config/ # Configuration files
341
+ │ ├── controllers/ # Route controllers
342
+ │ ├── middleware/ # Express middleware
343
+ │ ├── models/ # Data models
344
+ │ ├── routes/ # API routes
345
+ │ ├── services/ # Business logic
346
+ │ ├── utils/ # Utility functions
347
+ │ └── app.ts # Express app setup
348
+ ├── .env # Environment variables
349
+ ├── package.json
350
+ └── tsconfig.json</code></pre>
351
+ </div>
352
+ </div>
353
+
354
+ <div class="tab-content mt-2" id="database">
355
+ <div class="code-block text-white">
356
+ <button class="copy-btn"><i class="fas fa-copy"></i> Copy</button>
357
+ <pre><code># PostgreSQL Setup
358
+ 1. Install PostgreSQL locally or use a cloud provider
359
+ 2. Create a new database for your e-commerce app
360
+
361
+ # Prisma ORM Setup
362
+ npm install prisma @prisma/client --save
363
+ npx prisma init
364
+
365
+ # Configure schema.prisma
366
+ datasource db {
367
+ provider = "postgresql"
368
+ url = env("DATABASE_URL")
369
+ }
370
+
371
+ model Product {
372
+ id Int @id @default(autoincrement())
373
+ name String
374
+ description String?
375
+ price Float
376
+ imageUrl String?
377
+ createdAt DateTime @default(now())
378
+ updatedAt DateTime @updatedAt
379
+ }
380
+
381
+ # After defining your schema:
382
+ npx prisma migrate dev --name init</code></pre>
383
+ </div>
384
+ </div>
385
+ </div>
386
+
387
+ <div class="mt-4">
388
+ <p>Would you like me to:</p>
389
+ <div class="flex flex-wrap gap-2 mt-2">
390
+ <button class="px-3 py-1 bg-blue-600 text-white rounded-full text-sm">Generate Full Setup Script</button>
391
+ <button class="px-3 py-1 border rounded-full text-sm">Explain Each Part</button>
392
+ <button class="px-3 py-1 border rounded-full text-sm">Show Deployment Options</button>
393
+ <button class="px-3 py-1 border rounded-full text-sm">Add Authentication</button>
394
+ </div>
395
+ </div>
396
+ </div>
397
+ </div>
398
+ </div>
399
+
400
+ <!-- Prompt Engineering Tools -->
401
+ <div class="border-t p-4 bg-white">
402
+ <div class="flex mb-2">
403
+ <button class="prompt-tool-btn active px-3 py-1 border-b-2 border-blue-500" data-tool="basic">Basic</button>
404
+ <button class="prompt-tool-btn px-3 py-1" data-tool="refine">Refinement</button>
405
+ <button class="prompt-tool-btn px-3 py-1" data-tool="chain">Chain Generation</button>
406
+ <button class="prompt-tool-btn px-3 py-1" data-tool="iterative">Iterative</button>
407
+ </div>
408
+
409
+ <div id="basic-tool" class="prompt-tool-content active">
410
+ <textarea class="w-full p-3 border rounded resizeable-textarea" placeholder="Type your message here..." rows="2"></textarea>
411
+ <div class="flex justify-between mt-2">
412
+ <div class="flex space-x-2">
413
+ <button class="px-3 py-1 bg-gray-200 rounded-full text-sm">
414
+ <i class="fas fa-magic mr-1"></i> Enhance
415
+ </button>
416
+ <button class="px-3 py-1 bg-gray-200 rounded-full text-sm">
417
+ <i class="fas fa-code mr-1"></i> Add Code Context
418
+ </button>
419
+ </div>
420
+ <button class="px-4 py-2 bg-blue-600 text-white rounded">Send</button>
421
+ </div>
422
+ </div>
423
+
424
+ <div id="refine-tool" class="prompt-tool-content">
425
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
426
+ <div>
427
+ <label class="block text-sm font-medium mb-1">Original Prompt</label>
428
+ <textarea class="w-full p-3 border rounded resizeable-textarea" rows="4">Build a login page with React</textarea>
429
+ </div>
430
+ <div>
431
+ <label class="block text-sm font-medium mb-1">Refined Prompt</label>
432
+ <div class="prompt-refinement p-3 rounded">
433
+ <p>Create a secure login page using React with the following features:</p>
434
+ <ul class="list-disc pl-5 mt-1">
435
+ <li>Email and password fields with validation</li>
436
+ <li>Show/hide password toggle</li>
437
+ <li>Remember me checkbox</li>
438
+ <li>Forgot password link</li>
439
+ <li>Social login options (Google, Facebook)</li>
440
+ <li>Proper error handling</li>
441
+ <li>Loading state during submission</li>
442
+ </ul>
443
+ <p>Use modern React hooks and context for state management. Include thorough TypeScript types and ensure accessibility compliance.</p>
444
+ </div>
445
+ </div>
446
+ </div>
447
+ <div class="flex justify-end mt-4">
448
+ <button class="px-4 py-2 bg-blue-600 text-white rounded">Use Refined Prompt</button>
449
+ </div>
450
+ </div>
451
+
452
+ <div id="chain-tool" class="prompt-tool-content">
453
+ <div class="space-y-4">
454
+ <div>
455
+ <label class="block text-sm font-medium mb-1">Main Objective</label>
456
+ <input type="text" class="w-full p-2 border rounded" placeholder="Build a full-stack e-commerce application">
457
+ </div>
458
+ <div>
459
+ <label class="block text-sm font-medium mb-1">Prompt Chain</label>
460
+ <div class="space-y-2">
461
+ <div class="flex items-center bg-gray-100 p-2 rounded">
462
+ <span class="mr-2">1.</span>
463
+ <input type="text" class="flex-1 p-1 border rounded" value="Set up Next.js project structure">
464
+ <button class="ml-2 text-red-500"><i class="fas fa-times"></i></button>
465
+ </div>
466
+ <div class="flex items-center bg-gray-100 p-2 rounded">
467
+ <span class="mr-2">2.</span>
468
+ <input type="text" class="flex-1 p-1 border rounded" value="Create Express API endpoints">
469
+ <button class="ml-2 text-red-500"><i class="fas fa-times"></i></button>
470
+ </div>
471
+ <div class="flex items-center bg-gray-100 p-2 rounded">
472
+ <span class="mr-2">3.</span>
473
+ <input type="text" class="flex-1 p-1 border rounded" value="Design PostgreSQL database schema">
474
+ <button class="ml-2 text-red-500"><i class="fas fa-times"></i></button>
475
+ </div>
476
+ <button class="text-sm text-blue-600 flex items-center">
477
+ <i class="fas fa-plus mr-1"></i> Add Step
478
+ </button>
479
+ </div>
480
+ </div>
481
+ </div>
482
+ <div class="flex justify-end mt-4">
483
+ <button class="px-4 py-2 bg-blue-600 text-white rounded">Execute Chain</button>
484
+ </div>
485
+ </div>
486
+
487
+ <div id="iterative-tool" class="prompt-tool-content">
488
+ <div class="space-y-4">
489
+ <div>
490
+ <label class="block text-sm font-medium mb-1">Initial Prompt</label>
491
+ <textarea class="w-full p-2 border rounded resizeable-textarea" rows="2">Create a product listing component</textarea>
492
+ </div>
493
+ <div>
494
+ <label class="block text-sm font-medium mb-1">Iterations</label>
495
+ <select class="w-full p-2 border rounded">
496
+ <option>Add filtering functionality</option>
497
+ <option>Implement pagination</option>
498
+ <option>Add sorting options</option>
499
+ <option>Include product search</option>
500
+ </select>
501
+ </div>
502
+ <div>
503
+ <label class="block text-sm font-medium mb-1">Enhanced Prompt</label>
504
+ <textarea class="w-full p-2 border rounded resizeable-textarea" rows="4">Create a product listing component with:
505
+ - Filtering by category and price range
506
+ - Pagination with 10 items per page
507
+ - Sorting by price, name, and date added
508
+ - Search functionality that queries product names and descriptions
509
+ - Responsive grid layout that adapts to screen size
510
+ - Loading state while fetching data
511
+ - Error handling for API failures</textarea>
512
+ </div>
513
+ </div>
514
+ <div class="flex justify-end mt-4">
515
+ <button class="px-4 py-2 bg-blue-600 text-white rounded">Generate Iteration</button>
516
+ </div>
517
+ </div>
518
+ </div>
519
+ </div>
520
+ </div>
521
+
522
+ <script>
523
+ // Settings panel toggle
524
+ document.getElementById('settings-btn').addEventListener('click', function() {
525
+ document.getElementById('settings-panel').classList.toggle('open');
526
+ });
527
+
528
+ document.getElementById('close-settings').addEventListener('click', function() {
529
+ document.getElementById('settings-panel').classList.remove('open');
530
+ });
531
+
532
+ // Tab functionality
533
+ document.querySelectorAll('.tab-btn').forEach(btn => {
534
+ btn.addEventListener('click', function() {
535
+ const tabId = this.getAttribute('data-tab');
536
+
537
+ // Remove active class from all tabs and contents
538
+ document.querySelectorAll('.tab-btn').forEach(t => t.classList.remove('active'));
539
+ document.querySelectorAll('.tab-content').forEach(c => c.classList.remove('active'));
540
+
541
+ // Add active class to current tab and content
542
+ this.classList.add('active');
543
+ document.getElementById(tabId).classList.add('active');
544
+ });
545
+ });
546
+
547
+ // Prompt tools tabs
548
+ document.querySelectorAll('.prompt-tool-btn').forEach(btn => {
549
+ btn.addEventListener('click', function() {
550
+ const toolId = this.getAttribute('data-tool');
551
+
552
+ // Remove active class from all buttons and contents
553
+ document.querySelectorAll('.prompt-tool-btn').forEach(t => t.classList.remove('active'));
554
+ document.querySelectorAll('.prompt-tool-content').forEach(c => c.classList.remove('active'));
555
+
556
+ // Add active class to current button and content
557
+ this.classList.add('active');
558
+ document.getElementById(`${toolId}-tool`).classList.add('active');
559
+ });
560
+ });
561
+
562
+ // Copy code functionality
563
+ document.querySelectorAll('.copy-btn').forEach(btn => {
564
+ btn.addEventListener('click', function() {
565
+ const codeBlock = this.parentElement.querySelector('code');
566
+ const range = document.createRange();
567
+ range.selectNode(codeBlock);
568
+ window.getSelection().removeAllRanges();
569
+ window.getSelection().addRange(range);
570
+ document.execCommand('copy');
571
+ window.getSelection().removeAllRanges();
572
+
573
+ // Show copied feedback
574
+ const originalText = this.innerHTML;
575
+ this.innerHTML = '<i class="fas fa-check"></i> Copied!';
576
+ setTimeout(() => {
577
+ this.innerHTML = originalText;
578
+ }, 2000);
579
+ });
580
+ });
581
+
582
+ // Auto-resize textareas
583
+ document.querySelectorAll('.resizeable-textarea').forEach(textarea => {
584
+ textarea.addEventListener('input', function() {
585
+ this.style.height = 'auto';
586
+ this.style.height = (this.scrollHeight) + 'px';
587
+ });
588
+ });
589
+
590
+ // Simulate chat interaction
591
+ document.querySelector('#basic-tool button.bg-blue-600').addEventListener('click', function() {
592
+ const chatContainer = document.getElementById('chat-container');
593
+ const message = document.querySelector('#basic-tool textarea').value;
594
+
595
+ if (message.trim() === '') return;
596
+
597
+ // Add user message
598
+ const userMsg = document.createElement('div');
599
+ userMsg.className = 'message-animation flex justify-end';
600
+ userMsg.innerHTML = `
601
+ <div class="bg-gray-200 p-4 rounded-lg max-w-3xl">
602
+ <div class="font-semibold text-gray-800 mb-1">You</div>
603
+ <p>${message}</p>
604
+ </div>
605
+ `;
606
+ chatContainer.appendChild(userMsg);
607
+
608
+ // Clear input
609
+ document.querySelector('#basic-tool textarea').value = '';
610
+
611
+ // Simulate AI response
612
+ setTimeout(() => {
613
+ const aiMsg = document.createElement('div');
614
+ aiMsg.className = 'message-animation flex';
615
+ aiMsg.innerHTML = `
616
+ <div class="bg-white p-4 rounded-lg max-w-3xl shadow border">
617
+ <div class="font-semibold text-gray-800 mb-1 flex items-center">
618
+ <i class="fas fa-robot text-blue-600 mr-2"></i> CodeGen AI
619
+ </div>
620
+ <p>I've processed your request. Here's what I can suggest for your e-commerce application:</p>
621
+ <ul class="list-disc pl-5 mt-2">
622
+ <li>Implementing a product catalog with filters</li>
623
+ <li>Setting up user authentication</li>
624
+ <li>Creating a shopping cart system</li>
625
+ <li>Designing checkout flow</li>
626
+ </ul>
627
+ <p>Which aspect would you like me to focus on first?</p>
628
+ </div>
629
+ `;
630
+ chatContainer.appendChild(aiMsg);
631
+ chatContainer.scrollTop = chatContainer.scrollHeight;
632
+ }, 1000);
633
+
634
+ chatContainer.scrollTop = chatContainer.scrollHeight;
635
+ });
636
+ </script>
637
+ <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=Boobs00/codegen-ai-studio" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
638
+ </html>
prompts.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ Build a fully featured and highly advanced chat interface with a comprehensive set of settings and system instruction input box for complete persona/character/role creation and a much more collaborative conversation with the a I code generation full stack website builder here in this contextAnd set it up with robust advanced prompt engineering tools.For refining and enhancing prompts, as well as triggering a full chain of prompts in executing an iterative fullstack application generation.