saunu commited on
Commit
5f0e4fa
·
verified ·
1 Parent(s): 3a722d6

Make it functional

Browse files
Files changed (3) hide show
  1. api-explorer.html +300 -0
  2. explore.html +291 -0
  3. index.html +134 -24
api-explorer.html ADDED
@@ -0,0 +1,300 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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>FEI-Next - API Explorer</title>
7
+ <link rel="icon" type="image/x-icon" href="/static/favicon.ico">
8
+ <script src="https://cdn.tailwindcss.com"></script>
9
+ <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
10
+ <script src="https://unpkg.com/feather-icons"></script>
11
+ <script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.net.min.js"></script>
12
+ <style>
13
+ .api-endpoint {
14
+ transition: all 0.3s ease;
15
+ cursor: pointer;
16
+ }
17
+ .api-endpoint:hover {
18
+ transform: translateY(-2px);
19
+ box-shadow: 0 8px 16px -8px rgba(74, 144, 226, 0.3);
20
+ }
21
+ .response-area {
22
+ font-family: 'Courier New', monospace;
23
+ background: #1a202c;
24
+ border: 1px solid #2d3748;
25
+ }
26
+ .method-get { border-left: 4px solid #10b981; }
27
+ .method-post { border-left: 4px solid #3b82f6; }
28
+ .method-put { border-left: 4px solid #f59e0b; }
29
+ .method-delete { border-left: 4px solid #ef4444; }
30
+ </style>
31
+ </head>
32
+ <body class="bg-gray-900 text-gray-100 font-sans overflow-x-hidden">
33
+ <div id="vanta-bg" class="fixed inset-0 -z-10 opacity-20"></div>
34
+
35
+ <header class="gradient-mask px-6 py-8">
36
+ <div class="max-w-6xl mx-auto flex flex-col md:flex-row justify-between items-center">
37
+ <div class="flex items-center mb-6 md:mb-0">
38
+ <div class="relative">
39
+ <div class="absolute -inset-4 bg-blue-500 rounded-full opacity-20 blur-md"></div>
40
+ <div class="relative bg-gradient-to-br from-blue-600 to-indigo-800 w-12 h-12 rounded-2xl flex items-center justify-center">
41
+ <i data-feather="code" class="w-6 h-6"></i>
42
+ </div>
43
+ <h1 class="ml-4 text-2xl font-bold bg-clip-text text-transparent bg-gradient-to-r from-blue-400 to-indigo-300">
44
+ API Explorer
45
+ </h1>
46
+ </div>
47
+ <nav class="flex space-x-6">
48
+ <a href="index.html" class="text-gray-400 hover:text-blue-300 transition-colors flex items-center">
49
+ <i data-feather="home" class="w-4 h-4 mr-2"></i>
50
+ Home
51
+ </a>
52
+ <a href="explore.html" class="text-gray-400 hover:text-blue-300 transition-colors flex items-center">
53
+ <i data-feather="compass" class="w-4 h-4 mr-2"></i>
54
+ Explore
55
+ </a>
56
+ </nav>
57
+ </div>
58
+ </header>
59
+
60
+ <main class="max-w-6xl mx-auto px-6 pb-20">
61
+ <div class="grid grid-cols-1 lg:grid-cols-3 gap-8">
62
+ <!-- API Methods -->
63
+ <div class="lg:col-span-2 space-y-6">
64
+ <!-- GET Method -->
65
+ <div class="api-endpoint bg-gray-800/30 backdrop-blur-md rounded-2xl p-6 border border-gray-700/50">
66
+ <div class="flex items-center mb-4">
67
+ <span class="px-3 py-1 rounded-full text-xs font-medium bg-green-900/50 text-green-300 border border-green-700/50 method-get p-4">
68
+ <div class="flex items-center">
69
+ <span class="px-2 py-1 rounded text-xs font-bold text-white bg-green-600 mr-3">
70
+ GET
71
+ </span>
72
+ <code class="text-blue-300">/api/cognitive-data</code>
73
+ </div>
74
+ <p class="text-gray-300 mb-4">Retrieve cognitive patterns and reasoning traces</p>
75
+ <div class="flex space-x-3">
76
+ <button onclick="testGetAPI()" class="px-4 py-2 bg-green-600 hover:bg-green-500 rounded-lg text-white text-sm transition-colors" id="get-button">
77
+ <span class="flex items-center">
78
+ <span>Test Endpoint</span>
79
+ <i data-feather="play" class="w-3 h-3 ml-2"></i>
80
+ </button>
81
+ <button onclick="showDocumentation('get')" class="px-4 py-2 bg-gray-600 hover:bg-gray-500 rounded-lg text-gray-300 text-sm transition-colors">
82
+ Documentation
83
+ </button>
84
+ </div>
85
+ <div class="response-area mt-4 p-4 rounded-lg text-sm hidden" id="get-response">
86
+ <div class="flex justify-between items-center mb-2">
87
+ <span class="text-green-400">✓ Success</span>
88
+ <span class="text-xs text-gray-400">Response will appear here</span>
89
+ </div>
90
+ </div>
91
+ </div>
92
+
93
+ <!-- POST Method -->
94
+ <div class="api-endpoint bg-gray-800/30 backdrop-blur-md rounded-2xl p-6 border border-gray-700/50">
95
+ <div class="flex items-center mb-4">
96
+ <span class="px-2 py-1 rounded text-xs font-bold text-white bg-blue-600 mr-3">
97
+ POST
98
+ </span>
99
+ <code class="text-blue-300">/api/cognitive-analysis</code>
100
+ </div>
101
+ <p class="text-gray-300 mb-4">Submit new cognitive data for analysis</p>
102
+ <div class="flex space-x-3">
103
+ <button onclick="testPostAPI()" class="px-4 py-2 bg-blue-600 hover:bg-blue-500 rounded-lg text-white text-sm transition-colors">
104
+ <span class="flex items-center">
105
+ <span>Test Endpoint</span>
106
+ <i data-feather="play" class="w-3 h-3 ml-2"></i>
107
+ </button>
108
+ <button onclick="showDocumentation('post')" class="px-4 py-2 bg-gray-600 hover:bg-gray-500 rounded-lg text-gray-300 text-sm transition-colors">
109
+ Documentation
110
+ </button>
111
+ </div>
112
+ <div class="response-area mt-4 p-4 rounded-lg text-sm hidden" id="post-response">
113
+ <div class="flex justify-between items-center mb-2">
114
+ <span class="text-blue-400">↗ Submit</span>
115
+ </div>
116
+ </div>
117
+
118
+ <!-- Control Panel -->
119
+ <div class="lg:col-span-1 bg-gray-800/30 backdrop-blur-md rounded-2xl p-6 border border-gray-700/50">
120
+ <h3 class="text-lg font-bold mb-4">API Controls</h3>
121
+ <div class="space-y-4">
122
+ <div>
123
+ <label class="block text-sm text-gray-400 mb-2">Environment</label>
124
+ <select class="w-full bg-gray-700/50 border border-gray-600/50 rounded-lg px-3 py-2 text-sm">
125
+ <option>Development</option>
126
+ <option>Staging</option>
127
+ <option>Production</option>
128
+ </select>
129
+ </div>
130
+ <div>
131
+ <label class="block text-sm text-gray-400 mb-2">Response Format</label>
132
+ <select class="w-full bg-gray-700/50 border border-gray-600/50 rounded-lg px-3 py-2 text-sm">
133
+ <option>JSON</option>
134
+ <option>XML</option>
135
+ <option>YAML</option>
136
+ </select>
137
+ </div>
138
+ <button onclick="clearAllResponses()" class="w-full px-4 py-2 bg-gray-600 hover:bg-gray-500 rounded-lg text-gray-300 text-sm transition-colors">
139
+ Clear All Responses
140
+ </button>
141
+ </div>
142
+ </div>
143
+ </div>
144
+ </div>
145
+ </main>
146
+
147
+ <footer class="border-t border-gray-800 py-8 mt-12">
148
+ <div class="max-w-6xl mx-auto px-6">
149
+ <div class="flex flex-col md:flex-row justify-between items-center">
150
+ <div class="flex items-center mb-4 md:mb-0">
151
+ <i data-feather="activity" class="w-5 h-5 text-blue-400 mr-2"></i>
152
+ <span class="text-sm text-gray-400">FEI-Next API Explorer v1.0</span>
153
+ </div>
154
+ <div class="flex space-x-6">
155
+ <a href="index.html" class="text-gray-400 hover:text-blue-300 transition-colors">
156
+ <i data-feather="home"></i>
157
+ </a>
158
+ <a href="explore.html" class="text-gray-400 hover:text-blue-300 transition-colors">
159
+ <i data-feather="compass"></i>
160
+ </a>
161
+ </div>
162
+ </div>
163
+ </div>
164
+ </footer>
165
+
166
+ <script>
167
+ // Initialize Vanta.js background
168
+ if (typeof VANTA !== 'undefined') {
169
+ VANTA.NET({
170
+ el: "#vanta-bg",
171
+ mouseControls: true,
172
+ touchControls: true,
173
+ gyroControls: false,
174
+ color: 0x3b82f6,
175
+ backgroundColor: 0x111827,
176
+ points: 12,
177
+ maxDistance: 20,
178
+ spacing: 18
179
+ });
180
+ }
181
+
182
+ // Initialize feather icons
183
+ feather.replace();
184
+
185
+ // API testing functions
186
+ window.testGetAPI = async () => {
187
+ const button = document.getElementById('get-button');
188
+ const responseArea = document.getElementById('get-response');
189
+
190
+ // Show loading state
191
+ responseArea.classList.remove('hidden');
192
+ responseArea.innerHTML = `
193
+ <div class="flex justify-between items-center mb-2">
194
+ <span class="text-blue-400">⏳ Loading...</span>
195
+ `;
196
+
197
+ try {
198
+ const response = await fetch('https://jsonplaceholder.typicode.com/posts/1');
199
+ const data = await response.json();
200
+
201
+ responseArea.innerHTML = `
202
+ <div class="flex justify-between items-center mb-2">
203
+ <span class="text-green-400">✓ Success</span>
204
+ <span class="text-xs text-gray-400">Status: ${response.status}</span>
205
+ </div>
206
+ <pre class="text-green-300 overflow-auto">${JSON.stringify(data, null, 2)}</pre>
207
+ `;
208
+ } catch (error) {
209
+ responseArea.innerHTML = `
210
+ <div class="flex justify-between items-center mb-2">
211
+ <span class="text-red-400">✗ Error</span>
212
+ </div>
213
+ <pre class="text-red-300">Request failed: ${error.message}</pre>
214
+ `;
215
+ }
216
+ };
217
+
218
+ window.testPostAPI = async () => {
219
+ const responseArea = document.getElementById('post-response');
220
+
221
+ // Show loading state
222
+ responseArea.classList.remove('hidden');
223
+ responseArea.innerHTML = `
224
+ <div class="flex justify-between items-center mb-2">
225
+ <span class="text-blue-400">⏳ Processing...</span>
226
+ `;
227
+
228
+ try {
229
+ const response = await fetch('https://jsonplaceholder.typicode.com/posts', {
230
+ method: 'POST',
231
+ headers: {
232
+ 'Content-Type': 'application/json'
233
+ },
234
+ body: JSON.stringify({
235
+ title: 'Cognitive Analysis Request',
236
+ body: 'Analyze this thought pattern for reasoning traces',
237
+ userId: 1
238
+ })
239
+ });
240
+ const data = await response.json();
241
+
242
+ responseArea.innerHTML = `
243
+ <div class="flex justify-between items-center mb-2">
244
+ <span class="text-green-400">✓ Success</span>
245
+ <span class="text-xs text-gray-400">Status: ${response.status}</span>
246
+ </div>
247
+ <pre class="text-green-300 overflow-auto">${JSON.stringify(data, null, 2)}</pre>
248
+ `;
249
+ } catch (error) {
250
+ responseArea.innerHTML = `
251
+ <div class="flex justify-between items-center mb-2">
252
+ <span class="text-green-400">✓ Created</span>
253
+ </div>
254
+ <pre class="text-green-300">Request failed: ${error.message}</pre>
255
+ `;
256
+ }
257
+ };
258
+
259
+ window.showDocumentation = (method) => {
260
+ const overlay = document.createElement('div');
261
+ overlay.className = 'fixed inset-0 bg-gray-900/90 backdrop-blur-md z-50 flex items-center justify-center p-8';
262
+ overlay.innerHTML = `
263
+ <div class="relative max-w-4xl w-full bg-gray-800 rounded-2xl p-8 border border-gray-700 max-h-[90vh] overflow-auto">
264
+ <button class="absolute top-4 right-4 text-gray-400 hover:text-white">
265
+ <i data-feather="x"></i>
266
+ </button>
267
+ <h3 class="text-xl font-bold mb-4">${method.toUpperCase()} API Documentation</h3>
268
+ <div class="space-y-4">
269
+ <div class="p-4 bg-gray-700/50 rounded-lg">
270
+ <h4 class="font-medium mb-2">Endpoint</h4>
271
+ <code class="bg-gray-600 p-2 rounded text-sm block">
272
+ /api/cognitive-${method === 'get' ? 'data' : 'analysis'}</code>
273
+ <div class="p-4 bg-gray-700/50 rounded-lg">
274
+ <h4 class="font-medium mb-2">Description</h4>
275
+ <p class="text-gray-300">
276
+ ${method === 'get' ?
277
+ 'Retrieve cognitive patterns and reasoning traces from the system.' :
278
+ 'Submit new cognitive data for analysis and pattern recognition.'}
279
+ </p>
280
+ </div>
281
+ </div>
282
+ `;
283
+ document.body.appendChild(overlay);
284
+ feather.replace();
285
+
286
+ // Add close handler
287
+ overlay.querySelector('button').addEventListener('click', () => {
288
+ overlay.remove();
289
+ });
290
+ };
291
+
292
+ window.clearAllResponses = () => {
293
+ document.querySelectorAll('.response-area').forEach(area => {
294
+ area.classList.add('hidden');
295
+ area.innerHTML = '';
296
+ });
297
+ };
298
+ </script>
299
+ </body>
300
+ </html>
explore.html ADDED
@@ -0,0 +1,291 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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>FEI-Next - Cognitive Exploration</title>
7
+ <link rel="icon" type="image/x-icon" href="/static/favicon.ico">
8
+ <script src="https://cdn.tailwindcss.com"></script>
9
+ <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
10
+ <script src="https://unpkg.com/feather-icons"></script>
11
+ <script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.net.min.js"></script>
12
+ <style>
13
+ @keyframes synapsePulse {
14
+ 0% { opacity: 0.3; }
15
+ 50% { opacity: 0.8; }
16
+ 100% { opacity: 0.3; }
17
+ }
18
+ .synapse {
19
+ animation: synapsePulse 4s infinite ease-in-out;
20
+ }
21
+ .gradient-mask {
22
+ mask-image: linear-gradient(to bottom, transparent 0%, black 10%, black 90%, transparent 100%);
23
+ }
24
+ .thought-bubble {
25
+ transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
26
+ }
27
+ .thought-bubble:hover {
28
+ transform: translateY(-4px);
29
+ box-shadow: 0 12px 24px -12px rgba(74, 144, 226, 0.4);
30
+ }
31
+ .proof-halo {
32
+ box-shadow: 0 0 0 0 rgba(74, 144, 226, 0.8);
33
+ animation: proofPulse 3s infinite;
34
+ }
35
+ @keyframes proofPulse {
36
+ 0% { box-shadow: 0 0 0 0 rgba(74, 144, 226, 0.8);
37
+ 70% { box-shadow: 0 0 0 10px rgba(74, 144, 226, 0); }
38
+ 100% { box-shadow: 0 0 0 0 rgba(74, 144, 226, 0); }
39
+ }
40
+ .data-node {
41
+ transition: all 0.3s ease;
42
+ cursor: pointer;
43
+ }
44
+ .data-node:hover {
45
+ transform: scale(1.05);
46
+ filter: brightness(1.2);
47
+ }
48
+ .cognitive-network {
49
+ background:
50
+ radial-gradient(circle at 20% 20%, rgba(74, 144, 226, 0.1) 0%,
51
+ radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.1) 100%);
52
+ }
53
+ </style>
54
+ </head>
55
+ <body class="bg-gray-900 text-gray-100 font-sans overflow-x-hidden">
56
+ <div id="vanta-bg" class="fixed inset-0 -z-10 opacity-20"></div>
57
+
58
+ <header class="gradient-mask px-6 py-8">
59
+ <div class="max-w-6xl mx-auto flex flex-col md:flex-row justify-between items-center">
60
+ <div class="flex items-center mb-6 md:mb-0">
61
+ <div class="relative">
62
+ <div class="absolute -inset-4 bg-blue-500 rounded-full opacity-20 blur-md"></div>
63
+ <div class="relative bg-gradient-to-br from-blue-600 to-indigo-800 w-12 h-12 rounded-2xl flex items-center justify-center">
64
+ <i data-feather="compass" class="w-6 h-6"></i>
65
+ </div>
66
+ <h1 class="ml-4 text-2xl font-bold bg-clip-text text-transparent bg-gradient-to-r from-blue-400 to-indigo-300">
67
+ Cognitive Exploration
68
+ </h1>
69
+ </div>
70
+ <nav class="flex space-x-6">
71
+ <a href="index.html" class="text-gray-400 hover:text-blue-300 transition-colors flex items-center">
72
+ <i data-feather="home" class="w-4 h-4 mr-2"></i>
73
+ Home
74
+ </a>
75
+ <a href="api-explorer.html" class="text-gray-400 hover:text-blue-300 transition-colors flex items-center">
76
+ <i data-feather="code" class="w-4 h-4 mr-2"></i>
77
+ API Explorer
78
+ </a>
79
+ </nav>
80
+ </div>
81
+ </header>
82
+
83
+ <main class="max-w-6xl mx-auto px-6 pb-20">
84
+ <div class="grid grid-cols-1 lg:grid-cols-4 gap-8">
85
+ <!-- Control Panel -->
86
+ <div class="lg:col-span-1 bg-gray-800/30 backdrop-blur-md rounded-2xl p-6 border border-gray-700/50">
87
+ <h3 class="text-lg font-bold mb-4">Exploration Controls</h3>
88
+ <div class="space-y-4">
89
+ <div>
90
+ <label class="block text-sm text-gray-400 mb-2">Zoom Level</label>
91
+ <input type="range" min="1" max="10" value="3" class="w-full" id="zoom-control">
92
+ </div>
93
+ <div>
94
+ <label class="block text-sm text-gray-400 mb-2">Focus Area</label>
95
+ <select class="w-full bg-gray-700/50 border border-gray-600/50 rounded-lg px-3 py-2 text-sm">
96
+ <option>Memory Patterns</option>
97
+ <option>Reasoning Traces</option>
98
+ <option>Decision Pathways</option>
99
+ </select>
100
+ </div>
101
+ <button onclick="generateNewData()" class="w-full px-4 py-2 bg-blue-600 hover:bg-blue-500 rounded-lg text-white text-sm transition-colors">
102
+ Generate New Data
103
+ </button>
104
+ </div>
105
+ </div>
106
+
107
+ <!-- Main Visualization -->
108
+ <div class="lg:col-span-3 cognitive-network bg-gray-800/20 backdrop-blur-md rounded-2xl p-6 border border-gray-700/50">
109
+ <h3 class="text-lg font-bold mb-4">Cognitive Network</h3>
110
+ <div class="h-96 relative rounded-xl bg-gray-900/50 border border-gray-700/50">
111
+ <div class="absolute inset-0 flex items-center justify-center">
112
+ <div class="grid grid-cols-5 gap-6" id="network-container">
113
+ </div>
114
+ </div>
115
+ </div>
116
+ </div>
117
+
118
+ <!-- Data Explorer -->
119
+ <div class="mt-8 bg-gray-800/30 backdrop-blur-md rounded-2xl p-6 border border-gray-700/50">
120
+ <h3 class="text-lg font-bold mb-4">Live Data Stream</h3>
121
+ <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6" id="data-stream">
122
+ <div class="text-center text-gray-400 py-8">
123
+ <i data-feather="refresh-cw" class="w-8 h-8 mx-auto mb-3 animate-spin"></i>
124
+ <p>Loading cognitive patterns...</p>
125
+ </div>
126
+ </div>
127
+ </div>
128
+ </main>
129
+
130
+ <footer class="border-t border-gray-800 py-8 mt-12">
131
+ <div class="max-w-6xl mx-auto px-6">
132
+ <div class="flex flex-col md:flex-row justify-between items-center">
133
+ <div class="flex items-center mb-4 md:mb-0">
134
+ <i data-feather="activity" class="w-5 h-5 text-blue-400 mr-2"></i>
135
+ <span class="text-sm text-gray-400">FEI-Next Explorer v1.0</span>
136
+ </div>
137
+ <div class="flex space-x-6">
138
+ <a href="index.html" class="text-gray-400 hover:text-blue-300 transition-colors">
139
+ <i data-feather="home"></i>
140
+ </a>
141
+ <a href="api-explorer.html" class="text-gray-400 hover:text-blue-300 transition-colors">
142
+ <i data-feather="code"></i>
143
+ </a>
144
+ </div>
145
+ </div>
146
+ </div>
147
+ </footer>
148
+
149
+ <script>
150
+ // Initialize Vanta.js background
151
+ if (typeof VANTA !== 'undefined') {
152
+ VANTA.NET({
153
+ el: "#vanta-bg",
154
+ mouseControls: true,
155
+ touchControls: true,
156
+ gyroControls: false,
157
+ color: 0x3b82f6,
158
+ backgroundColor: 0x111827,
159
+ points: 12,
160
+ maxDistance: 20,
161
+ spacing: 18
162
+ });
163
+ }
164
+
165
+ // Initialize feather icons
166
+ feather.replace();
167
+
168
+ // Cognitive network visualization
169
+ const createNetworkNodes = () => {
170
+ const container = document.getElementById('network-container');
171
+ container.innerHTML = '';
172
+
173
+ const nodes = 15;
174
+ const colors = ['blue', 'purple', 'green', 'yellow', 'red'];
175
+
176
+ for (let i = 0; i < nodes; i++) {
177
+ const node = document.createElement('div');
178
+ const color = colors[Math.floor(Math.random() * colors.length)];
179
+ const size = Math.random() * 16 + 8;
180
+ const x = Math.random() * 80 + 10;
181
+ const y = Math.random() * 80 + 10;
182
+ const delay = Math.random() * 2;
183
+
184
+ node.className = `data-node absolute w-${Math.round(size/4)} h-${Math.round(size/4)} rounded-full bg-${color}-500/40 synapse';
185
+ node.style.left = `${x}%`;
186
+ node.style.top = `${y}%`;
187
+ node.style.width = `${size}px`;
188
+ node.style.height = `${size}px`;
189
+ node.style.animationDelay = `${delay}s`;
190
+ node.title = `Cognitive Node ${i+1}`;
191
+
192
+ node.addEventListener('click', () => {
193
+ exploreNode(i+1);
194
+ });
195
+
196
+ container.appendChild(node);
197
+ }
198
+ };
199
+
200
+ // Load and display data
201
+ const loadDataStream = async () => {
202
+ try {
203
+ const response = await fetch('https://jsonplaceholder.typicode.com/posts?_limit=6');
204
+ const posts = await response.json();
205
+
206
+ const streamContainer = document.getElementById('data-stream');
207
+ streamContainer.innerHTML = '';
208
+
209
+ posts.forEach(post => {
210
+ const postElement = document.createElement('div');
211
+ postElement.className = 'thought-bubble bg-gray-700/50 p-4 rounded-xl border border-gray-600/50';
212
+ postElement.innerHTML = `
213
+ <h4 class="font-medium text-sm mb-2">${post.title.substring(0, 25)}...</h4>
214
+ <p class="text-xs text-gray-300">${post.body.substring(0, 60)}...</p>
215
+ <button class="mt-2 px-3 py-1 bg-blue-600 hover:bg-blue-500 rounded-lg text-white text-xs transition-colors" onclick="exploreNode(${post.id})">
216
+ Trace Pathway
217
+ </button>
218
+ `;
219
+ streamContainer.appendChild(postElement);
220
+ });
221
+ } catch (error) {
222
+ console.log('Failed to load data stream:', error);
223
+ }
224
+ };
225
+
226
+ // Explore individual node
227
+ window.exploreNode = async (id) => {
228
+ try {
229
+ const response = await fetch(`https://jsonplaceholder.typicode.com/posts/${id}`);
230
+ const data = await response.json();
231
+
232
+ const overlay = document.createElement('div');
233
+ overlay.className = 'fixed inset-0 bg-gray-900/90 backdrop-blur-md z-50 flex items-center justify-center p-8';
234
+ overlay.innerHTML = `
235
+ <div class="relative max-w-4xl w-full bg-gray-800 rounded-2xl p-8 border border-gray-700 max-h-[90vh] overflow-auto">
236
+ <button class="absolute top-4 right-4 text-gray-400 hover:text-white">
237
+ <i data-feather="x"></i>
238
+ </button>
239
+ <h3 class="text-xl font-bold mb-4">Cognitive Node #${id}</h3>
240
+ <div class="space-y-4">
241
+ <div class="p-4 bg-gray-700/50 rounded-lg">
242
+ <h4 class="font-medium mb-2">${data.title}</h4>
243
+ <p class="text-gray-300">${data.body}</p>
244
+ <div class="mt-4 grid grid-cols-3 gap-4">
245
+ <div class="text-center p-3 bg-gray-600/30 rounded">
246
+ <i data-feather="cpu" class="w-5 h-5 text-blue-400 mx-auto mb-2"></i>
247
+ <span class="text-sm text-gray-300">Processing</span>
248
+ </div>
249
+ <div class="text-center p-3 bg-gray-600/30 rounded">
250
+ <i data-feather="activity" class="w-5 h-5 text-purple-400 mx-auto mb-2"></i>
251
+ <span class="text-sm text-gray-300">Memory</span>
252
+ </div>
253
+ <div class="text-center p-3 bg-gray-600/30 rounded">
254
+ <i data-feather="check-circle" class="w-5 h-5 text-green-400 mx-auto mb-2"></i>
255
+ <span class="text-sm text-gray-300">Verified</span>
256
+ </div>
257
+ </div>
258
+ </div>
259
+ </div>
260
+ `;
261
+ document.body.appendChild(overlay);
262
+ feather.replace();
263
+
264
+ // Add close handler
265
+ overlay.querySelector('button').addEventListener('click', () => {
266
+ overlay.remove();
267
+ });
268
+ } catch (error) {
269
+ console.log('Node exploration failed:', error);
270
+ }
271
+ };
272
+
273
+ // Generate new data
274
+ window.generateNewData = () => {
275
+ createNetworkNodes();
276
+ loadDataStream();
277
+ };
278
+
279
+ // Initialize when page loads
280
+ document.addEventListener('DOMContentLoaded', () => {
281
+ createNetworkNodes();
282
+ loadDataStream();
283
+
284
+ // Add zoom control functionality
285
+ document.getElementById('zoom-control').addEventListener('input', (e) => {
286
+ const zoomLevel = e.target.value / 3;
287
+ document.getElementById('network-container').style.transform = `scale(${zoomLevel})`;
288
+ });
289
+ </script>
290
+ </body>
291
+ </html>
index.html CHANGED
@@ -292,35 +292,149 @@
292
  <a href="explore.html" class="text-gray-400 hover:text-blue-300 transition-colors">
293
  <i data-feather="compass"></i>
294
  </a>
295
- </div>
 
 
 
296
  </div>
297
  </div>
298
  </footer>
299
 
300
  <script>
301
  // Initialize Vanta.js background with cognitive rhythm
302
- VANTA.NET({
303
- el: "#vanta-bg",
304
- mouseControls: true,
305
- touchControls: true,
306
- gyroControls: false,
307
- minHeight: 200.00,
308
- minWidth: 200.00,
309
- scale: 1.00,
310
- scaleMobile: 1.00,
311
- color: 0x3b82f6,
312
- backgroundColor: 0x111827,
313
- points: 12.00,
314
- maxDistance: 20.00,
315
- spacing: 18.00
316
- });
 
 
317
  // Initialize feather icons
318
  feather.replace();
319
-
320
  // Add vascular flow animation to main sections
321
  document.querySelectorAll('.bg-gray-800/30').forEach(section => {
322
  section.classList.add('vascular-flow');
323
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
324
  // System pulse animation
325
  const pulse = anime({
326
  targets: '#system-pulse',
@@ -481,22 +595,18 @@
481
  `;
482
  document.body.appendChild(ritualOverlay);
483
  feather.replace();
484
-
485
  // Handle consent acceptance
486
  document.getElementById('accept-consent').addEventListener('click', () => {
487
  ritualOverlay.remove();
488
  text.textContent = 'Handshake Complete';
489
  consentButton.classList.add('proof-halo');
490
 
 
491
  setTimeout(() => {
492
- text.textContent = 'Begin Mutual Exploration';
493
- consentButton.classList.remove('cursor-not-allowed', 'proof-halo');
494
- consentButton.disabled = false;
495
- gradient.classList.add('opacity-0');
496
  }, 1500);
497
  });
498
-
499
- // Handle consent decline
500
  document.getElementById('decline-consent').addEventListener('click', () => {
501
  ritualOverlay.remove();
502
  text.textContent = 'Ready for Mutual Exploration';
 
292
  <a href="explore.html" class="text-gray-400 hover:text-blue-300 transition-colors">
293
  <i data-feather="compass"></i>
294
  </a>
295
+ <a href="api-explorer.html" class="text-gray-400 hover:text-blue-300 transition-colors">
296
+ <i data-feather="code"></i>
297
+ </a>
298
+ </div>
299
  </div>
300
  </div>
301
  </footer>
302
 
303
  <script>
304
  // Initialize Vanta.js background with cognitive rhythm
305
+ if (typeof VANTA !== 'undefined') {
306
+ VANTA.NET({
307
+ el: "#vanta-bg",
308
+ mouseControls: true,
309
+ touchControls: true,
310
+ gyroControls: false,
311
+ minHeight: 200.00,
312
+ minWidth: 200.00,
313
+ scale: 1.00,
314
+ scaleMobile: 1.00,
315
+ color: 0x3b82f6,
316
+ backgroundColor: 0x111827,
317
+ points: 12.00,
318
+ maxDistance: 20.00,
319
+ spacing: 18.00
320
+ });
321
+ }
322
  // Initialize feather icons
323
  feather.replace();
 
324
  // Add vascular flow animation to main sections
325
  document.querySelectorAll('.bg-gray-800/30').forEach(section => {
326
  section.classList.add('vascular-flow');
327
  });
328
+
329
+ // Initialize data exploration functionality
330
+ const initDataExploration = async () => {
331
+ try {
332
+ // Fetch sample cognitive data for demonstration
333
+ const response = await fetch('https://jsonplaceholder.typicode.com/posts?_limit=3');
334
+ const posts = await response.json();
335
+
336
+ // Create data exploration section
337
+ const dataSection = document.createElement('div');
338
+ dataSection.className = 'mt-12 bg-gray-800/30 backdrop-blur-md rounded-2xl p-8 border border-gray-700/50';
339
+ dataSection.innerHTML = `
340
+ <h3 class="text-xl font-bold mb-6">Cognitive Data Explorer</h3>
341
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-6 mb-6">
342
+ ${posts.map(post => `
343
+ <div class="thought-bubble bg-gray-700/50 p-6 rounded-xl border border-gray-600/50">
344
+ <h4 class="font-medium mb-2">${post.title.substring(0, 30)}...</h4>
345
+ <p class="text-sm text-gray-300">${post.body.substring(0, 80)}...</p>
346
+ <button class="mt-3 px-4 py-2 bg-blue-600 hover:bg-blue-500 rounded-lg text-white text-sm transition-colors" onclick="exploreData(${post.id})">
347
+ Explore Trace
348
+ </button>
349
+ </div>
350
+ `).join('')}
351
+ </div>
352
+ <div class="text-center">
353
+ <button onclick="loadMoreData()" class="px-6 py-3 bg-gray-700 hover:bg-gray-600 rounded-xl text-gray-300 transition-colors">
354
+ Load More Cognitive Patterns
355
+ </button>
356
+ </div>
357
+ `;
358
+
359
+ document.querySelector('main').insertBefore(dataSection, document.querySelector('footer'));
360
+ feather.replace();
361
+ } catch (error) {
362
+ console.log('Data exploration initialization failed:', error);
363
+ }
364
+ };
365
+
366
+ // Data exploration functions
367
+ window.exploreData = async (id) => {
368
+ try {
369
+ const response = await fetch(`https://jsonplaceholder.typicode.com/posts/${id}`);
370
+ const data = await response.json();
371
+
372
+ // Show detailed view
373
+ const overlay = document.createElement('div');
374
+ overlay.className = 'fixed inset-0 bg-gray-900/90 backdrop-blur-md z-50 flex items-center justify-center p-8';
375
+ overlay.innerHTML = `
376
+ <div class="relative max-w-4xl w-full bg-gray-800 rounded-2xl p-8 border border-gray-700 max-h-[90vh] overflow-auto">
377
+ <button class="absolute top-4 right-4 text-gray-400 hover:text-white">
378
+ <i data-feather="x"></i>
379
+ </button>
380
+ <h3 class="text-xl font-bold mb-4">Cognitive Trace #${id}</h3>
381
+ <div class="space-y-4">
382
+ <div class="p-4 bg-gray-700/50 rounded-lg">
383
+ <h4 class="font-medium mb-2">${data.title}</h4>
384
+ <p class="text-gray-300">${data.body}</p>
385
+ <div class="mt-4 grid grid-cols-2 gap-4">
386
+ <div class="text-center p-3 bg-gray-600/30 rounded">
387
+ <i data-feather="activity" class="w-5 h-5 text-blue-400 mx-auto mb-2"></i>
388
+ <span class="text-sm text-gray-300">TAI Verified</span>
389
+ </div>
390
+ <div class="text-center p-3 bg-gray-600/30 rounded">
391
+ <i data-feather="check-circle" class="w-5 h-5 text-green-400 mx-auto mb-2"></i>
392
+ <span class="text-sm text-gray-300">HBLU Active</span>
393
+ </div>
394
+ </div>
395
+ </div>
396
+ </div>
397
+ `;
398
+ document.body.appendChild(overlay);
399
+ feather.replace();
400
+
401
+ // Add close handler
402
+ overlay.querySelector('button').addEventListener('click', () => {
403
+ overlay.remove();
404
+ });
405
+ } catch (error) {
406
+ console.log('Data exploration failed:', error);
407
+ }
408
+ };
409
+
410
+ window.loadMoreData = async () => {
411
+ try {
412
+ const response = await fetch('https://jsonplaceholder.typicode.com/posts?_limit=3&_start=3');
413
+ const newPosts = await response.json();
414
+
415
+ const postsContainer = document.querySelector('.grid-cols-1\\ md\\:grid-cols-3');
416
+ newPosts.forEach(post => {
417
+ const postElement = document.createElement('div');
418
+ postElement.className = 'thought-bubble bg-gray-700/50 p-6 rounded-xl border border-gray-600/50';
419
+ postElement.innerHTML = `
420
+ <h4 class="font-medium mb-2">${post.title.substring(0, 30)}...</h4>
421
+ <p class="text-sm text-gray-300">${post.body.substring(0, 80)}...</p>
422
+ <button class="mt-3 px-4 py-2 bg-blue-600 hover:bg-blue-500 rounded-lg text-white text-sm transition-colors" onclick="exploreData(${post.id})">
423
+ Explore Trace
424
+ </button>
425
+ `;
426
+ postsContainer.appendChild(postElement);
427
+ });
428
+ feather.replace();
429
+ } catch (error) {
430
+ console.log('Loading more data failed:', error);
431
+ }
432
+ };
433
+
434
+ // Initialize when page loads
435
+ document.addEventListener('DOMContentLoaded', () => {
436
+ initDataExploration();
437
+ });
438
  // System pulse animation
439
  const pulse = anime({
440
  targets: '#system-pulse',
 
595
  `;
596
  document.body.appendChild(ritualOverlay);
597
  feather.replace();
 
598
  // Handle consent acceptance
599
  document.getElementById('accept-consent').addEventListener('click', () => {
600
  ritualOverlay.remove();
601
  text.textContent = 'Handshake Complete';
602
  consentButton.classList.add('proof-halo');
603
 
604
+ // Navigate to explore page
605
  setTimeout(() => {
606
+ window.location.href = 'explore.html';
 
 
 
607
  }, 1500);
608
  });
609
+ // Handle consent decline
 
610
  document.getElementById('decline-consent').addEventListener('click', () => {
611
  ritualOverlay.remove();
612
  text.textContent = 'Ready for Mutual Exploration';