File size: 18,815 Bytes
3ae654c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
<!DOCTYPE html>
<html lang="en" data-theme="light">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Project Setup Wizard</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link href="https://cdn.jsdelivr.net/npm/daisyui@3.9.4/dist/full.css" rel="stylesheet" type="text/css" />
    <script src="https://unpkg.com/svelte@3.59.1"></script>
    <style>
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
        
        .spinner {
            animation: spin 1.5s linear infinite;
        }
        
        .feature-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
        }
        
        .progress-bar {
            transition: width 0.5s ease-in-out;
        }
        
        .fade-in {
            animation: fadeIn 0.5s ease-in;
        }
        
        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }
    </style>
</head>
<body class="min-h-screen bg-gradient-to-br from-blue-50 to-purple-50">
    <div id="app" class="container mx-auto px-4 py-12">
        <div class="text-center mb-12">
            <h1 class="text-4xl font-bold text-gray-800 mb-2">Project Setup Wizard</h1>
            <p class="text-lg text-gray-600">Select the features you want for your new project</p>
        </div>
        
        <div class="max-w-4xl mx-auto bg-white rounded-xl shadow-lg overflow-hidden transition-all duration-300">
            <!-- Progress Bar -->
            <div class="h-2 bg-gray-200">
                <div id="progress" class="h-full bg-primary progress-bar" style="width: 0%"></div>
            </div>
            
            <!-- Form Container -->
            <div id="form-container" class="p-8">
                <div id="step-1" class="fade-in">
                    <h2 class="text-2xl font-semibold text-gray-800 mb-6">Core Features</h2>
                    <div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-8">
                        <label class="feature-card cursor-pointer">
                            <div class="card bg-base-100 shadow-md h-full transition-all duration-300">
                                <div class="card-body">
                                    <div class="flex items-center">
                                        <input type="checkbox" class="checkbox checkbox-primary" name="authentication" />
                                        <span class="ml-3 text-lg font-medium">Authentication</span>
                                    </div>
                                    <p class="mt-2 text-gray-600">User signup, login, password reset, and session management</p>
                                </div>
                            </div>
                        </label>
                        
                        <label class="feature-card cursor-pointer">
                            <div class="card bg-base-100 shadow-md h-full transition-all duration-300">
                                <div class="card-body">
                                    <div class="flex items-center">
                                        <input type="checkbox" class="checkbox checkbox-primary" name="commerce" />
                                        <span class="ml-3 text-lg font-medium">E-commerce</span>
                                    </div>
                                    <p class="mt-2 text-gray-600">Product catalog, shopping cart, and payment processing</p>
                                </div>
                            </div>
                        </label>
                    </div>
                    
                    <h2 class="text-2xl font-semibold text-gray-800 mb-6">Database Options</h2>
                    <div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-8">
                        <label class="feature-card cursor-pointer">
                            <div class="card bg-base-100 shadow-md h-full transition-all duration-300">
                                <div class="card-body">
                                    <div class="flex items-center">
                                        <input type="radio" name="database" class="radio radio-primary" value="sqlite" checked />
                                        <span class="ml-3 text-lg font-medium">SQLite (Local)</span>
                                    </div>
                                    <p class="mt-2 text-gray-600">Simple file-based database, great for development and small projects</p>
                                </div>
                            </div>
                        </label>
                        
                        <label class="feature-card cursor-pointer">
                            <div class="card bg-base-100 shadow-md h-full transition-all duration-300">
                                <div class="card-body">
                                    <div class="flex items-center">
                                        <input type="radio" name="database" class="radio radio-primary" value="postgres" />
                                        <span class="ml-3 text-lg font-medium">PostgreSQL</span>
                                    </div>
                                    <p class="mt-2 text-gray-600">Powerful relational database for production applications</p>
                                </div>
                            </div>
                        </label>
                    </div>
                    
                    <div class="flex justify-end">
                        <button onclick="nextStep()" class="btn btn-primary px-8">Next</button>
                    </div>
                </div>
                
                <div id="step-2" class="hidden fade-in">
                    <h2 class="text-2xl font-semibold text-gray-800 mb-6">Additional Features</h2>
                    <div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-8">
                        <label class="feature-card cursor-pointer">
                            <div class="card bg-base-100 shadow-md h-full transition-all duration-300">
                                <div class="card-body">
                                    <div class="flex items-center">
                                        <input type="checkbox" class="checkbox checkbox-primary" name="dashboard" />
                                        <span class="ml-3 text-lg font-medium">User Dashboard</span>
                                    </div>
                                    <p class="mt-2 text-gray-600">Personalized dashboard for users with stats and quick actions</p>
                                </div>
                            </div>
                        </label>
                        
                        <label class="feature-card cursor-pointer">
                            <div class="card bg-base-100 shadow-md h-full transition-all duration-300">
                                <div class="card-body">
                                    <div class="flex items-center">
                                        <input type="checkbox" class="checkbox checkbox-primary" name="analytics" />
                                        <span class="ml-3 text-lg font-medium">Analytics</span>
                                    </div>
                                    <p class="mt-2 text-gray-600">Track user behavior and application metrics</p>
                                </div>
                            </div>
                        </label>
                        
                        <label class="feature-card cursor-pointer">
                            <div class="card bg-base-100 shadow-md h-full transition-all duration-300">
                                <div class="card-body">
                                    <div class="flex items-center">
                                        <input type="checkbox" class="checkbox checkbox-primary" name="notifications" />
                                        <span class="ml-3 text-lg font-medium">Notifications</span>
                                    </div>
                                    <p class="mt-2 text-gray-600">In-app and email notification system</p>
                                </div>
                            </div>
                        </label>
                        
                        <label class="feature-card cursor-pointer">
                            <div class="card bg-base-100 shadow-md h-full transition-all duration-300">
                                <div class="card-body">
                                    <div class="flex items-center">
                                        <input type="checkbox" class="checkbox checkbox-primary" name="blog" />
                                        <span class="ml-3 text-lg font-medium">Blog System</span>
                                    </div>
                                    <p class="mt-2 text-gray-600">Content management for articles and posts</p>
                                </div>
                            </div>
                        </label>
                    </div>
                    
                    <div class="flex justify-between">
                        <button onclick="prevStep()" class="btn btn-ghost">Back</button>
                        <button onclick="submitForm()" class="btn btn-primary px-8">Generate Project</button>
                    </div>
                </div>
            </div>
            
            <!-- Processing Animation -->
            <div id="processing-container" class="hidden p-12 text-center">
                <div class="flex flex-col items-center justify-center">
                    <div class="spinner mb-6">
                        <svg class="w-16 h-16 text-primary" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
                            <circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
                            <path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
                        </svg>
                    </div>
                    <h2 class="text-2xl font-semibold text-gray-800 mb-2">Setting up your project</h2>
                    <p class="text-gray-600 mb-6">We're adding all the selected features to your project...</p>
                    
                    <div class="w-full bg-gray-200 rounded-full h-2.5 mb-4">
                        <div id="setup-progress" class="bg-primary h-2.5 rounded-full" style="width: 0%"></div>
                    </div>
                    
                    <div id="status-messages" class="text-left w-full max-w-md mx-auto space-y-2">
                        <!-- Status messages will be added here -->
                    </div>
                </div>
            </div>
            
            <!-- Results -->
            <div id="results-container" class="hidden p-8">
                <div class="card bg-base-100 shadow-lg">
                    <div class="card-body">
                        <div class="text-center">
                            <div class="inline-block p-4 rounded-full bg-green-100 text-green-600 mb-4">
                                <svg xmlns="http://www.w3.org/2000/svg" class="h-12 w-12" fill="none" viewBox="0 0 24 24" stroke="currentColor">
                                    <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" />
                                </svg>
                            </div>
                            <h2 class="text-2xl font-semibold text-gray-800 mb-2">Project Generated Successfully!</h2>
                            <p class="text-gray-600 mb-6">Your project with all selected features is ready to use.</p>
                            
                            <div class="bg-gray-50 rounded-lg p-6 mb-6 text-left">
                                <h3 class="font-medium text-gray-800 mb-3">Next Steps:</h3>
                                <ol class="list-decimal list-inside space-y-2 text-gray-700">
                                    <li>Run <code class="bg-gray-200 px-2 py-1 rounded">npm install</code> to install dependencies</li>
                                    <li>Configure your database connection in <code class="bg-gray-200 px-2 py-1 rounded">.env</code></li>
                                    <li>Run <code class="bg-gray-200 px-2 py-1 rounded">npm run dev</code> to start development server</li>
                                </ol>
                            </div>
                            
                            <button onclick="resetForm()" class="btn btn-primary">Start New Project</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script>
        let currentStep = 1;
        const totalSteps = 2;
        
        function updateProgress() {
            const progress = (currentStep / totalSteps) * 100;
            document.getElementById('progress').style.width = `${progress}%`;
        }
        
        function nextStep() {
            if (currentStep < totalSteps) {
                document.getElementById(`step-${currentStep}`).classList.add('hidden');
                currentStep++;
                document.getElementById(`step-${currentStep}`).classList.remove('hidden');
                updateProgress();
            }
        }
        
        function prevStep() {
            if (currentStep > 1) {
                document.getElementById(`step-${currentStep}`).classList.add('hidden');
                currentStep--;
                document.getElementById(`step-${currentStep}`).classList.remove('hidden');
                updateProgress();
            }
        }
        
        function submitForm() {
            // Show processing animation
            document.getElementById('form-container').classList.add('hidden');
            document.getElementById('processing-container').classList.remove('hidden');
            
            // Simulate processing steps
            simulateProcessing();
        }
        
        function simulateProcessing() {
            const steps = [
                "Initializing project structure...",
                "Configuring authentication system...",
                "Setting up database connection...",
                "Adding e-commerce functionality...",
                "Creating user dashboard components...",
                "Integrating analytics package...",
                "Configuring notification system...",
                "Setting up blog system...",
                "Installing dependencies...",
                "Finalizing project setup..."
            ];
            
            const statusContainer = document.getElementById('status-messages');
            const progressBar = document.getElementById('setup-progress');
            
            let current = 0;
            const total = steps.length;
            
            const interval = setInterval(() => {
                if (current < total) {
                    // Add status message
                    const message = document.createElement('div');
                    message.className = 'flex items-center text-gray-700';
                    message.innerHTML = `
                        <svg class="w-5 h-5 text-green-500 mr-2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor">
                            <path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd" />
                        </svg>
                        ${steps[current]}
                    `;
                    statusContainer.appendChild(message);
                    
                    // Update progress bar
                    const progress = ((current + 1) / total) * 100;
                    progressBar.style.width = `${progress}%`;
                    
                    current++;
                    
                    // Scroll to bottom of messages
                    statusContainer.scrollTop = statusContainer.scrollHeight;
                } else {
                    clearInterval(interval);
                    
                    // After processing is complete, show results
                    setTimeout(() => {
                        document.getElementById('processing-container').classList.add('hidden');
                        document.getElementById('results-container').classList.remove('hidden');
                    }, 1000);
                }
            }, 800);
        }
        
        function resetForm() {
            // Reset form
            document.querySelectorAll('input[type="checkbox"], input[type="radio"]').forEach(input => {
                if (input.name === 'database' && input.value === 'sqlite') {
                    input.checked = true;
                } else {
                    input.checked = false;
                }
            });
            
            // Reset UI
            document.getElementById('results-container').classList.add('hidden');
            document.getElementById('processing-container').classList.add('hidden');
            document.getElementById('form-container').classList.remove('hidden');
            
            // Reset progress
            currentStep = 1;
            document.getElementById('step-2').classList.add('hidden');
            document.getElementById('step-1').classList.remove('hidden');
            updateProgress();
            
            // Clear status messages
            document.getElementById('status-messages').innerHTML = '';
            document.getElementById('setup-progress').style.width = '0%';
        }
    </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=techydad06/starter" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>