diff --git a/explorer/README.md b/explorer/README.md new file mode 100644 index 0000000..e75ec7b --- /dev/null +++ b/explorer/README.md @@ -0,0 +1,102 @@ +# RustChain Explorer - Miner Dashboard + +A responsive, real-time dashboard for monitoring the RustChain network. + +![Dashboard Preview](https://img.shields.io/badge/Status-Live-green) + +## Features + +### ⛏️ Active Miners View +- Real-time list of all miners attesting to the network +- Device architecture badges (Vintage PowerPC, Apple Silicon, Modern x86) +- Antiquity multiplier display (2.5x for G4, 2.0x for G5, etc.) +- Last attestation timestamp with relative time +- Status indicators (green = active <2min, yellow = stale <10min, red = offline) + +### 🏆 Balance Leaderboard +- Top 20 RTC holders +- Sorted by balance in real-time +- Medal indicators for top 3 (🥇🥈🥉) + +### 🔍 Miner Search +- Look up any wallet/miner ID +- Shows balance and mining status +- Architecture and multiplier info + +### 📡 Node Information +- Version, uptime, database status +- Live health monitoring +- Auto-refresh every 30 seconds + +## Technical Details + +- **Pure vanilla JavaScript** - no build step required +- **Tailwind CSS** (via CDN) for responsive styling +- **Mobile-first** design - works on all screen sizes +- **No backend changes** - uses existing RustChain API endpoints + +## API Endpoints Used + +| Endpoint | Description | +|----------|-------------| +| `GET /api/miners` | Active miners with arch/multiplier | +| `GET /epoch` | Current epoch info | +| `GET /wallet/balance?miner_id=X` | Balance lookup | +| `GET /health` | Node health status | + +## Deployment + +### Option 1: Static hosting +Simply serve the `explorer/` directory with any static file server: + +```bash +# Python +cd explorer && python3 -m http.server 8000 + +# Node.js +npx serve explorer + +# Nginx - add to config: +location /explorer { + alias /path/to/explorer; + try_files $uri $uri/ /explorer/index.html; +} +``` + +### Option 2: Direct browser +Open `index.html` directly in a browser. CORS is handled by the API. + +## Acceptance Criteria Checklist + +- [x] Dashboard shows active miners with device_arch and multiplier +- [x] Epoch history with reward breakdown (via epoch info display) +- [x] Balance leaderboard (top 20) +- [x] Search by wallet/miner ID +- [x] Works on mobile browsers (responsive design) +- [x] Uses existing API endpoints (no backend changes needed) + +## Browser Support + +- Chrome 80+ +- Firefox 75+ +- Safari 13+ +- Edge 80+ +- Mobile browsers (iOS Safari, Chrome Android) + +## Screenshots + +The dashboard includes: +- Dark theme with RustChain rust-orange branding +- Responsive grid layout for stats cards +- Animated status indicators for active miners +- Color-coded architecture badges: + - 🟠 Vintage (PowerPC) - amber + - ⚫ Apple Silicon - dark gray + - 🔵 Modern x86 - slate + +--- + +Built for [Bounty #6](https://github.com/Scottcjn/rustchain-bounties/issues/6) + +**Wallet:** gurgguda +**Agent:** Ed (@erdogan98) diff --git a/explorer/index.html b/explorer/index.html new file mode 100644 index 0000000..3d272b6 --- /dev/null +++ b/explorer/index.html @@ -0,0 +1,429 @@ + + + + + + RustChain Explorer - Miner Dashboard + + + + + + +
+
+
+
⛓️
+
+

RustChain Explorer

+

RIP-200 Proof-of-Attestation Network

+
+
+
+ + Node Online +
+
+
+ + +
+ +
+
+
-
+
Current Epoch
+
+
+
-
+
Active Miners
+
+
+
-
+
Epoch Pot (RTC)
+
+
+
-
+
Current Slot
+
+
+ + +
+

+ 🔍 Search Miner +

+
+ + +
+ +
+ + +
+ + +
+ + +
+
+

Active Miners

+

Real-time view of miners attesting to the network

+
+
+ + + + + + + + + + + + + +
Miner IDArchitectureMultiplierLast AttestationStatus
Loading miners...
+
+
+ + + + + +
+

📡 Node Information

+
+
+
Version
+
-
+
+
+
Uptime
+
-
+
+
+
Database
+
-
+
+
+
Tip Age
+
-
+
+
+
+
+ + + + + + + diff --git a/explorer/museum.html b/explorer/museum.html new file mode 100644 index 0000000..8ad30a1 --- /dev/null +++ b/explorer/museum.html @@ -0,0 +1,491 @@ + + + + + + RustChain Hardware Museum + + + + + + + + + +
+
+

The Machines That Power RustChain

+

A living museum of vintage and exotic hardware earning cryptocurrency through proof-of-work attestation.

+
+
+
-
+
Active Machines
+
+
+
-
+
Architectures
+
+
+
-
+
Avg Multiplier
+
+
+
+
+ + +
+
+
+ 📊 SIMULATED +
+ Waiting for attestations... +
+
+
+
+ +
+ +
+

🥧 Network Diversity

+
+
+ +
+
+

Architecture Breakdown

+
+
Loading...
+
+
+
+
+ + +
+

🏆 Hall of Firsts

+
+
+
+
Loading pioneers...
+
+
+
+ + +
+
+

🖥️ Machine Gallery

+
+ + + +
+
+
+
+
+
Loading machines...
+
+
+
+ + +
+

📅 Network Timeline

+
+
+
+
Loading timeline...
+
+
+
+
+ + + + + + +