Customized Ocean.xyz Bitcoin Mining Pool Dashboard
Go to file
2025-03-22 21:31:55 -07:00
App.py Update App.py 2025-03-22 21:31:55 -07:00
boot.html Update boot.html 2025-03-21 21:14:40 -07:00
dockerfile Adding project files via Upload 2025-03-21 14:31:18 -07:00
error.html Update error.html 2025-03-21 21:19:47 -07:00
index.html Update index.html 2025-03-22 21:04:32 -07:00
LICENSE.md Create LICENSE.md 2025-03-21 14:39:12 -07:00
main.js Update main.js 2025-03-22 21:04:55 -07:00
minify.py Adding project files via Upload 2025-03-21 14:31:18 -07:00
README.md Update README.md 2025-03-22 21:02:45 -07:00
requirements.txt Adding project files via Upload 2025-03-21 14:31:18 -07:00
workers.html Add Worker Overview files 2025-03-22 21:05:41 -07:00
workers.js Add Worker Overview files 2025-03-22 21:05:41 -07:00

Ocean.xyz Bitcoin Mining Dashboard

A real-time dashboard application for monitoring Bitcoin mining operations using the Ocean.xyz Mining Pool.

Boot Sequence

Main Dashboard

Workers Overview

Overview

This application provides miners with a comprehensive view of their mining operations, including:

  • Real-time hashrate monitoring
  • BTC price tracking
  • Profitability metrics
  • Payout status
  • Network statistics
  • Worker fleet management
  • Historical data visualization

Built with Flask and modern web technologies, the dashboard features a responsive design that works on both desktop and mobile devices, real-time data updates via Server-Sent Events (SSE), and persistent storage with Redis.

Features

  • Real-Time Monitoring: Live updates of mining metrics with minimal delay
  • Hashrate Visualization: Interactive charts showing hashrate trends
  • Profitability Calculations: Daily and monthly profit estimates in USD and BTC
  • Network Stats: Current Bitcoin difficulty, network hashrate, and block count
  • Payout Tracking: Monitor unpaid earnings and estimated time to next payout
  • Workers Dashboard: View and manage your mining fleet with status, hashrate, and earnings for each device
  • Worker Filtering: Filter and search your miners by status (online/offline) or type (ASIC/FPGA)
  • High Performance: Optimized for low-resource environments with data compression
  • Responsive Design: Works on desktop, tablet, and mobile devices
  • Retro Boot Screen: Bitcoin-themed boot sequence with system initialization display

File Structure

ocean-mining-dashboard/
├── App.py                  # Main Flask application with backend logic
├── Dockerfile              # Docker container configuration
├── minify.py               # HTML minification utility
├── requirements.txt        # Python dependencies
├── static/
│   └── js/
│       ├── main.js         # Frontend JavaScript for main dashboard functionality
│       └── workers.js      # Frontend JavaScript for workers dashboard
├── templates/
│   ├── boot.html           # Bitcoin-themed boot sequence page
│   ├── error.html          # Error page template
│   ├── index.html          # Main dashboard template
│   └── workers.html        # Workers dashboard template
└── config.json             # Configuration file (created on first run)

Installation

Prerequisites

  • Python 3.9 or higher
  • Docker (optional, for containerized deployment)
  • Redis (optional, for data persistence)

Option 1: Local Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/ocean-mining-dashboard.git
    cd ocean-mining-dashboard
    
  2. Create a virtual environment:

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
    
  3. Install dependencies:

    pip install -r requirements.txt
    
  4. Run the application:

    python App.py
    
  5. Access the dashboard at http://localhost:5000

Option 2: Docker Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/ocean-mining-dashboard.git
    cd ocean-mining-dashboard
    
  2. Build the Docker image:

    docker build -t mining-dashboard .
    
  3. Run the container:

    docker run -d -p 5000:5000 --name mining-dashboard mining-dashboard
    
  4. Optional: Run with Redis for data persistence:

    # First start a Redis container
    docker run -d --name redis redis
    
    # Then start the dashboard with Redis connection
    docker run -d -p 5000:5000 --link redis --env REDIS_URL=redis://redis:6379 mining-dashboard
    
  5. Access the dashboard at http://localhost:5000

Workers Dashboard

The Workers Dashboard provides detailed information about each mining device in your fleet:

  • Fleet Summary: Quick view of total hashrate, worker count, and online/offline status
  • Worker Cards: Individual cards for each mining device showing:
    • Current status (online/offline)
    • Device type (ASIC/FPGA)
    • Current hashrate with visual bar indicator
    • Last share time
    • Earnings
    • Acceptance rate
    • Temperature (for online devices)
  • Filtering Options: Filter workers by status or device type
  • Search Functionality: Quickly find specific workers by name
  • Real-time Updates: Synchronized with the main dashboard for consistent data

Access the Workers Dashboard through the navigation links at the top of the main dashboard or directly at /workers.

Configuration

On first run, the application will create a config.json file with default settings. Edit this file to customize:

{
  "power_cost": 0.12,       // Cost per kWh in USD
  "power_usage": 3450,      // Power consumption in watts
  "wallet": "your-btc-wallet-address-here"
}

System Requirements

The dashboard is designed to be lightweight:

  • Minimal CPU usage (single worker with threading)
  • ~100-200MB RAM usage
  • <50MB disk space

Troubleshooting

If you encounter connection issues with the dashboard:

  1. Check the "Health" endpoint at /api/health for system status
  2. Use the "Force Refresh" button if data becomes stale
  3. Inspect browser console logs for error messages
  4. Check server logs with docker logs mining-dashboard if using Docker

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.