diff --git a/templates/boot.html b/templates/boot.html
index 79857a3..bee2295 100644
--- a/templates/boot.html
+++ b/templates/boot.html
@@ -1,369 +1,707 @@
- Loading mining data...
-
+
+
+
Loading mining data...
+
██████╗ ████████╗ ██████╗ ██████╗ ███████╗
██╔══██╗╚══██╔══╝██╔════╝ ██╔═══██╗██╔════╝
██████╔╝ ██║ ██║ ██║ ██║███████╗
██╔══██╗ ██║ ██║ ██║ ██║╚════██║
██████╔╝ ██║ ╚██████╗ ╚██████╔╝███████║
╚═════╝ ╚═╝ ╚═════╝ ╚═════╝ ╚══════╝
- v.21
-
-
-
-
-
- Initialize mining dashboard? [Y/N]:
-
-
-
-
+ v.21
+
+
-
-
+ // Initialize with fallback, then try live data
+ setupFallbackMessages();
+ updateDebug("Fetching dashboard data...");
+ fetch('/api/metrics')
+ .then(response => {
+ if (!response.ok) { throw new Error(`HTTP error! Status: ${response.status}`); }
+ return response.json();
+ })
+ .then(data => {
+ dashboardData = data;
+ clearTimeout(timeoutId);
+ messageIndex = 0;
+ outputElement = document.getElementById('output');
+ outputElement.innerHTML = "";
+ bootMessages = [
+ { text: "BITCOIN OS - MINING CONTROL SYSTEM - v21.000.000\n", speed: 25, delay: 300 },
+ { text: "Copyright (c) 2009-2025 Satoshi Nakamoto & The Bitcoin Core Developers\n", speed: 20, delay: 250 },
+ { text: "All rights reserved.\n\n", speed: 25, delay: 300 },
+ { text: "INITIALIZING SHA-256 MINING SUBSYSTEMS...\n", speed: 25, delay: 400 },
+ { text: "ASIC CLUSTER STATUS: ", speed: 15, delay: 100 },
+ { text: "
ONLINE\n", html: true, delay: 300 },
+ { text: "CHIP TEMPERATURE: ", speed: 15, delay: 100 },
+ { text: "
62°C - WITHIN OPTIMAL RANGE\n", html: true, delay: 300 },
+ { text: "COOLING SYSTEMS: ", speed: 15, delay: 100 },
+ { text: "
OPERATIONAL\n", html: true, delay: 300 },
+ { text: "POWER SUPPLY HEALTH: ", speed: 15, delay: 100 },
+ { text: "
98.7% - NOMINAL\n", html: true, delay: 300 },
+ { text: "\nCONNECTING TO BITCOIN NETWORK...\n", speed: 20, delay: 400 },
+ { text: "BLOCKCHAIN SYNC STATUS: ", speed: 15, delay: 100 },
+ { text: "
SYNCHRONIZED\n", html: true, delay: 300 },
+ { text: "DIFFICULTY ADJUSTMENT: ", speed: 15, delay: 100 },
+ { text: "
CALCULATED\n", html: true, delay: 300 },
+ { text: "MEMPOOL MONITORING: ", speed: 15, delay: 100 },
+ { text: "
ACTIVE\n", html: true, delay: 300 },
+ { text: "\nESTABLISHING POOL CONNECTION...\n", speed: 20, delay: 300 },
+ { text: "CONNECTING TO OCEAN.XYZ...\n", speed: 20, delay: 300 },
+ { text: "STRATUM PROTOCOL v2: ", speed: 15, delay: 100 },
+ { text: "
INITIALIZED\n", html: true, delay: 300 },
+ { text: "POOL HASHRATE: ", speed: 15, delay: 100 },
+ { text: "
VERIFIED\n", html: true, delay: 300 },
+ { text: "WORKER AUTHENTICATION: ", speed: 15, delay: 100 },
+ { text: "
SUCCESSFUL\n", html: true, delay: 300 },
+ { text: "\nINITIALIZING METRICS COLLECTORS...\n", speed: 20, delay: 300 },
+ { text: "HASHRATE MONITOR: ", speed: 15, delay: 100 },
+ { text: "
ACTIVE\n", html: true, delay: 300 },
+ { text: "EARNINGS CALCULATOR: ", speed: 15, delay: 100 },
+ { text: "
CALIBRATED\n", html: true, delay: 300 },
+ { text: "POWER USAGE TRACKING: ", speed: 15, delay: 100 },
+ { text: "
ENABLED\n", html: true, delay: 300 },
+ { text: "PAYOUT THRESHOLD MONITOR: ", speed: 15, delay: 100 },
+ { text: "
ACTIVE\n", html: true, delay: 300 },
+ { text: "\nCURRENT NETWORK METRICS DETECTED\n", speed: 20, delay: 300 },
+ { text: "BTC PRICE: ", speed: 20, delay: 100 },
+ { text: "
$" + numberWithCommas((data.btc_price || 0).toFixed(2)) + "\n", html: true, delay: 300 },
+ { text: "NETWORK DIFFICULTY: ", speed: 20, delay: 100 },
+ { text: "
" + numberWithCommas(Math.round(data.difficulty || 0)) + "\n", html: true, delay: 300 },
+ { text: "NETWORK HASHRATE: ", speed: 20, delay: 100 },
+ { text: "
" + (data.network_hashrate ? numberWithCommas(Math.round(data.network_hashrate)) : "N/A") + " EH/s\n", html: true, delay: 300 },
+ { text: "BLOCK HEIGHT: ", speed: 20, delay: 100 },
+ { text: "
" + numberWithCommas(data.block_number || "N/A") + "\n", html: true, delay: 300 },
+ { text: "\nMINER PERFORMANCE DATA\n", speed: 20, delay: 300 },
+ { text: "CURRENT HASHRATE: ", speed: 20, delay: 100 },
+ { text: "
" + (data.hashrate_60sec || "N/A") + " " + (data.hashrate_60sec_unit || "TH/s") + "\n", html: true, delay: 300 },
+ { text: "24HR AVG HASHRATE: ", speed: 20, delay: 100 },
+ { text: "
" + (data.hashrate_24hr || "N/A") + " " + (data.hashrate_24hr_unit || "TH/s") + "\n", html: true, delay: 300 },
+ { text: "ACTIVE WORKERS: ", speed: 20, delay: 100 },
+ { text: "
" + (data.workers_hashing || "0") + "\n", html: true, delay: 300 },
+ { text: "\nFINANCIAL CALCULATIONS\n", speed: 20, delay: 300 },
+ { text: "DAILY MINING REVENUE: ", speed: 20, delay: 100 },
+ { text: "
$" + numberWithCommas((data.daily_revenue || 0).toFixed(2)) + "\n", html: true, delay: 300 },
+ { text: "DAILY POWER COST: ", speed: 20, delay: 100 },
+ { text: "
$" + numberWithCommas((data.daily_power_cost || 0).toFixed(2)) + "\n", html: true, delay: 300 },
+ { text: "DAILY PROFIT: ", speed: 20, delay: 100 },
+ { text: "
$" + numberWithCommas((data.daily_profit_usd || 0).toFixed(2)) + "\n", html: true, delay: 300 },
+ { text: "PROJECTED MONTHLY PROFIT: ", speed: 20, delay: 100 },
+ { text: "
$" + numberWithCommas((data.monthly_profit_usd || 0).toFixed(2)) + "\n", html: true, delay: 300 },
+ { text: "DAILY SATOSHI YIELD: ", speed: 20, delay: 100 },
+ { text: "
" + numberWithCommas(data.daily_mined_sats || 0) + " sats\n", html: true, delay: 300 },
+ { text: "UNPAID EARNINGS: ", speed: 20, delay: 100 },
+ { text: "
" + (data.unpaid_earnings || "0") + " BTC\n", html: true, delay: 300 },
+ { text: "ESTIMATED TIME TO PAYOUT: ", speed: 20, delay: 100 },
+ { text: "
" + (data.est_time_to_payout || "Unknown") + "\n", html: true, delay: 300 },
+ { text: "\n", speed: 25, delay: 100 },
+ { text: "
ALL MINING PROCESSES OPERATIONAL\n", html: true, delay: 400 },
+ { text: "\nInitialize mining dashboard? ", speed: 25, delay: 400 },
+ { showPrompt: true, delay: 0 }
+ ];
+ startTyping();
+ })
+ .catch(error => {
+ updateDebug(`Error fetching dashboard data: ${error.message}`);
+ });
+