namana23 commited on
Commit
9b7efc5
·
verified ·
1 Parent(s): 35155bf

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. index.html +857 -657
index.html CHANGED
@@ -1,685 +1,885 @@
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>ReelsAI.pro - SaaS Architecture & Generator</title>
7
- <!-- FontAwesome for Icons -->
8
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
- <!-- Google Fonts -->
10
- <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap" rel="stylesheet">
11
-
12
- <style>
13
- :root {
14
- --bg-dark: #0f1115;
15
- --bg-panel: #161b22;
16
- --accent-primary: #7c4dff;
17
- --accent-secondary: #ff4081;
18
- --text-main: #ffffff;
19
- --text-muted: #94a3b8;
20
- --border: #2d3748;
21
- --glass: rgba(22, 27, 34, 0.7);
22
- }
23
-
24
- * {
25
- box-sizing: box-box;
26
- margin: 0;
27
- padding: 0;
28
- font-family: 'Inter', sans-serif;
29
- }
30
-
31
- body {
32
- background-color: var(--bg-dark);
33
- color: var(--text-main);
34
- height: 100vh;
35
- display: flex;
36
- overflow: hidden;
37
- }
38
-
39
- /* Sidebar Navigation */
40
- .sidebar {
41
- width: 260px;
42
- background: var(--bg-panel);
43
- border-right: 1px solid var(--border);
44
- display: flex;
45
- flex-direction: column;
46
- padding: 20px;
47
- transition: all 0.3s ease;
48
- }
49
-
50
- .brand {
51
- font-size: 24px;
52
- font-weight: 700;
53
- color: var(--text-main);
54
- margin-bottom: 40px;
55
- display: flex;
56
- align-items: center;
57
- gap: 10px;
58
- }
59
-
60
- .brand i {
61
- color: var(--accent-primary);
62
- }
63
-
64
- .nav-item {
65
- padding: 12px 16px;
66
- margin-bottom: 8px;
67
- border-radius: 8px;
68
- cursor: pointer;
69
- color: var(--text-muted);
70
- transition: 0.2s;
71
- display: flex;
72
- align-items: center;
73
- gap: 12px;
74
- font-weight: 500;
75
- }
76
-
77
- .nav-item:hover, .nav-item.active {
78
- background: rgba(124, 77, 255, 0.1);
79
- color: var(--text-main);
80
- border-left: 3px solid var(--accent-primary);
81
- }
82
-
83
- .nav-item i {
84
- width: 20px;
85
- text-align: center;
86
- }
87
-
88
- /* Main Content Area */
89
- .main-content {
90
- flex: 1;
91
- display: flex;
92
- flex-direction: column;
93
- overflow: hidden;
94
- position: relative;
95
- }
96
-
97
- /* Top Bar */
98
- .top-bar {
99
- height: 60px;
100
- border-bottom: 1px solid var(--border);
101
- display: flex;
102
- align-items: center;
103
- justify-content: space-between;
104
- padding: 0 30px;
105
- background: var(--bg-panel);
106
- }
107
-
108
- .header-title {
109
- font-size: 18px;
110
- font-weight: 600;
111
- }
112
-
113
- .user-profile {
114
- display: flex;
115
- align-items: center;
116
- gap: 10px;
117
- }
118
-
119
- .avatar {
120
- width: 32px;
121
- height: 32px;
122
- background: var(--accent-secondary);
123
- border-radius: 50%;
124
- display: flex;
125
- align-items: center;
126
- justify-content: center;
127
- font-weight: bold;
128
- }
129
-
130
- /* Dashboard Grid */
131
- .dashboard-container {
132
- padding: 30px;
133
- overflow-y: auto;
134
- display: grid;
135
- grid-template-columns: 1fr 1fr;
136
- gap: 20px;
137
- height: 100%;
138
- }
139
-
140
- /* Generator Panel */
141
- .generator-panel {
142
- background: var(--bg-panel);
143
- border: 1px solid var(--border);
144
- border-radius: 12px;
145
- padding: 25px;
146
- display: flex;
147
- flex-direction: column;
148
- gap: 20px;
149
- box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
150
- }
151
-
152
- .input-group {
153
- display: flex;
154
- flex-direction: column;
155
- gap: 10px;
156
- }
157
-
158
- .input-group label {
159
- font-size: 14px;
160
- color: var(--text-muted);
161
- font-weight: 600;
162
- }
163
-
164
- .topic-input {
165
- background: var(--bg-dark);
166
- border: 1px solid var(--border);
167
- padding: 15px;
168
- color: var(--text-main);
169
- border-radius: 8px;
170
- font-size: 16px;
171
- outline: none;
172
- transition: 0.2s;
173
- }
174
-
175
- .topic-input:focus {
176
- border-color: var(--accent-primary);
177
- box-shadow: 0 0 0 2px rgba(124, 77, 255, 0.2);
178
- }
179
-
180
- .generate-btn {
181
- background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
182
- color: white;
183
- border: none;
184
- padding: 15px;
185
- border-radius: 8px;
186
- font-weight: 600;
187
- cursor: pointer;
188
- font-size: 16px;
189
- transition: transform 0.2s;
190
- display: flex;
191
- justify-content: center;
192
- align-items: center;
193
- gap: 10px;
194
- }
195
-
196
- .generate-btn:hover {
197
- transform: translateY(-2px);
198
- box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
199
- }
200
-
201
- /* Architecture Documentation Panel */
202
- .arch-panel {
203
- background: var(--bg-panel);
204
- border: 1px solid var(--border);
205
- border-radius: 12px;
206
- padding: 25px;
207
- overflow-y: auto;
208
- max-height: 80vh;
209
- }
210
-
211
- .arch-content h2 {
212
- margin-bottom: 15px;
213
- color: var(--accent-primary);
214
- font-size: 20px;
215
- }
216
-
217
- .arch-content h3 {
218
- margin-top: 20px;
219
- margin-bottom: 10px;
220
- color: var(--text-main);
221
- font-size: 16px;
222
- border-left: 3px solid var(--accent-secondary);
223
- padding-left: 10px;
224
- }
225
-
226
- .arch-content p, .arch-content li {
227
- color: var(--text-muted);
228
- font-size: 14px;
229
- line-height: 1.6;
230
- margin-bottom: 10px;
231
- }
232
-
233
- .arch-content ul {
234
- margin-left: 20px;
235
- }
236
-
237
- .tech-badge {
238
- display: inline-block;
239
- background: rgba(124, 77, 255, 0.2);
240
- padding: 4px 8px;
241
- border-radius: 4px;
242
- font-size: 12px;
243
- color: #fff;
244
- margin-right: 5px;
245
- margin-bottom: 5px;
246
- }
247
-
248
- /* Video Preview Simulation */
249
- .preview-area {
250
- width: 100%;
251
- height: 400px;
252
- background: #000;
253
- border-radius: 8px;
254
- position: relative;
255
- overflow: hidden;
256
- margin-top: 20px;
257
- display: flex;
258
- align-items: center;
259
- justify-content: center;
260
- border: 1px solid var(--border);
261
- }
262
-
263
- .video-placeholder {
264
- width: 200px;
265
- height: 350px; /* 9:16 aspect ratio roughly */
266
- background: #1a1a1a;
267
- border-radius: 4px;
268
- position: relative;
269
- display: flex;
270
- flex-direction: column;
271
- justify-content: center;
272
- align-items: center;
273
- color: #555;
274
- font-size: 12px;
275
- text-align: center;
276
- }
277
-
278
- .overlay-text {
279
- background: rgba(0,0,0,0.6);
280
- padding: 5px 10px;
281
- border-radius: 4px;
282
- color: #fff;
283
- margin-top: 10px;
284
- font-weight: bold;
285
- animation: pulse 2s infinite;
286
- }
287
 
