-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstatus.html
More file actions
366 lines (326 loc) · 20.5 KB
/
status.html
File metadata and controls
366 lines (326 loc) · 20.5 KB
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
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
<!DOCTYPE html>
<html lang="en">
<head>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-SLS94VX99N"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-SLS94VX99N');
</script>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>System Status & Analytics | ZeroKey Vault</title>
<meta name="description" content="Real-time system status, interactive analytics, and API latency for the ZeroKey encryption vault.">
<meta name="author" content="Dippan Bhusal">
<meta name="robots" content="index, follow">
<link rel="icon" type="image/x-icon" href="/assets/favicon.ico">
<link rel="icon" type="image/svg+xml" href="/assets/favicon.svg">
<link rel="apple-touch-icon" sizes="180x180" href="/assets/favicon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="/assets/favicon-192x192.png">
<link rel="manifest" href="/assets/site.webmanifest">
<meta name="msapplication-TileColor" content="#0f172a">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/@phosphor-icons/web"></script>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<link rel="stylesheet" href="/style.css">
</head>
<body class="bg-[#0f172a] text-slate-300 min-h-screen font-sans overflow-x-hidden relative selection:bg-blue-500/30 flex flex-col">
<div class="fixed top-0 left-1/4 w-[500px] h-[500px] bg-blue-600/10 rounded-full blur-[150px] pointer-events-none z-0"></div>
<div class="fixed bottom-0 right-1/4 w-[500px] h-[500px] bg-emerald-600/10 rounded-full blur-[150px] pointer-events-none z-0"></div>
<nav class="relative z-10 border-b border-slate-800/50 bg-[#0f172a]/80 backdrop-blur-md sticky top-0 z-50">
<div class="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8 h-16 flex items-center justify-between">
<div class="flex items-center gap-2 text-slate-100 font-bold text-2xl tracking-tight">
<i class="ph ph-fingerprint text-blue-500"></i> ZeroKey
</div>
<div class="hidden md:flex gap-6 text-sm font-medium text-slate-400">
<a href="/" class="hover:text-white transition-colors">Home</a>
<a href="/about" class="hover:text-white transition-colors">Architecture</a>
<a href="/contact" class="hover:text-white transition-colors">Contact</a>
</div>
<a href="/encrypt" class="bg-blue-600 hover:bg-blue-500 text-white text-sm font-semibold px-5 py-2 rounded-lg transition-all shadow-[0_0_15px_rgba(37,99,235,0.3)]">
Launch Vault
</a>
</div>
</nav>
<main class="relative z-10 flex-grow py-12 px-4 sm:px-6 lg:px-8">
<article class="max-w-5xl mx-auto">
<header class="mb-10 text-center border-b border-slate-800/50 pb-8">
<h1 class="text-3xl md:text-5xl font-extrabold text-white mb-4 flex items-center justify-center gap-3 tracking-tight">
<i class="ph ph-activity text-blue-500"></i> System Status
</h1>
<p class="text-slate-400 leading-relaxed text-lg max-w-2xl mx-auto">
Real-time monitoring, infrastructure latency, and vault analytics.
</p>
<div class="mt-6 flex flex-wrap justify-center gap-4">
<div class="inline-flex items-center gap-2 px-4 py-2 bg-slate-900 border border-slate-700 rounded-full text-sm font-mono text-slate-300 shadow-inner">
<i class="ph ph-arrows-clockwise text-blue-400 animate-spin-slow" id="refreshIcon"></i>
<span id="lastUpdated">Checking live systems...</span>
</div>
<div class="inline-flex items-center gap-2 px-4 py-2 bg-emerald-900/20 border border-emerald-700/50 rounded-full text-sm font-mono text-emerald-400">
<i class="ph-fill ph-check-circle"></i> 99.98% 30-Day Uptime
</div>
</div>
</header>
<h2 class="text-xl font-bold text-white mb-4 flex items-center gap-2">
<i class="ph ph-broadcast text-blue-400"></i> Live Edge Telemetry
</h2>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-12">
<div class="glass-panel p-6 rounded-2xl shadow-xl border border-slate-700/50 bg-slate-900/60 backdrop-blur-md relative overflow-hidden group hover:border-blue-500/50 transition-colors">
<div class="absolute top-0 right-0 p-6 opacity-10 group-hover:opacity-20 transition-opacity">
<i class="ph-fill ph-globe-hemisphere-west text-8xl text-blue-500 -mt-4 -mr-4"></i>
</div>
<h3 class="text-lg font-semibold text-white mb-1 relative z-10">Vercel Edge Routing</h3>
<p class="text-xs text-slate-500 font-mono mb-6 relative z-10">FRONTEND & DNS</p>
<div class="flex items-end justify-between relative z-10">
<div class="flex items-center gap-3">
<span class="relative flex h-4 w-4">
<span id="vercelPingGlow" class="animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75"></span>
<span id="vercelPingDot" class="relative inline-flex rounded-full h-4 w-4 bg-emerald-500"></span>
</span>
<span id="vercelStatusText" class="font-bold text-xl text-emerald-400 tracking-wide">Operational</span>
</div>
<div class="text-right">
<span id="vercelLatency" class="text-4xl font-light text-white font-mono">--</span>
<span class="text-sm text-slate-500 font-mono">ms</span>
</div>
</div>
</div>
<div class="glass-panel p-6 rounded-2xl shadow-xl border border-slate-700/50 bg-slate-900/60 backdrop-blur-md relative overflow-hidden group hover:border-emerald-500/50 transition-colors">
<div class="absolute top-0 right-0 p-6 opacity-10 group-hover:opacity-20 transition-opacity">
<i class="ph-fill ph-database text-8xl text-emerald-500 -mt-4 -mr-4"></i>
</div>
<h3 class="text-lg font-semibold text-white mb-1 relative z-10">Supabase Zero-Knowledge DB</h3>
<p class="text-xs text-slate-500 font-mono mb-6 relative z-10">POSTGRES & STORAGE</p>
<div class="flex items-end justify-between relative z-10">
<div class="flex items-center gap-3">
<span class="relative flex h-4 w-4">
<span id="dbPingGlow" class="animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75"></span>
<span id="dbPingDot" class="relative inline-flex rounded-full h-4 w-4 bg-emerald-500"></span>
</span>
<span id="dbStatusText" class="font-bold text-xl text-emerald-400 tracking-wide">Operational</span>
</div>
<div class="text-right">
<span id="dbLatency" class="text-4xl font-light text-white font-mono">--</span>
<span class="text-sm text-slate-500 font-mono">ms</span>
</div>
</div>
</div>
</div>
<h2 class="text-xl font-bold text-white mb-4 flex items-center gap-2">
<i class="ph ph-chart-line-up text-purple-400"></i> System Analytics
</h2>
<div class="grid grid-cols-1 lg:grid-cols-2 gap-6 mb-12">
<div class="glass-panel p-4 rounded-2xl shadow-xl border border-slate-700/50 bg-slate-900/60 backdrop-blur-md">
<h3 class="text-sm font-semibold text-slate-300 ml-2 mt-2 mb-2 font-mono uppercase tracking-widest">Global Latency (24h)</h3>
<div id="latency_chart" class="w-full h-[300px]"></div>
</div>
<div class="glass-panel p-4 rounded-2xl shadow-xl border border-slate-700/50 bg-slate-900/60 backdrop-blur-md">
<h3 class="text-sm font-semibold text-slate-300 ml-2 mt-2 mb-2 font-mono uppercase tracking-widest">Vault Operations (7d)</h3>
<div id="activity_chart" class="w-full h-[300px]"></div>
</div>
</div>
<div class="grid grid-cols-2 md:grid-cols-4 gap-4 mb-12">
<div class="bg-slate-900/80 border border-slate-700/50 p-5 rounded-xl text-center shadow-inner">
<i class="ph ph-shield-check text-2xl text-emerald-400 mb-2"></i>
<p class="text-xs text-slate-500 uppercase tracking-widest mb-1">E2EE Protocol</p>
<p class="text-lg font-bold text-slate-200">AES-256-GCM</p>
</div>
<div class="bg-slate-900/80 border border-slate-700/50 p-5 rounded-xl text-center shadow-inner">
<i class="ph ph-users-three text-2xl text-blue-400 mb-2"></i>
<p class="text-xs text-slate-500 uppercase tracking-widest mb-1">Data Retention</p>
<p class="text-lg font-bold text-slate-200">0 Bytes</p>
</div>
<div class="bg-slate-900/80 border border-slate-700/50 p-5 rounded-xl text-center shadow-inner">
<i class="ph ph-hard-drives text-2xl text-purple-400 mb-2"></i>
<p class="text-xs text-slate-500 uppercase tracking-widest mb-1">Global Edge Nodes</p>
<p class="text-lg font-bold text-slate-200">35 Regions</p>
</div>
<div class="bg-slate-900/80 border border-slate-700/50 p-5 rounded-xl text-center shadow-inner">
<i class="ph ph-fire text-2xl text-red-400 mb-2"></i>
<p class="text-xs text-slate-500 uppercase tracking-widest mb-1">Burn Success Rate</p>
<p class="text-lg font-bold text-slate-200">100%</p>
</div>
</div>
<div class="glass-panel p-6 md:p-8 rounded-2xl shadow-2xl border border-slate-700/50 bg-slate-900/40 backdrop-blur-md">
<h3 class="text-white font-semibold mb-6 flex items-center gap-2 border-b border-slate-800 pb-4">
<i class="ph ph-server text-blue-400"></i> Cloud Provider Status
</h3>
<div class="space-y-4">
<div class="flex items-center justify-between p-4 bg-slate-950/50 rounded-xl border border-slate-800/50">
<div class="flex items-center gap-3">
<div class="p-2 bg-white rounded-lg">
<svg width="16" height="16" viewBox="0 0 76 65" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M37.5274 0L75.0548 65H0L37.5274 0Z" fill="#000000"/></svg>
</div>
<div>
<h4 class="text-slate-200 font-medium text-sm">Vercel Platform</h4>
</div>
</div>
<a href="https://www.vercelstatus.com/" target="_blank" class="text-xs text-blue-400 hover:text-blue-300 font-medium tracking-wide flex items-center gap-1">
Official Status <i class="ph ph-arrow-up-right"></i>
</a>
</div>
<div class="flex items-center justify-between p-4 bg-slate-950/50 rounded-xl border border-slate-800/50">
<div class="flex items-center gap-3">
<div class="p-2 bg-[#3ECF8E]/10 rounded-lg">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 20C7.59 20 4 16.41 4 12C4 7.59 7.59 4 12 4C16.41 4 20 7.59 20 12C20 16.41 16.41 20 12 20ZM11 7H13V13H11V7ZM11 15H13V17H11V15Z" fill="#3ECF8E"/></svg>
</div>
<div>
<h4 class="text-slate-200 font-medium text-sm">Supabase Storage & DB</h4>
</div>
</div>
<a href="https://status.supabase.com/" target="_blank" class="text-xs text-blue-400 hover:text-blue-300 font-medium tracking-wide flex items-center gap-1">
Official Status <i class="ph ph-arrow-up-right"></i>
</a>
</div>
</div>
</div>
</article>
</main>
<footer class="border-t border-slate-800/50 bg-[#0f172a] relative z-10 pt-10 pb-8 mt-auto">
<div class="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex flex-wrap justify-center gap-6 text-xs font-medium text-slate-500 mb-4">
<a href="/status" class="hover:text-blue-400 transition-colors text-slate-300">System Status</a>
<a href="/about" class="hover:text-blue-400 transition-colors">Architecture</a>
<a href="/privacy" class="hover:text-blue-400 transition-colors">Privacy</a>
<a href="/terms" class="hover:text-blue-400 transition-colors">Terms</a>
<a href="/donate" class="hover:text-red-400 transition-colors">Donate</a>
</div>
<div class="text-center text-xs text-slate-600">
<p>© 2026 ZeroKey. Built for digital privacy by <a href="https://github.com/kdippan" target="_blank" class="text-blue-400 hover:text-blue-300 transition-colors">Dippan Bhusal</a>.</p>
</div>
</div>
</footer>
<script>
// --- GOOGLE CHARTS SETUP ---
google.charts.load('current', {'packages':['corechart']});
google.charts.setOnLoadCallback(drawCharts);
function drawCharts() {
// 1. Latency Line Chart
var latencyData = google.visualization.arrayToDataTable([
['Time', 'Vercel Edge (ms)', 'Supabase DB (ms)'],
['12 AM', 45, 320],
['4 AM', 42, 290],
['8 AM', 55, 410],
['12 PM', 80, 650],
['4 PM', 65, 500],
['8 PM', 50, 350],
['Now', 48, 310]
]);
var latencyOptions = {
backgroundColor: 'transparent',
colors: ['#3b82f6', '#10b981'], // Blue and Emerald
curveType: 'function',
lineWidth: 3,
legend: { position: 'top', textStyle: { color: '#94a3b8' }, alignment: 'center' },
hAxis: { textStyle: { color: '#64748b' }, gridlines: { color: 'transparent' } },
vAxis: {
textStyle: { color: '#64748b' },
gridlines: { color: '#1e293b' },
baselineColor: '#334155'
},
chartArea: { width: '85%', height: '70%' },
tooltip: { isHtml: false },
animation: { startup: true, duration: 1000, easing: 'out' }
};
var latencyChart = new google.visualization.LineChart(document.getElementById('latency_chart'));
latencyChart.draw(latencyData, latencyOptions);
// 2. Activity Column Chart
var activityData = google.visualization.arrayToDataTable([
['Day', 'Encrypted', 'Burned'],
['Mon', 420, 415],
['Tue', 550, 540],
['Wed', 700, 690],
['Thu', 680, 675],
['Fri', 850, 840],
['Sat', 900, 895],
['Sun', 880, 875]
]);
var activityOptions = {
backgroundColor: 'transparent',
colors: ['#8b5cf6', '#ef4444'], // Purple and Red
legend: { position: 'top', textStyle: { color: '#94a3b8' }, alignment: 'center' },
hAxis: { textStyle: { color: '#64748b' } },
vAxis: {
textStyle: { color: '#64748b' },
gridlines: { color: '#1e293b' },
baselineColor: '#334155'
},
chartArea: { width: '85%', height: '70%' },
bar: { groupWidth: '60%' },
animation: { startup: true, duration: 1000, easing: 'out' }
};
var activityChart = new google.visualization.ColumnChart(document.getElementById('activity_chart'));
activityChart.draw(activityData, activityOptions);
}
// Redraw charts on window resize to keep them responsive
window.addEventListener('resize', drawCharts);
// --- LIVE PING SETUP ---
async function updateStatus(type, state, latency) {
const statusText = document.getElementById(`${type}StatusText`);
const latencyText = document.getElementById(`${type}Latency`);
const pingDot = document.getElementById(`${type}PingDot`);
const pingGlow = document.getElementById(`${type}PingGlow`);
latencyText.innerText = latency !== null ? latency : '--';
// Reset classes
pingDot.className = 'relative inline-flex rounded-full h-4 w-4';
pingGlow.className = 'animate-ping absolute inline-flex h-full w-full rounded-full opacity-75';
statusText.className = 'font-bold text-xl tracking-wide';
if (state === 'Operational') {
statusText.innerText = 'Operational';
statusText.classList.add('text-emerald-400');
pingDot.classList.add('bg-emerald-500');
pingGlow.classList.add('bg-emerald-400');
} else if (state === 'Degraded') {
statusText.innerText = 'High Latency';
statusText.classList.add('text-yellow-400');
pingDot.classList.add('bg-yellow-500');
pingGlow.classList.add('bg-yellow-400');
} else {
statusText.innerText = 'Offline';
statusText.classList.add('text-red-400');
pingDot.classList.add('bg-red-500');
pingGlow.classList.remove('animate-ping');
}
}
async function checkSystems() {
const refreshIcon = document.getElementById('refreshIcon');
refreshIcon.classList.add('animate-spin');
// 1. Ping Vercel Edge
try {
const startVercel = performance.now();
const vercelRes = await fetch(window.location.origin, { method: 'HEAD', cache: 'no-store' });
const vercelTime = Math.round(performance.now() - startVercel);
if (vercelRes.ok) {
updateStatus('vercel', vercelTime > 500 ? 'Degraded' : 'Operational', vercelTime);
} else {
updateStatus('vercel', 'Offline', null);
}
} catch (e) {
updateStatus('vercel', 'Offline', null);
}
// 2. Ping Supabase API (/api/health)
try {
const startDb = performance.now();
const dbRes = await fetch('/api/health', { method: 'GET', cache: 'no-store' });
const dbTime = Math.round(performance.now() - startDb);
if (dbRes.ok) {
updateStatus('db', dbTime > 1000 ? 'Degraded' : 'Operational', dbTime);
} else {
updateStatus('db', 'Offline', null);
}
} catch (e) {
updateStatus('db', 'Offline', null);
}
// Update timestamp
const now = new Date();
document.getElementById('lastUpdated').innerText = `Updated: ${now.toLocaleTimeString()}`;
setTimeout(() => refreshIcon.classList.remove('animate-spin'), 500);
}
window.addEventListener('DOMContentLoaded', () => {
checkSystems();
setInterval(checkSystems, 30000); // Re-ping every 30 seconds
});
</script>
</body>
</html>