darkvibe314 commited on
Commit
7402ced
·
verified ·
1 Parent(s): c092c2f

Create public/index.html

Browse files
Files changed (1) hide show
  1. public/index.html +126 -0
public/index.html ADDED
@@ -0,0 +1,126 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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>Silent Tech | API Portal</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <style>
9
+ body { background-color: #0f172a; color: #e5e7eb; font-family: ui-sans-serif, system-ui, -apple-system, sans-serif; }
10
+ .glass-panel { background: rgba(30, 41, 59, 0.7); backdrop-filter: blur(10px); border: 1px solid #334155; }
11
+ .glow-text { text-shadow: 0 0 15px rgba(56, 189, 248, 0.5); }
12
+ </style>
13
+ </head>
14
+ <body class="min-h-screen flex flex-col items-center p-6">
15
+
16
+ <!-- HEADER -->
17
+ <header class="w-full max-w-4xl flex justify-between items-center py-6 mb-8 border-b border-slate-700">
18
+ <h1 class="text-3xl font-bold text-sky-400 glow-text">SILENT TECH</h1>
19
+ <span class="px-3 py-1 bg-sky-500/20 text-sky-300 text-sm rounded-full border border-sky-500/30">v1.0.0 Live</span>
20
+ </header>
21
+
22
+ <main class="w-full max-w-4xl grid grid-cols-1 md:grid-cols-2 gap-8">
23
+
24
+ <!-- DOCUMENTATION COLUMN -->
25
+ <section class="flex flex-col gap-6">
26
+ <div class="glass-panel p-6 rounded-2xl">
27
+ <h2 class="text-xl font-semibold text-white mb-2">Arena Generation API</h2>
28
+ <p class="text-sm text-slate-400 mb-6">Bypass Cloudflare and generate media seamlessly through the Silent Tech engine.</p>
29
+
30
+ <div class="mb-4">
31
+ <span class="px-2 py-1 bg-green-500/20 text-green-400 rounded text-xs font-bold mr-2">POST</span>
32
+ <code class="text-sky-300">/api/generate</code>
33
+ </div>
34
+
35
+ <h3 class="text-sm font-semibold text-slate-300 mb-2 mt-6">Request Body (JSON)</h3>
36
+ <pre class="bg-slate-900 p-4 rounded-lg border border-slate-700 text-sm text-sky-200 overflow-x-auto">
37
+ {
38
+ "prompt": "A futuristic car running on water"
39
+ }</pre>
40
+ </div>
41
+ </section>
42
+
43
+ <!-- INTERACTIVE TESTER COLUMN -->
44
+ <section class="flex flex-col gap-6">
45
+ <div class="glass-panel p-6 rounded-2xl">
46
+ <h2 class="text-xl font-semibold text-white mb-4 flex items-center gap-2">
47
+ <svg class="w-5 h-5 text-sky-400" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"></path><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
48
+ Interactive Explorer
49
+ </h2>
50
+
51
+ <label class="block text-sm font-medium text-slate-400 mb-2">Prompt</label>
52
+ <input type="text" id="promptInput" value="A futuristic car running on water" class="w-full bg-slate-900 border border-slate-700 rounded-lg p-3 text-white focus:outline-none focus:border-sky-500 mb-4 transition-colors">
53
+
54
+ <button id="execBtn" onclick="executeApi()" class="w-full bg-sky-500 hover:bg-sky-400 text-slate-900 font-bold py-3 px-4 rounded-lg transition-all shadow-[0_0_15px_rgba(56,189,248,0.3)]">
55
+ Execute Request
56
+ </button>
57
+
58
+ <div id="loader" class="hidden mt-6 text-center text-sky-400 text-sm font-medium animate-pulse">
59
+ [ SILENT ENGINE ] Bypassing Cloudflare... Executing Render...
60
+ </div>
61
+
62
+ <div id="responseBox" class="hidden mt-6">
63
+ <h3 class="text-sm font-semibold text-slate-400 mb-2">Server Response:</h3>
64
+ <pre id="jsonOutput" class="bg-slate-900 p-4 rounded-lg border border-slate-700 text-xs text-green-400 overflow-x-auto whitespace-pre-wrap"></pre>
65
+
66
+ <div id="mediaContainer" class="mt-4 rounded-lg overflow-hidden border border-slate-700 hidden">
67
+ <!-- Media will render here -->
68
+ </div>
69
+ </div>
70
+ </div>
71
+ </section>
72
+ </main>
73
+
74
+ <footer class="mt-12 text-center text-slate-600 text-sm">
75
+ &copy; 2026 Silent Tech API. Powered by advanced web interception.
76
+ </footer>
77
+
78
+ <script>
79
+ async function executeApi() {
80
+ const prompt = document.getElementById('promptInput').value;
81
+ const btn = document.getElementById('execBtn');
82
+ const loader = document.getElementById('loader');
83
+ const responseBox = document.getElementById('responseBox');
84
+ const jsonOutput = document.getElementById('jsonOutput');
85
+ const mediaContainer = document.getElementById('mediaContainer');
86
+
87
+ btn.disabled = true;
88
+ btn.classList.add('opacity-50');
89
+ loader.classList.remove('hidden');
90
+ responseBox.classList.add('hidden');
91
+ mediaContainer.classList.add('hidden');
92
+
93
+ try {
94
+ const start = Date.now();
95
+ const res = await fetch('/api/generate', {
96
+ method: 'POST',
97
+ headers: { 'Content-Type': 'application/json' },
98
+ body: JSON.stringify({ prompt })
99
+ });
100
+
101
+ const data = await res.json();
102
+ const timeTaken = ((Date.now() - start) / 1000).toFixed(1) + 's';
103
+
104
+ jsonOutput.innerHTML = `// Status: ${res.status}\n// Time: ${timeTaken}\n\n` + JSON.stringify(data, null, 2);
105
+ responseBox.classList.remove('hidden');
106
+
107
+ if (data.success && data.url) {
108
+ mediaContainer.classList.remove('hidden');
109
+ if (data.url.endsWith('.mp4')) {
110
+ mediaContainer.innerHTML = `<video controls autoplay loop class="w-full"><source src="${data.url}" type="video/mp4"></video>`;
111
+ } else {
112
+ mediaContainer.innerHTML = `<img src="${data.url}" class="w-full object-cover">`;
113
+ }
114
+ }
115
+ } catch (err) {
116
+ jsonOutput.innerHTML = `// Fatal Error\n\n${err.message}`;
117
+ responseBox.classList.remove('hidden');
118
+ } finally {
119
+ btn.disabled = false;
120
+ btn.classList.remove('opacity-50');
121
+ loader.classList.add('hidden');
122
+ }
123
+ }
124
+ </script>
125
+ </body>
126
+ </html>