288
- /* Progress Bar */
289
- .progress-container {
290
- width: 100%;
291
- background: #2d3748;
292
- height: 6px;
293
- border-radius: 3px;
294
- margin-top: 10px;
295
- overflow: hidden;
296
- display: none;
297
- }
298
-
299
- .progress-bar {
300
- height: 100%;
301
- width: 0%;
302
- background: var(--accent-secondary);
303
- transition: width 0.5s ease;
304
- }
305
-
306
- .steps-grid {
307
- display: grid;
308
- grid-template-columns: 1fr 1fr;
309
- gap: 10px;
310
- margin-top: 20px;
311
- }
312
-
313
- .step-card {
314
- background: var(--bg-dark);
315
- padding: 10px;
316
- border-radius: 6px;
317
- font-size: 12px;
318
- color: var(--text-muted);
319
- border: 1px solid var(--border);
320
- opacity: 0.5;
321
- }
322
-
323
- .step-card.completed {
324
- opacity: 1;
325
- border-color: var(--accent-primary);
326
- color: var(--text-main);
327
- }
328
-
329
- /* Modal for Architecture View */
330
- .modal-overlay {
331
- position: fixed;
332
- top: 0; left: 0; width: 100%; height: 100%;
333
- background: rgba(0,0,0,0.8);
334
- z-index: 1000;
335
- display: none;
336
- justify-content: center;
337
- align-items: center;
338
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
339
 
340
- .modal-content {
341
- background: var(--bg-panel);
342
- width: 800px;
343
- max-width: 90%;
344
- max-height: 90%;
345
- overflow-y: auto;
346
- padding: 40px;
347
- border-radius: 12px;
348
- border: 1px solid var(--border);
349
- position: relative;
350
- }
351
 
352
- .close-modal {
353
- position: absolute;
354
- top: 20px;
355
- right: 20px;
356
- cursor: pointer;
357
- font-size: 20px;
358
- color: var(--text-muted);
359
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
360
 
361
- /* Animations */
362
- @keyframes pulse {
363
- 0% { opacity: 0.8; }
364
- 50% { opacity: 1; }
365
- 100% { opacity: 0.8; }
366
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
367
 
368
- /* Responsive */
369
- @media (max-width: 900px) {
370
- .dashboard-container {
371
- grid-template-columns: 1fr;
372
- }
373
- .sidebar {
374
- width: 70px;
375
- }
376
- .nav-item span {
377
- display: none;
378
- }
379
- .brand span {
380
- display: none;
381
- }
382
- }
383
- </style>
384
- </head>
385
- <body>
386
 
387
- <!-- Sidebar -->
388
- <div class="sidebar">
389
- <div class="brand">
390
- <i class="fas fa-bolt"></i>
391
- <span>ReelsAI</span>
392
- </div>
393
- <div class="nav-item active" onclick="switchView('dashboard')">
394
- <i class="fas fa-video"></i>
395
- <span>Generator</span>
396
- </div>
397
- <div class="nav-item" onclick="openArchitecture()">
398
- <i class="fas fa-code"></i>
399
- <span>Architecture</span>
400
- </div>
401
- <div class="nav-item">
402
- <i class="fas fa-chart-line"></i>
403
- <span>Analytics</span>
404
- </div>
405
- <div class="nav-item">
406
- <i class="fas fa-cog"></i>
407
- <span>Settings</span>
408
- </div>
409
 
410
- <div style="margin-top: auto; padding-top: 20px; border-top: 1px solid var(--border);">
411
- <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" style="color: var(--text-muted); font-size: 12px; text-decoration: none; display: flex; align-items: center; gap: 5px;">
412
- <i class="fas fa-external-link-alt"></i> Built with AnyCoder
413
- </a>
414
  </div>
415
- </div>
416
 
417
- <!-- Main Content -->
418
- <div class="main-content">
419
- <!-- Top Bar -->
420
- <div class="top-bar">
421
- <div class="header-title">Dashboard</div>
422
- <div class="user-profile">
423
- <div class="avatar">JD</div>
424
- <span style="font-size: 14px;">John Doe</span>
425
- </div>
426
  </div>
427
 
428
- <!-- Dashboard View -->
429
- <div class="dashboard-container" id="dashboard-view">
430
-
431
- <!-- Generator Panel -->
432
- <div class="generator-panel">
433
- <h2 style="color: var(--text-main);">Create Viral Reel</h2>
434
- <div class="input-group">
435
- <label>Video Topic</label>
436
- <input type="text" class="topic-input" id="topicInput" placeholder="e.g., 3 secrets to success">
437
- </div>
438
-
439
- <div class="input-group">
440
- <label>Style</label>
441
- <select class="topic-input" style="cursor: pointer;">
442
- <option>Motivational / Dark</option>
443
- <option>Business / Clean</option>
444
- <option>Funny / Bright</option>
445
- </select>
446
- </div>
447
-
448
- <button class="generate-btn" onclick="startGeneration()">
449
- <i class="fas fa-magic"></i> Generate Video
450
- </button>
451
-
452
- <!-- Progress UI -->
453
- <div id="progressUI" style="display: none;">
454
- <div class="progress-container" style="display: block;">
455
- <div class="progress-bar" id="progressBar"></div>
456
- </div>
457
- <div style="margin-top: 15px; font-size: 13px; color: var(--text-muted);">
458
- Status: <span id="statusText" style="color: var(--accent-primary)">Initializing...</span>
459
- </div>
460
-
461
- <div class="steps-grid">
462
- <div class="step-card" id="step1">1. Script Generation</div>
463
- <div class="step-card" id="step2">2. Voice Synthesis</div>
464
- <div class="step-card" id="step3">3. Caption Sync</div>
465
- <div class="step-card" id="step4">4. FFmpeg Render</div>
466
- </div>
467
-
468
- <!-- Video Preview Simulation -->
469
- <div class="preview-area">
470
- <div class="video-placeholder">
471
- <i class="fas fa-play" style="font-size: 30px; margin-bottom: 10px; opacity: 0.5;"></i>
472
- <div>Preview</div>
473
- <div class="overlay-text" id="captionPreview">Captions Loading...</div>
474
- </div>
475
- </div>
476
-
477
- <button class="generate-btn" style="background: transparent; border: 1px solid var(--border); margin-top: 10px; font-size: 14px;" onclick="downloadMock()">
478
- <i class="fas fa-download"></i> Download MP4
479
- </button>
480
- </div>
481
  </div>
482
-
483
- <!-- Quick Info Panel -->
484
- <div class="arch-panel">
485
- <h2>System Status</h2>
486
- <div style="display: flex; gap: 20px; margin-bottom: 20px;">
487
- <div style="text-align: center;">
488
- <div style="font-size: 24px; color: var(--accent-primary);">Active</div>
489
- <div style="font-size: 12px; color: var(--text-muted);">API Gateway</div>
490
- </div>
491
- <div style="text-align: center;">
492
- <div style="font-size: 24px; color: var(--accent-secondary);">GPU Ready</div>
493
- <div style="font-size: 12px; color: var(--text-muted);">Render Engine</div>
494
- </div>
495
- <div style="text-align: center;">
496
- <div style="font-size: 24px; color: #fff;">98%</div>
497
- <div style="font-size: 12px; color: var(--text-muted);">Queue Health</div>
498
- </div>
499
- </div>
500
-
501
- <h3>Current Stack</h3>
502
- <div>
503
- <span class="tech-badge">React</span>
504
- <span class="tech-badge">Python</span>
505
- <span class="tech-badge">FFmpeg</span>
506
- <span class="tech-badge">ElevenLabs</span>
507
- <span class="tech-badge">Supabase</span>
508
- </div>
509
-
510
- <h3>Recent Jobs</h3>
511
- <ul style="list-style: none;">
512
- <li style="padding: 10px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between;">
513
- <span>Topic: "Crypto Trading"</span>
514
- <span style="color: var(--accent-primary)">Completed</span>
515
- </li>
516
- <li style="padding: 10px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between;">
517
- <span>Topic: "Fitness Tips"</span>
518
- <span style="color: var(--accent-primary)">Completed</span>
519
- </li>
520
- </ul>
521
  </div>
522
- </div>
523
- </div>
 
 
 
 
 
 
 
524
 
525
- <!-- Architecture Modal -->
526
- <div class="modal-overlay" id="archModal">
527
- <div class="modal-content">
528
- <div class="close-modal" onclick="closeArchitecture()">
529
- <i class="fas fa-times"></i>
530
  </div>
531
- <h1 style="color: var(--text-main); margin-bottom: 20px;">SaaS Architecture Blueprint</h1>
532
 
533
- <div class="arch-content">
534
- <p><strong>Target Product:</strong> ReelsAI.pro (Vertical Video Automation)</p>
535
-
536
- <h3>1. Complete Product Architecture</h3>
537
- <ul>
538
- <li><strong>Frontend:</strong> Next.js (React) for SEO and performance. Tailwind CSS for styling.</li>
539
- <li><strong>Backend:</strong> Python (FastAPI) for AI orchestration. Node.js for user management.</li>
540
- <li><strong>Storage:</strong> AWS S3 for video assets and final MP4s.</li>
541
- <li><strong>Database:</strong> PostgreSQL (Supabase) for user data and project metadata.</li>
542
- <li><strong>Queue System:</strong> Redis + Celery to handle video rendering tasks asynchronously.</li>
543
- </ul>
544
-
545
- <h3>2. Recommended Tech Stack (MVP)</h3>
546
- <ul>
547
- <li><strong>Frontend:</strong> React + Vite (Fastest setup).</li>
548
- <li><strong>Backend:</strong> FastAPI (Python) - excellent for calling AI libraries.</li>
549
- <li><strong>AI APIs:</strong> OpenAI (GPT-4) for Script, ElevenLabs for Voice, Stability AI for Images.</li>
550
- <li><strong>Rendering:</strong> Remotion (Serverless FFmpeg wrapper) or custom FFmpeg worker.</li>
551
- </ul>
552
-
553
- <h3>3. Backend Workflow</h3>
554
- <ul>
555
- <li><strong>Script Generation:</strong> POST /generate-script -> GPT-4 Prompt: "Create a 30s hook, body, CTA script."</li>
556
- <li><strong>Voice Generation:</strong> POST /generate-voice -> ElevenLabs API (Text to Speech). Returns audio URL.</li>
557
- <li><strong>Caption Timing:</strong> Use ElevenLabs timestamps or Python `librosa` to detect phonemes. Map text to timecodes.</li>
558
- <li><strong>Video Composition:</strong> Python script builds JSON for Remotion/FFmpeg. Layers: Background Image -> Audio -> Text Overlay.</li>
559
- </ul>
560
-
561
- <h3>4. FFmpeg / Remotion Rendering</h3>
562
- <ul>
563
- <li><strong>Remotion:</strong> Sends a JSON payload describing the video layers. Remotion spins up a container, runs FFmpeg, and returns the MP4 URL.</li>
564
- <li><strong>Raw FFmpeg:</strong> `ffmpeg -i bg.jpg -i audio.mp3 -vf "drawtext=..." -c:v libx264 output.mp4`. Complex but free.</li>
565
- </ul>
566
-
567
- <h3>5. Database Schema</h3>
568
- <ul>
569
- <li><strong>Users:</strong> id, email, stripe_sub_status, credits.</li>
570
- <li><strong>Projects:</strong> id, user_id, topic, script_text, voice_url, status (processing/done).</li>
571
- <li><strong>Videos:</strong> id, project_id, s3_url, duration, resolution.</li>
572
- </ul>
573
-
574
- <h3>6. Scaling to 10,000 Users</h3>
575
- <ul>
576
- <li><strong>Concurrency:</strong> Use a distributed queue (Kafka or Redis) to manage rendering jobs.</li>
577
- <li><strong>GPU Workers:</strong> Spin up GPU instances (AWS g4dn) only when jobs are in the queue. Scale down when idle.</li>
578
- <li><strong>CDN:</strong> Serve generated videos via CloudFront to reduce latency.</li>
579
- </ul>
580
-
581
- <h3>7. Monetization Strategy</h3>
582
- <ul>
583
- <li><strong>Freemium:</strong> 3 free videos/month (watermarked).</li>
584
- <li><strong>Pro ($29/mo):</strong> 50 videos, no watermark, HD export, custom branding.</li>
585
- <li><strong>Agency ($99/mo):</strong> Unlimited, API access, team seats.</li>
586
- </ul>
587
-
588
- <h3>8. MVP Plan (2-4 Weeks)</h3>
589
- <ul>
590
- <li><strong>Week 1:</strong> Setup Next.js + Supabase Auth. Build basic form.</li>
591
- <li><strong>Week 2:</strong> Integrate OpenAI & ElevenLabs APIs. Create "Script to Audio" pipeline.</li>
592
- <li><strong>Week 3:</strong> Build FFmpeg composition logic (static image + audio + text overlay).</li>
593
- <li><strong>Week 4:</strong> Deploy to Vercel + AWS. Launch landing page.</li>
594
- </ul>
595
  </div>
596
- </div>
597
- </div>
598
-
599
- <script>
600
- // --- Logic for Simulation ---
601
 
602
- function switchView(viewName) {
603
- // Simple view toggler logic if we had multiple pages
604
- console.log("Switching to " + viewName);
605
- }
606
 
607
- function openArchitecture() {
608
- document.getElementById('archModal').style.display = 'flex';
609
- }
 
610
 
611
- function closeArchitecture() {
612
- document.getElementById('archModal').style.display = 'none';
613
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
614
 
615
- function startGeneration() {
616
- const topic = document.getElementById('topicInput').value;
617
- if(!topic) {
618
- alert("Please enter a topic!");
619
- return;
620
- }
621
-
622
- // UI Reset
623
- document.getElementById('progressUI').style.display = 'block';
624
- document.getElementById('progressBar').style.width = '0%';
625
- document.getElementById('statusText').innerText = "Connecting to AI...";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
626
 
627
- // Reset Steps
628
- for(let i=1; i<=4; i++) {
629
- document.getElementById('step'+i).classList.remove('completed');
630
- }
631
-
632
- runSimulation();
633
- }
634
-
635
- function runSimulation() {
636
- let progress = 0;
637
- const bar = document.getElementById('progressBar');
638
- const status = document.getElementById('statusText');
639
- const captionPreview = document.getElementById('captionPreview');
640
-
641
- // Step 1: Script
642
- setTimeout(() => {
643
- progress = 25;
644
- bar.style.width = '25%';
645
- status.innerText = "Generating Script (GPT-4)...";
646
- document.getElementById('step1').classList.add('completed');
647
- captionPreview.innerText = "Did you know...";
648
- }, 1000);
649
-
650
- // Step 2: Voice
651
- setTimeout(() => {
652
- progress = 50;
653
- bar.style.width = '50%';
654
- status.innerText = "Synthesizing Voice (ElevenLabs)...";
655
- document.getElementById('step2').classList.add('completed');
656
- captionPreview.innerText = "The secret to wealth is...";
657
- }, 2500);
658
-
659
- // Step 3: Captions
660
- setTimeout(() => {
661
- progress = 75;
662
- bar.style.width = '75%';
663
- status.innerText = "Syncing Captions & Timing...";
664
- document.getElementById('step3').classList.add('completed');
665
- captionPreview.innerText = "Start today!";
666
- }, 4000);
667
-
668
- // Step 4: Render
669
- setTimeout(() => {
670
- progress = 100;
671
- bar.style.width = '100%';
672
- status.innerText = "Rendering Final MP4 (FFmpeg)...";
673
- document.getElementById('step4').classList.add('completed');
674
- captionPreview.innerText = "Video Ready";
675
- captionPreview.style.background = "var(--accent-primary)";
676
- }, 5500);
677
- }
678
 
679
- function downloadMock() {
680
- alert("This would trigger a download of the generated MP4 from S3!");
681
- }
682
 
683
- </script>
684
  </body>
 
685
  </html>
 
1
  <!DOCTYPE html>
2
  <html lang="en">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
 
4
+ <head>
5
+ <meta charset="UTF-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title>ReelsAI.pro - Viral Script Generator</title>
8
+ <!-- FontAwesome for Icons -->
9
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
10
+ <!-- Google Fonts -->
11
+ <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700;900&display=swap" rel="stylesheet">
12
+
13
+ <style>
14
+ :root {
15
+ --bg-dark: #0f1115;
16
+ --bg-panel: #161b22;
17
+ --bg-card: #1e252b;
18
+ --accent-primary: #7c4dff;
19
+ --accent-secondary: #ff4081;
20
+ --accent-glow: #7c4dff;
21
+ --text-main: #ffffff;
22
+ --text-muted: #94a3b8;
23
+ --border: #2d3748;
24
+ --glass: rgba(22, 27, 34, 0.7);
25
+ --success: #00b894;
26
+ }
27
+
28
+ * {
29
+ box-sizing: box-box;
30
+ margin: 0;
31
+ padding: 0;
32
+ font-family: 'Inter', sans-serif;
33
+ }
34
+
35
+ body {
36
+ background-color: var(--bg-dark);
37
+ color: var(--text-main);
38
+ height: 100vh;
39
+ display: flex;
40
+ overflow: hidden;
41
+ }
42
+
43
+ /* Sidebar Navigation */
44
+ .sidebar {
45
+ width: 260px;
46
+ background: var(--bg-panel);
47
+ border-right: 1px solid var(--border);
48
+ display: flex;
49
+ flex-direction: column;
50
+ padding: 20px;
51
+ transition: all 0.3s ease;
52
+ z-index: 10;
53
+ }
54
+
55
+ .brand {
56
+ font-size: 24px;
57
+ font-weight: 800;
58
+ color: var(--text-main);
59
+ margin-bottom: 40px;
60
+ display: flex;
61
+ align-items: center;
62
+ gap: 10px;
63
+ letter-spacing: -0.5px;
64
+ }
65
+
66
+ .brand i {
67
+ color: var(--accent-primary);
68
+ font-size: 28px;
69
+ }
70
+
71
+ .nav-item {
72
+ padding: 12px 16px;
73
+ margin-bottom: 8px;
74
+ border-radius: 8px;
75
+ cursor: pointer;
76
+ color: var(--text-muted);
77
+ transition: 0.2s;
78
+ display: flex;
79
+ align-items: center;
80
+ gap: 12px;
81
+ font-weight: 500;
82
+ border-left: 3px solid transparent;
83
+ }
84
+
85
+ .nav-item:hover,
86
+ .nav-item.active {
87
+ background: rgba(124, 77, 255, 0.05);
88
+ color: var(--text-main);
89
+ border-left: 3px solid var(--accent-primary);
90
+ }
91
+
92
+ .nav-item i {
93
+ width: 20px;
94
+ text-align: center;
95
+ }
96
+
97
+ /* Main Content Area */
98
+ .main-content {
99
+ flex: 1;
100
+ display: flex;
101
+ flex-direction: column;
102
+ overflow: hidden;
103
+ position: relative;
104
+ }
105
+
106
+ /* Top Bar */
107
+ .top-bar {
108
+ height: 60px;
109
+ border-bottom: 1px solid var(--border);
110
+ display: flex;
111
+ align-items: center;
112
+ justify-content: space-between;
113
+ padding: 0 30px;
114
+ background: var(--bg-panel);
115
+ box-shadow: 0 4px 12px rgba(0,0,0,0.05);
116
+ }
117
+
118
+ .header-title {
119
+ font-size: 18px;
120
+ font-weight: 600;
121
+ display: flex;
122
+ align-items: center;
123
+ gap: 10px;
124
+ }
125
+
126
+ .badge {
127
+ background: var(--accent-primary);
128
+ color: white;
129
+ font-size: 10px;
130
+ padding: 2px 6px;
131
+ border-radius: 4px;
132
+ text-transform: uppercase;
133
+ font-weight: 700;
134
+ }
135
+
136
+ .user-profile {
137
+ display: flex;
138
+ align-items: center;
139
+ gap: 10px;
140
+ cursor: pointer;
141
+ }
142
+
143
+ .avatar {
144
+ width: 36px;
145
+ height: 36px;
146
+ background: var(--accent-secondary);
147
+ border-radius: 50%;
148
+ display: flex;
149
+ align-items: center;
150
+ justify-content: center;
151
+ font-weight: bold;
152
+ font-size: 14px;
153
+ box-shadow: 0 0 10px rgba(255, 64, 129, 0.4);
154
+ }
155
+
156
+ /* Dashboard Grid */
157
+ .dashboard-container {
158
+ padding: 30px;
159
+ overflow-y: auto;
160
+ display: grid;
161
+ grid-template-columns: 1fr 1fr;
162
+ gap: 20px;
163
+ height: 100%;
164
+ }
165
+
166
+ /* Generator Panel */
167
+ .generator-panel {
168
+ background: var(--bg-panel);
169
+ border: 1px solid var(--border);
170
+ border-radius: 16px;
171
+ padding: 30px;
172
+ display: flex;
173
+ flex-direction: column;
174
+ gap: 25px;
175
+ box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
176
+ position: relative;
177
+ overflow: hidden;
178
+ }
179
+
180
+ .input-group {
181
+ display: flex;
182
+ flex-direction: column;
183
+ gap: 10px;
184
+ }
185
+
186
+ .input-group label {
187
+ font-size: 14px;
188
+ color: var(--text-muted);
189
+ font-weight: 600;
190
+ display: flex;
191
+ justify-content: space-between;
192
+ }
193
+
194
+ .topic-input {
195
+ background: var(--bg-dark);
196
+ border: 1px solid var(--border);
197
+ padding: 16px;
198
+ color: var(--text-main);
199
+ border-radius: 12px;
200
+ font-size: 16px;
201
+ outline: none;
202
+ transition: 0.2s;
203
+ font-weight: 500;
204
+ }
205
+
206
+ .topic-input:focus {
207
+ border-color: var(--accent-primary);
208
+ box-shadow: 0 0 0 2px rgba(124, 77, 255, 0.1);
209
+ }
210
+
211
+ .generate-btn {
212
+ background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
213
+ color: white;
214
+ border: none;
215
+ padding: 18px;
216
+ border-radius: 12px;
217
+ font-weight: 700;
218
+ cursor: pointer;
219
+ font-size: 16px;
220
+ transition: transform 0.2s, box-shadow 0.2s;
221
+ display: flex;
222
+ justify-content: center;
223
+ align-items: center;
224
+ gap: 10px;
225
+ text-transform: uppercase;
226
+ letter-spacing: 0.5px;
227
+ }
228
+
229
+ .generate-btn:hover {
230
+ transform: translateY(-2px);
231
+ box-shadow: 0 10px 20px -5px rgba(124, 77, 255, 0.4);
232
+ }
233
+
234
+ /* Script Output Area */
235
+ .script-output {
236
+ background: var(--bg-dark);
237
+ border: 1px solid var(--border);
238
+ border-radius: 12px;
239
+ padding: 20px;
240
+ display: none; /* Hidden initially */
241
+ animation: fadeIn 0.5s ease;
242
+ }
243
+
244
+ .script-header {
245
+ display: flex;
246
+ justify-content: space-between;
247
+ margin-bottom: 15px;
248
+ border-bottom: 1px solid var(--border);
249
+ padding-bottom: 10px;
250
+ }
251
+
252
+ .script-section {
253
+ margin-bottom: 15px;
254
+ border-left: 2px solid var(--accent-primary);
255
+ padding-left: 10px;
256
+ }
257
+
258
+ .script-section h4 {
259
+ color: var(--accent-primary);
260
+ font-size: 12px;
261
+ text-transform: uppercase;
262
+ margin-bottom: 5px;
263
+ font-weight: 700;
264
+ }
265
+
266
+ .script-text {
267
+ font-size: 15px;
268
+ line-height: 1.5;
269
+ color: var(--text-main);
270
+ }
271
+
272
+ .script-text strong {
273
+ color: var(--accent-secondary);
274
+ font-weight: 700;
275
+ }
276
+
277
+ /* Architecture Documentation Panel */
278
+ .arch-panel {
279
+ background: var(--bg-panel);
280
+ border: 1px solid var(--border);
281
+ border-radius: 16px;
282
+ padding: 30px;
283
+ overflow-y: auto;
284
+ max-height: 80vh;
285
+ display: flex;
286
+ flex-direction: column;
287
+ }
288
+
289
+ .arch-content h2 {
290
+ margin-bottom: 15px;
291
+ color: var(--accent-primary);
292
+ font-size: 20px;
293
+ }
294
+
295
+ .arch-content h3 {
296
+ margin-top: 20px;
297
+ margin-bottom: 10px;
298
+ color: var(--text-main);
299
+ font-size: 16px;
300
+ border-left: 3px solid var(--accent-secondary);
301
+ padding-left: 10px;
302
+ }
303
+
304
+ .arch-content p,
305
+ .arch-content li {
306
+ color: var(--text-muted);
307
+ font-size: 14px;
308
+ line-height: 1.6;
309
+ margin-bottom: 10px;
310
+ }
311
+
312
+ .tech-badge {
313
+ display: inline-block;
314
+ background: rgba(124, 77, 255, 0.2);
315
+ padding: 4px 8px;
316
+ border-radius: 4px;
317
+ font-size: 12px;
318
+ color: #fff;
319
+ margin-right: 5px;
320
+ margin-bottom: 5px;
321
+ }
322
+
323
+ /* Video Preview Simulation */
324
+ .preview-area {
325
+ width: 100%;
326
+ height: 400px;
327
+ background: #000;
328
+ border-radius: 12px;
329
+ position: relative;
330
+ overflow: hidden;
331
+ margin-top: 20px;
332
+ display: flex;
333
+ align-items: center;
334
+ justify-content: center;
335
+ border: 1px solid var(--border);
336
+ background-image: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('https://images.unsplash.com/photo-1611162617474-5b21e879e113?q=80&w=1000&auto=format&fit=crop');
337
+ background-size: cover;
338
+ }
339
+
340
+ .video-placeholder {
341
+ width: 100%;
342
+ height: 100%;
343
+ display: flex;
344
+ flex-direction: column;
345
+ justify-content: center;
346
+ align-items: center;
347
+ color: #fff;
348
+ text-align: center;
349
+ padding: 20px;
350
+ }
351
+
352
+ .overlay-text {
353
+ background: rgba(0, 0, 0, 0.6);
354
+ padding: 10px 20px;
355
+ border-radius: 8px;
356
+ color: #fff;
357
+ margin-top: 10px;
358
+ font-weight: 700;
359
+ font-size: 18px;
360
+ border: 1px solid rgba(255,255,255,0.2);
361
+ animation: pulse 2s infinite;
362
+ max-width: 80%;
363
+ }
364
+
365
+ /* Progress Bar */
366
+ .progress-container {
367
+ width: 100%;
368
+ background: #2d3748;
369
+ height: 8px;
370
+ border-radius: 4px;
371
+ margin-top: 10px;
372
+ overflow: hidden;
373
+ display: none;
374
+ position: relative;
375
+ }
376
+
377
+ .progress-bar {
378
+ height: 100%;
379
+ width: 0%;
380
+ background: var(--accent-secondary);
381
+ transition: width 0.5s ease;
382
+ box-shadow: 0 0 10px var(--accent-secondary);
383
+ }
384
+
385
+ .steps-grid {
386
+ display: grid;
387
+ grid-template-columns: 1fr 1fr;
388
+ gap: 10px;
389
+ margin-top: 20px;
390
+ }
391
+
392
+ .step-card {
393
+ background: var(--bg-dark);
394
+ padding: 15px;
395
+ border-radius: 8px;
396
+ font-size: 13px;
397
+ color: var(--text-muted);
398
+ border: 1px solid var(--border);
399
+ opacity: 0.5;
400
+ transition: 0.3s;
401
+ display: flex;
402
+ align-items: center;
403
+ gap: 10px;
404
+ }
405
+
406
+ .step-card.completed {
407
+ opacity: 1;
408
+ border-color: var(--accent-primary);
409
+ color: var(--text-main);
410
+ background: rgba(124, 77, 255, 0.05);
411
+ }
412
+
413
+ .step-card i {
414
+ color: var(--accent-primary);
415
+ }
416
+
417
+ /* Modal for Architecture View */
418
+ .modal-overlay {
419
+ position: fixed;
420
+ top: 0;
421
+ left: 0;
422
+ width: 100%;
423
+ height: 100%;
424
+ background: rgba(0, 0, 0, 0.9);
425
+ z-index: 1000;
426
+ display: none;
427
+ justify-content: center;
428
+ align-items: center;
429
+ opacity: 0;
430
+ transition: opacity 0.3s ease;
431
+ }
432
+
433
+ .modal-content {
434
+ background: var(--bg-panel);
435
+ width: 800px;
436
+ max-width: 90%;
437
+ max-height: 90%;
438
+ overflow-y: auto;
439
+ padding: 40px;
440
+ border-radius: 16px;
441
+ border: 1px solid var(--border);
442
+ position: relative;
443
+ box-shadow: 0 20px 50px rgba(0,0,0,0.5);
444
+ }
445
+
446
+ .close-modal {
447
+ position: absolute;
448
+ top: 20px;
449
+ right: 20px;
450
+ cursor: pointer;
451
+ font-size: 20px;
452
+ color: var(--text-muted);
453
+ background: var(--bg-dark);
454
+ width: 40px;
455
+ height: 40px;
456
+ border-radius: 8px;
457
+ display: flex;
458
+ align-items: center;
459
+ justify-content: center;
460
+ transition: 0.2s;
461
+ }
462
+
463
+ .close-modal:hover {
464
+ color: var(--text-main);
465
+ background: var(--border);
466
+ }
467
+
468
+ /* Animations */
469
+ @keyframes pulse {
470
+ 0% { opacity: 0.8; transform: scale(1); }
471
+ 50% { opacity: 1; transform: scale(1.02); }
472
+ 100% { opacity: 0.8; transform: scale(1); }
473
+ }
474
+
475
+ @keyframes fadeIn {
476
+ from { opacity: 0; transform: translateY(10px); }
477
+ to { opacity: 1; transform: translateY(0); }
478
+ }
479
+
480
+ /* Responsive */
481
+ @media (max-width: 900px) {
482
+ .dashboard-container {
483
+ grid-template-columns: 1fr;
484
+ }
485
+
486
+ .sidebar {
487
+ width: 70px;
488
+ }
489
+
490
+ .nav-item span {
491
+ display: none;
492
+ }
493
+
494
+ .brand span {
495
+ display: none;
496
+ }
497
+ }
498
+ </style>
499
+ </head>
500
 
501
+ <body>
 
 
 
 
 
 
 
 
 
 
502
 
503
+ <!-- Sidebar -->
504
+ <div class="sidebar">
505
+ <div class="brand">
506
+ <i class="fas fa-bolt"></i>
507
+ <span>ReelsAI</span>
508
+ </div>
509
+ <div class="nav-item active" onclick="switchView('dashboard')">
510
+ <i class="fas fa-video"></i>
511
+ <span>Generator</span>
512
+ </div>
513
+ <div class="nav-item" onclick="openArchitecture()">
514
+ <i class="fas fa-code"></i>
515
+ <span>Architecture</span>
516
+ </div>
517
+ <div class="nav-item">
518
+ <i class="fas fa-chart-line"></i>
519
+ <span>Analytics</span>
520
+ </div>
521
+ <div class="nav-item">
522
+ <i class="fas fa-cog"></i>
523
+ <span>Settings</span>
524
+ </div>
525
 
526
+ <div style="margin-top: auto; padding-top: 20px; border-top: 1px solid var(--border);">
527
+ <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank"
528
+ style="color: var(--text-muted); font-size: 12px; text-decoration: none; display: flex; align-items: center; gap: 5px; transition: 0.2s;">
529
+ <i class="fas fa-external-link-alt"></i> Built with AnyCoder
530
+ </a>
531
+ </div>
532
+ </div>
533
+
534
+ <!-- Main Content -->
535
+ <div class="main-content">
536
+ <!-- Top Bar -->
537
+ <div class="top-bar">
538
+ <div class="header-title">
539
+ Dashboard <span class="badge">V2.0</span>
540
+ </div>
541
+ <div class="user-profile">
542
+ <div class="avatar">JD</div>
543
+ <span style="font-size: 14px;">John Doe</span>
544
+ </div>
545
+ </div>
546
 
547
+ <!-- Dashboard View -->
548
+ <div class="dashboard-container" id="dashboard-view">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
549
 
550
+ <!-- Generator Panel -->
551
+ <div class="generator-panel">
552
+ <h2 style="color: var(--text-main); font-weight: 700;">Create Viral Script</h2>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
553
 
554
+ <div class="input-group">
555
+ <label>Video Topic</label>
556
+ <input type="text" class="topic-input" id="topicInput" placeholder="e.g., Crypto Trading, Fitness Tips">
 
557
  </div>
 
558
 
559
+ <div class="input-group">
560
+ <label>Target Audience</label>
561
+ <select class="topic-input" style="cursor: pointer;">
562
+ <option>Gen Z / TikTok</option>
563
+ <option>Millennials / Instagram</option>
564
+ <option>Professionals / LinkedIn</option>
565
+ </select>
 
 
566
  </div>
567
 
568
+ <button class="generate-btn" onclick="startGeneration()">
569
+ <i class="fas fa-magic"></i> Generate Viral Script
570
+ </button>
571
+
572
+ <!-- Progress UI -->
573
+ <div id="progressUI" style="display: none;">
574
+ <div class="progress-container" style="display: block;">
575
+ <div class="progress-bar" id="progressBar"></div>
576
+ </div>
577
+ <div style="margin-top: 15px; font-size: 13px; color: var(--text-muted);">
578
+ Status: <span id="statusText" style="color: var(--accent-primary)">Initializing...</span>
579
+ </div>
580
+
581
+ <div class="steps-grid">
582
+ <div class="step-card" id="step1">
583
+ <i class="fas fa-fire"></i>
584
+ <span>1. Emotional Hook</span>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
585
  </div>
586
+ <div class="step-card" id="step2">
587
+ <i class="fas fa-gem"></i>
588
+ <span>2. Value Content</span>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
589
  </div>
590
+ <div class="step-card" id="step3">
591
+ <i class="fas fa-bullhorn"></i>
592
+ <span>3. Call to Action</span>
593
+ </div>
594
+ <div class="step-card" id="step4">
595
+ <i class="fas fa-check-circle"></i>
596
+ <span>4. Final Polish</span>
597
+ </div>
598
+ </div>
599
 
600
+ <!-- Script Output Area (Replaced Video Placeholder during generation) -->
601
+ <div class="script-output" id="scriptOutput">
602
+ <div class="script-header">
603
+ <span style="font-weight: 700; color: var(--text-main)">Generated Script</span>
604
+ <span style="font-size: 12px; color: var(--text-muted)">Word count: <span id="wordCount">0</span></span>
605
  </div>
 
606
 
607
+ <div class="script-section">
608
+ <h4><i class="fas fa-bolt"></i> The Hook (0-5s)</h4>
609
+ <div class="script-text" id="hookText"></div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
610
  </div>
 
 
 
 
 
611
 
612
+ <div class="script-section">
613
+ <h4><i class="fas fa-star"></i> The Value (5-20s)</h4>
614
+ <div class="script-text" id="bodyText"></div>
615
+ </div>
616
 
617
+ <div class="script-section">
618
+ <h4><i class="fas fa-arrow-right"></i> The CTA (20-30s)</h4>
619
+ <div class="script-text" id="ctaText"></div>
620
+ </div>
621
 
622
+ <button class="generate-btn" style="background: transparent; border: 1px solid var(--border); margin-top: 10px; font-size: 14px; width: 100%;" onclick="downloadMock()">
623
+ <i class="fas fa-copy"></i> Copy to Clipboard
624
+ </button>
625
+ </div>
626
+
627
+ <!-- Video Preview Simulation (Visible when idle) -->
628
+ <div class="preview-area" id="previewArea">
629
+ <div class="video-placeholder">
630
+ <i class="fas fa-play" style="font-size: 30px; margin-bottom: 10px; opacity: 0.5;"></i>
631
+ <div>Preview Mode</div>
632
+ <div class="overlay-text" id="captionPreview">Ready to Generate...</div>
633
+ </div>
634
+ </div>
635
+ </div>
636
+ </div>
637
+
638
+ <!-- Quick Info Panel -->
639
+ <div class="arch-panel">
640
+ <h2>System Status</h2>
641
+ <div style="display: flex; gap: 20px; margin-bottom: 20px;">
642
+ <div style="text-align: center;">
643
+ <div style="font-size: 24px; color: var(--accent-primary);">Active</div>
644
+ <div style="font-size: 12px; color: var(--text-muted);">GPT-4 Engine</div>
645
+ </div>
646
+ <div style="text-align: center;">
647
+ <div style="font-size: 24px; color: var(--accent-secondary);">Ready</div>
648
+ <div style="font-size: 12px; color: var(--text-muted);">Trend Analyzer</div>
649
+ </div>
650
+ <div style="text-align: center;">
651
+ <div style="font-size: 24px; color: #fff;">98%</div>
652
+ <div style="font-size: 12px; color: var(--text-muted);">Virality Score</div>
653
+ </div>
654
+ </div>
655
 
656
+ <h3>Recent Scripts</h3>
657
+ <ul style="list-style: none;">
658
+ <li style="padding: 12px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center;">
659
+ <span>Topic: "Crypto Trading"</span>
660
+ <span style="color: var(--success); font-size: 12px;"><i class="fas fa-check"></i> Generated</span>
661
+ </li>
662
+ <li style="padding: 12px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center;">
663
+ <span>Topic: "Fitness Tips"</span>
664
+ <span style="color: var(--success); font-size: 12px;"><i class="fas fa-check"></i> Generated</span>
665
+ </li>
666
+ <li style="padding: 12px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center;">
667
+ <span>Topic: "Web Dev"</span>
668
+ <span style="color: var(--success); font-size: 12px;"><i class="fas fa-check"></i> Generated</span>
669
+ </li>
670
+ </ul>
671
+ </div>
672
+ </div>
673
+ </div>
674
+
675
+ <!-- Architecture Modal -->
676
+ <div class="modal-overlay" id="archModal">
677
+ <div class="modal-content">
678
+ <div class="close-modal" onclick="closeArchitecture()">
679
+ <i class="fas fa-times"></i>
680
+ </div>
681
+ <h1 style="color: var(--text-main); margin-bottom: 20px;">SaaS Architecture Blueprint</h1>
682
+
683
+ <div class="arch-content">
684
+ <p><strong>Target Product:</strong> ReelsAI.pro (Vertical Video Automation)</p>
685
+
686
+ <h3>1. Complete Product Architecture</h3>
687
+ <ul>
688
+ <li><strong>Frontend:</strong> Next.js (React) for SEO and performance. Tailwind CSS for styling.</li>
689
+ <li><strong>Backend:</strong> Python (FastAPI) for AI orchestration. Node.js for user management.</li>
690
+ <li><strong>Storage:</strong> AWS S3 for video assets and final MP4s.</li>
691
+ <li><strong>Database:</strong> PostgreSQL (Supabase) for user data and project metadata.</li>
692
+ <li><strong>Queue System:</strong> Redis + Celery to handle video rendering tasks asynchronously.</li>
693
+ </ul>
694
+
695
+ <h3>2. Recommended Tech Stack (MVP)</h3>
696
+ <ul>
697
+ <li><strong>Frontend:</strong> React + Vite (Fastest setup).</li>
698
+ <li><strong>Backend:</strong> FastAPI (Python) - excellent for calling AI libraries.</li>
699
+ <li><strong>AI APIs:</strong> OpenAI (GPT-4) for Script, ElevenLabs for Voice, Stability AI for Images.</li>
700
+ <li><strong>Rendering:</strong> Remotion (Serverless FFmpeg wrapper) or custom FFmpeg worker.</li>
701
+ </ul>
702
+
703
+ <h3>3. Backend Workflow</h3>
704
+ <ul>
705
+ <li><strong>Script Generation:</strong> POST /generate-script -> GPT-4 Prompt: "Create a 30s hook, body, CTA script."</li>
706
+ <li><strong>Voice Generation:</strong> POST /generate-voice -> ElevenLabs API (Text to Speech). Returns audio URL.</li>
707
+ <li><strong>Caption Timing:</strong> Use ElevenLabs timestamps or Python `librosa` to detect phonemes. Map text to timecodes.</li>
708
+ <li><strong>Video Composition:</strong> Python script builds JSON for Remotion/FFmpeg. Layers: Background Image -> Audio -> Text Overlay.</li>
709
+ </ul>
710
+
711
+ <h3>4. FFmpeg / Remotion Rendering</h3>
712
+ <ul>
713
+ <li><strong>Remotion:</strong> Sends a JSON payload describing the video layers. Remotion spins up a container, runs FFmpeg, and returns the MP4 URL.</li>
714
+ <li><strong>Raw FFmpeg:</strong> `ffmpeg -i bg.jpg -i audio.mp3 -vf "drawtext=..." -c:v libx264 output.mp4`. Complex but free.</li>
715
+ </ul>
716
+
717
+ <h3>5. Database Schema</h3>
718
+ <ul>
719
+ <li><strong>Users:</strong> id, email, stripe_sub_status, credits.</li>
720
+ <li><strong>Projects:</strong> id, user_id, topic, script_text, voice_url, status (processing/done).</li>
721
+ <li><strong>Videos:</strong> id, project_id, s3_url, duration, resolution.</li>
722
+ </ul>
723
+
724
+ <h3>6. Scaling to 10,000 Users</h3>
725
+ <ul>
726
+ <li><strong>Concurrency:</strong> Use a distributed queue (Kafka or Redis) to manage rendering jobs.</li>
727
+ <li><strong>GPU Workers:</strong> Spin up GPU instances (AWS g4dn) only when jobs are in the queue. Scale down when idle.</li>
728
+ <li><strong>CDN:</strong> Serve generated videos via CloudFront to reduce latency.</li>
729
+ </ul>
730
+
731
+ <h3>7. Monetization Strategy</h3>
732
+ <ul>
733
+ <li><strong>Freemium:</strong> 3 free videos/month (watermarked).</li>
734
+ <li><strong>Pro ($29/mo):</strong> 50 videos, no watermark, HD export, custom branding.</li>
735
+ <li><strong>Agency ($99/mo):</strong> Unlimited, API access, team seats.</li>
736
+ </ul>
737
+
738
+ <h3>8. MVP Plan (2-4 Weeks)</h3>
739
+ <ul>
740
+ <li><strong>Week 1:</strong> Setup Next.js + Supabase Auth. Build basic form.</li>
741
+ <li><strong>Week 2:</strong> Integrate OpenAI & ElevenLabs APIs. Create "Script to Audio" pipeline.</li>
742
+ <li><strong>Week 3:</strong> Build FFmpeg composition logic (static image + audio + text overlay).</li>
743
+ <li><strong>Week 4:</strong> Deploy to Vercel + AWS. Launch landing page.</li>
744
+ </ul>
745
+ </div>
746
+ </div>
747
+ </div>
748
+
749
+ <script>
750
+ // --- Logic for Simulation ---
751
+
752
+ function switchView(viewName) {
753
+ // Simple view toggler logic if we had multiple pages
754
+ console.log("Switching to " + viewName);
755
+ }
756
+
757
+ function openArchitecture() {
758
+ const modal = document.getElementById('archModal');
759
+ modal.style.display = 'flex';
760
+ modal.style.opacity = '1';
761
+ }
762
+
763
+ function closeArchitecture() {
764
+ const modal = document.getElementById('archModal');
765
+ modal.style.opacity = '0';
766
+ setTimeout(() => {
767
+ modal.style.display = 'none';
768
+ }, 300);
769
+ }
770
+
771
+ function startGeneration() {
772
+ const topic = document.getElementById('topicInput').value;
773
+ if(!topic) {
774
+ alert("Please enter a topic!");
775
+ return;
776
+ }
777
+
778
+ // UI Reset
779
+ document.getElementById('progressUI').style.display = 'block';
780
+ document.getElementById('scriptOutput').style.display = 'none'; // Hide script initially
781
+ document.getElementById('previewArea').style.display = 'flex'; // Show preview
782
+ document.getElementById('progressBar').style.width = '0%';
783
+ document.getElementById('statusText').innerText = "Analyzing Trends...";
784
+
785
+ // Reset Steps
786
+ for(let i=1; i<=4; i++) {
787
+ document.getElementById('step'+i).classList.remove('completed');
788
+ }
789
+
790
+ runSimulation(topic);
791
+ }
792
+
793
+ function runSimulation(topic) {
794
+ let progress = 0;
795
+ const bar = document.getElementById('progressBar');
796
+ const status = document.getElementById('statusText');
797
+ const captionPreview = document.getElementById('captionPreview');
798
+
799
+ // Step 1: Hook Generation
800
+ setTimeout(() => {
801
+ progress = 25;
802
+ bar.style.width = '25%';
803
+ status.innerText = "Generating Emotional Hook...";
804
+ document.getElementById('step1').classList.add('completed');
805
+ captionPreview.innerText = "Creating Hook...";
806
+ }, 800);
807
+
808
+ // Step 2: Value Content
809
+ setTimeout(() => {
810
+ progress = 50;
811
+ bar.style.width = '50%';
812
+ status.innerText = "Drafting Value Content...";
813
+ document.getElementById('step2').classList.add('completed');
814
+ captionPreview.innerText = "Writing Body...";
815
+ }, 2000);
816
+
817
+ // Step 3: CTA
818
+ setTimeout(() => {
819
+ progress = 75;
820
+ bar.style.width = '75%';
821
+ status.innerText = "Optimizing Call to Action...";
822
+ document.getElementById('step3').classList.add('completed');
823
+ captionPreview.innerText = "Finalizing CTA...";
824
+ }, 3500);
825
+
826
+ // Step 4: Final Polish & Display
827
+ setTimeout(() => {
828
+ progress = 100;
829
+ bar.style.width = '100%';
830
+ status.innerText = "Script Ready";
831
+ document.getElementById('step4').classList.add('completed');
832
 
833
+ // Hide preview, show script
834
+ document.getElementById('previewArea').style.display = 'none';
835
+ document.getElementById('scriptOutput').style.display = 'block';
836
+
837
+ generateMockScript(topic);
838
+ }, 5000);
839
+ }
840
+
841
+ function generateMockScript(topic) {
842
+ // Mock data generator based on topic
843
+ const hooks = [
844
+ `Stop scrolling if you want to master ${topic}!`,
845
+ `I bet you didn't know this about ${topic}.`,
846
+ `The biggest mistake you're making in ${topic}.`,
847
+ `3 secrets to ${topic} that changed my life.`
848
+ ];
849
+
850
+ const bodies = [
851
+ `Most people ignore the basics. Focus on consistency over intensity.`,
852
+ `It's not about the tools, it's about the mindset.`,
853
+ `You need to understand the core principle before scaling.`
854
+ ];
855
+
856
+ const ctas = [
857
+ `Follow for more ${topic} tips!`,
858
+ `Comment below if you agree!`,
859
+ `Link in bio for the full guide.`
860
+ ];
861
+
862
+ // Randomly select parts
863
+ const hook = hooks[Math.floor(Math.random() * hooks.length)];
864
+ const body = bodies[Math.floor(Math.random() * bodies.length)];
865
+ const cta = ctas[Math.floor(Math.random() * ctas.length)];
866
+
867
+ // Update UI
868
+ document.getElementById('hookText').innerHTML = `<strong>${hook}</strong>`;
869
+ document.getElementById('bodyText').innerHTML = body;
870
+ document.getElementById('ctaText').innerHTML = `<strong>${cta}</strong>`;
871
+
872
+ // Calculate word count
873
+ const totalText = hook + body + cta;
874
+ const words = totalText.split(' ').length;
875
+ document.getElementById('wordCount').innerText = words;
876
+ }
 
 
 
 
 
 
 
877
 
878
+ function downloadMock() {
879
+ alert("Script copied to clipboard!");
880
+ }
881
 
882
+ </script>
883
  </body>
884
+
885
  </html>