From ba5f444636738275397f9c903325b666a9dd0c2a Mon Sep 17 00:00:00 2001 From: Z User Date: Mon, 9 Nov 2026 21:00:16 +0000 Subject: [PATCH] Add 'Moxie in numbers' stats section: active users, req/s, avg tks/s, 7-day downloads (placeholder until stats feed approved) --- index.html | 134 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) diff --git a/index.html b/index.html index fc3d989..c0aba9c 100755 --- a/index.html +++ b/index.html @@ -1652,6 +1652,104 @@ + +
+
+
+

+ Moxie in numbers.

+

Live platform telemetry — what the Moxiegen network is doing right + now.

+
+
+
+
+ +
+
+ + + Awaiting GitHub approval + + +
+

Active users

+

Running Moxie right now

+
+
+
+ +
+
+ + + Awaiting GitHub approval + + +
+

Requests / second

+

Across all Moxie-Server nodes

+
+
+
+ +
+
+ + + Awaiting GitHub approval + + +
+

Avg tokens / sec

+

On-device and cloud inference

+
+
+
+ +
+
+ + + Awaiting GitHub approval + + +
+

Downloads · 7 days

+

All platforms combined

+
+
+
+
+
@@ -3281,6 +3379,41 @@ }); } + // PLATFORM STATS: placeholder cards show "Awaiting GitHub approval" until the + // stats feed is approved. Set STATS_API_URL to a JSON endpoint returning + // { success:true, data:{ activeUsers, requestsPerSec, avgTokensPerSec, downloads7d } } + // and the numbers replace the pills automatically (no HTML changes needed). + const STATS_API_URL = ''; + function fmtStat(n) { + if (n >= 1e6) return (n / 1e6).toFixed(n % 1e6 ? 1 : 0) + 'M'; + if (n >= 1e3) return (n / 1e3).toFixed(n % 1e3 ? 1 : 0) + 'k'; + return String(n); + } + async function initPlatformStats() { + if (!STATS_API_URL) return; // placeholders stay until the feed ships + try { + const res = await fetch(STATS_API_URL, { headers: { 'Accept': 'application/json' } }); + const json = await res.json(); + if (!res.ok || !json || !json.success || !json.data) return; + const map = { + activeUsers: json.data.activeUsers, + requestsPerSec: json.data.requestsPerSec, + avgTokensPerSec: json.data.avgTokensPerSec, + downloads7d: json.data.downloads7d + }; + for (const [key, val] of Object.entries(map)) { + if (typeof val !== 'number' || !isFinite(val)) continue; + const slot = document.querySelector('[data-stat-value="' + key + '"]'); + if (!slot) continue; + slot.textContent = fmtStat(val); + slot.classList.remove('hidden'); + const card = slot.closest('.min-h-\\[64px\\]'); + const pill = card ? card.querySelector('.inline-flex') : null; + if (pill) pill.remove(); + } + } catch (err) { /* stats feed unreachable — keep placeholders */ } + } + window.addEventListener('load', () => { initScrollAnimations(); initBalloon(); @@ -3289,6 +3422,7 @@ initCopyButtons(); renderHowtoVideos(); initYtVideos(); + initPlatformStats(); });