Mining/miner/config/CLAUDE.md
snider 69376b886f feat: Rebrand xmrig to miner and vendor XMRig ecosystem
Complete rebranding of all components:
- Core miner: xmrig -> miner (binary, version.h, CMakeLists.txt)
- Proxy: xmrig-proxy -> miner-proxy
- CUDA plugin: xmrig-cuda -> miner-cuda
- Heatmap: xmrig-nonces-heatmap -> miner-nonces-heatmap
- Go CLI wrapper: miner-cli -> miner-ctrl

Vendored XMRig ecosystem into miner/ directory:
- miner/core - XMRig CPU/GPU miner
- miner/proxy - Stratum proxy
- miner/cuda - NVIDIA CUDA plugin
- miner/heatmap - Nonce visualization tool
- miner/config - Configuration UI
- miner/deps - Pre-built dependencies

Updated dev fee to use project wallet with opt-out (kMinimumDonateLevel=0)
Updated branding to Lethean (domain, copyright, version 0.1.0)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 19:43:02 +00:00

3.1 KiB

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Build & Development Commands

# Install dependencies (required first time)
npm install -g bower
npm install
bower install

# Development server (http://127.0.0.1:8081 with hot reload)
npm start

# Production build (outputs to public/)
npm run build

Architecture Overview

XMRig Config is a pure client-side React/Redux SPA for generating XMRig miner configurations. It runs entirely in the browser with no backend - all configuration stays local.

Tech Stack

  • React 16.2 with Redux 3.7 for state management
  • React Router 4 for client-side routing
  • Webpack 4 (bundling) + Grunt (CSS/asset processing)
  • LESS for stylesheets, Bootstrap 3 for UI

Source Structure (src/)

src/
├── index.js          # App entry point
├── routes.js         # Main routing configuration
├── components/       # Presentational React components
│   ├── modals/       # Modal dialogs (add/edit/delete pools, threads, presets)
│   ├── misc/         # Misc settings sub-components
│   ├── network/      # Network/pool sub-components
│   └── start/        # Startup settings sub-components
├── containers/       # Redux-connected components
│   ├── xmrig/        # CPU miner containers
│   ├── amd/          # AMD miner containers (legacy)
│   ├── nvidia/       # NVIDIA miner containers (legacy)
│   └── proxy/        # Proxy containers
├── actions/          # Redux action creators
├── reducers/         # Redux reducers (config, modal, notification, presets)
├── store/            # Redux store setup (dev vs prod)
├── constants/        # Action types, modal types, product definitions
├── lib/              # Utilities (config generation, pool handling, serialization)
└── less/             # LESS stylesheets

Redux State Shape

{
  config: {
    xmrig: {...},        // CPU miner settings
    'xmrig-amd': {...},  // AMD miner (legacy)
    'xmrig-nvidia': {...}, // NVIDIA miner (legacy)
    proxy: {...}         // XMRig Proxy settings
  },
  notification: {...},   // Toast notifications
  modal: {...},          // Active modal state
  presets: {...},        // Saved configurations
  router: {...}          // React Router state
}

Key Files

  • src/lib/config.js (~12KB): Core config generation logic - serializes Redux state to XMRig JSON config and command-line args
  • src/reducers/config.js: Largest reducer, handles all miner configuration state
  • src/routes.js: Defines routes for each miner type (/xmrig, /xmrig-amd, /xmrig-nvidia, /proxy, /presets)

Build Pipeline

  1. Development (npm start): Grunt compiles LESS → Webpack dev server with HMR on :8081
  2. Production (npm run build): Webpack production build → Grunt minifies CSS/JS → filerev hashes assets

Deployment

Copy the public/ directory to any static web server. Nginx config example in config/xmrig-config.conf.