2025-11-08 16:43:01 +00:00
# Mining
2025-11-08 16:52:16 +00:00
2025-12-31 09:34:48 +00:00
[](https://github.com/Snider/Mining/actions/workflows/e2e.yml)
[](https://github.com/Snider/Mining/releases)
[](https://golang.org)
[](https://angular.io)
2025-11-08 16:52:16 +00:00
[](https://pkg.go.dev/github.com/Snider/Mining)
[](https://goreportcard.com/report/github.com/Snider/Mining)
[](https://codecov.io/gh/Snider/Mining)
2025-11-09 23:05:47 +00:00
[](https://opensource.org/license/eupl-1-2)
2025-12-31 09:34:48 +00:00
[](https://github.com/Snider/Mining/releases)
2025-12-31 09:36:14 +00:00
[](https://snider.github.io/Mining/)
2025-11-08 16:52:16 +00:00
2025-12-31 00:25:26 +00:00
A modern, modular cryptocurrency mining management platform with GPU support, RESTful API, and cross-platform desktop application.
2025-11-10 01:59:39 +00:00
2025-12-31 00:25:26 +00:00
< img width = "834" height = "657" alt = "Mining Dashboard" src = "https://github.com/user-attachments/assets/d4fc4704-819c-4aca-bcd3-ae4af6e25c1b" / >
2025-11-10 01:59:39 +00:00
2025-12-31 00:25:26 +00:00
## Features
2025-11-10 01:59:39 +00:00
2025-12-31 00:25:26 +00:00
### Supported Algorithms
2025-11-08 16:52:16 +00:00
2025-12-31 00:25:26 +00:00
| Algorithm | Coin | CPU | GPU (OpenCL) | GPU (CUDA) |
|-----------|------|-----|--------------|------------|
2025-12-31 00:34:11 +00:00
| [RandomX ](https://miningpoolstats.stream/monero ) | [Monero (XMR) ](https://www.getmonero.org/ ) | ✅ | ✅ | ✅ |
| [KawPow ](https://miningpoolstats.stream/ravencoin ) | [Ravencoin (RVN) ](https://ravencoin.org/ ) | ❌ | ✅ | ✅ |
| [ETChash ](https://miningpoolstats.stream/ethereumclassic ) | [Ethereum Classic (ETC) ](https://ethereumclassic.org/ ) | ❌ | ✅ | ✅ |
| [ProgPowZ ](https://miningpoolstats.stream/zano ) | [Zano (ZANO) ](https://zano.org/ ) | ❌ | ✅ | ✅ |
| [Blake3 ](https://miningpoolstats.stream/decred ) | [Decred (DCR) ](https://decred.org/ ) | ✅ | ✅ | ✅ |
| [CryptoNight ](https://miningpoolstats.stream/monero ) | Various | ✅ | ✅ | ✅ |
2025-11-08 16:52:16 +00:00
2025-12-31 00:25:26 +00:00
### Core Capabilities
2025-11-08 16:52:16 +00:00
2025-12-31 00:25:26 +00:00
- **Multi-Algorithm Mining**: Support for CPU and GPU mining across multiple algorithms
- **Dual Mining**: Run CPU and GPU mining simultaneously with separate pools
- **Profile Management**: Save and switch between mining configurations
- **Real-time Monitoring**: Live hashrate, shares, and performance metrics
- **RESTful API**: Full control via HTTP endpoints with Swagger documentation
- **Web Dashboard**: Embeddable Angular web component for any application
- **Desktop Application**: Native cross-platform app built with Wails v3
- **Mobile Responsive**: Touch-friendly UI with drawer navigation
2025-12-31 09:35:26 +00:00
- **Simulation Mode**: Test the UI without real mining hardware
### Why Mining Platform?
| Feature | Mining Platform | NiceHash | HiveOS | Manual XMRig |
|---------|:---------------:|:--------:|:------:|:------------:|
| Open Source | ✅ | ❌ | ❌ | ✅ |
| No Fees | ✅ | ❌ (2%+) | ❌ ($3/mo) | ✅ |
| Multi-Algorithm | ✅ | ✅ | ✅ | ❌ |
| GUI Dashboard | ✅ | ✅ | ✅ | ❌ |
| Profile Management | ✅ | ❌ | ✅ | ❌ |
| Dual Mining | ✅ | ❌ | ✅ | ❌ |
| Desktop App | ✅ | ❌ | ❌ | ❌ |
| Embeddable Component | ✅ | ❌ | ❌ | ❌ |
| Self-Hosted | ✅ | ❌ | ❌ | ✅ |
| Simulation Mode | ✅ | ❌ | ❌ | ❌ |
2025-11-08 16:52:16 +00:00
2025-12-31 00:25:26 +00:00
### Mining Software
2025-11-08 16:52:16 +00:00
2025-12-31 00:25:26 +00:00
Manages installation and configuration of:
- **XMRig** - High-performance CPU/GPU miner (RandomX, CryptoNight)
- **T-Rex** - NVIDIA GPU miner (KawPow, Ethash, and more)
- **lolMiner** - AMD/NVIDIA GPU miner (Ethash, Beam, Equihash)
- **TT-Miner** - NVIDIA GPU miner (Ethash, KawPow, Autolykos2)
2025-11-08 16:52:16 +00:00
2025-12-31 00:25:26 +00:00
## Quick Start
2025-11-08 16:52:16 +00:00
2025-12-31 10:43:52 +00:00
### Docker (Fastest)
```bash
# Run with Docker - no dependencies required
docker run -p 9090:9090 ghcr.io/snider/mining:latest
# Access the dashboard at http://localhost:9090
```
2025-12-31 00:25:26 +00:00
### CLI
2025-11-08 16:52:16 +00:00
```bash
2025-12-31 00:25:26 +00:00
# Install
2025-11-08 16:52:16 +00:00
go install github.com/Snider/Mining/cmd/mining@latest
2025-12-31 00:25:26 +00:00
# Start the API server
miner-ctrl serve --host localhost --port 9090
# Or use the interactive shell
miner-ctrl serve
2025-11-08 16:52:16 +00:00
```
2025-12-31 00:25:26 +00:00
### Web Component
2025-11-08 16:52:16 +00:00
2025-12-31 00:25:26 +00:00
```html
< script type = "module" src = "./mbe-mining-dashboard.js" > < / script >
< snider-mining api-base-url = "http://localhost:9090/api/v1/mining" > < / snider-mining >
2025-11-08 16:52:16 +00:00
```
2025-12-31 00:25:26 +00:00
### Desktop Application
2025-11-08 16:52:16 +00:00
2025-12-31 00:25:26 +00:00
Download pre-built binaries from [Releases ](https://github.com/Snider/Mining/releases ) or build from source:
2025-11-08 16:52:16 +00:00
2025-12-31 00:25:26 +00:00
```bash
cd cmd/desktop/mining-desktop
wails3 build
```
## Architecture
2025-11-08 16:52:16 +00:00
2025-11-09 01:02:31 +00:00
```
2025-12-31 00:25:26 +00:00
Mining/
├── cmd/
2026-01-13 16:45:44 +00:00
│ ├── mining/ # CLI application (miner-ctrl)
2025-12-31 00:25:26 +00:00
│ └── desktop/ # Wails desktop app
├── pkg/mining/ # Core Go package
│ ├── mining.go # Interfaces and types
│ ├── manager.go # Miner lifecycle management
│ ├── service.go # RESTful API (Gin)
│ └── profile_manager.go # Profile persistence
2026-01-13 16:45:44 +00:00
├── miner/ # Standalone C++ mining tools
│ ├── core/ # CPU/GPU miner binary
│ ├── proxy/ # Stratum proxy for farms
│ ├── cuda/ # CUDA plugin for NVIDIA
│ └── README.md # Miner documentation
2025-12-31 00:25:26 +00:00
└── ui/ # Angular 20+ web dashboard
└── src/app/
├── components/ # Reusable UI components
└── pages/ # Route pages
2025-11-08 16:52:16 +00:00
```
2026-01-13 16:45:44 +00:00
## Standalone Miner Tools
The `miner/` directory contains standalone C++ mining programs that can be used independently without the GUI:
```bash
# Build miner binaries
make build-miner
# Or build individually
make build-miner-core # CPU/GPU miner
make build-miner-proxy # Stratum proxy
# Run directly
./miner/core/build/miner -o pool.example.com:3333 -u WALLET -p x
./miner/proxy/build/miner-proxy -o pool.example.com:3333 -b 0.0.0.0:3333
```
Pre-built binaries are available from [Releases ](https://github.com/letheanVPN/Mining/releases ). See [miner/README.md ](miner/README.md ) for full documentation.
2025-12-31 00:25:26 +00:00
## API Reference
2025-11-08 16:52:16 +00:00
2025-12-31 00:25:26 +00:00
Base path: `/api/v1/mining`
2025-11-08 16:52:16 +00:00
2025-12-31 00:25:26 +00:00
| Method | Endpoint | Description |
|--------|----------|-------------|
| GET | `/info` | System info and installed miners |
| GET | `/miners` | List running miners |
| POST | `/miners/:name` | Start a miner |
| DELETE | `/miners/:name` | Stop a miner |
| GET | `/miners/:name/stats` | Get miner statistics |
| GET | `/profiles` | List saved profiles |
| POST | `/profiles` | Create a profile |
| PUT | `/profiles/:id` | Update a profile |
| DELETE | `/profiles/:id` | Delete a profile |
| POST | `/miners/:name/install` | Install miner software |
2025-11-08 16:52:16 +00:00
2025-12-31 00:25:26 +00:00
Swagger UI: `http://localhost:9090/api/v1/mining/swagger/index.html`
2025-11-08 16:52:16 +00:00
## Development
### Prerequisites
2025-12-31 00:25:26 +00:00
- Go 1.24+
- Node.js 20+ (for UI development)
- CMake 3.21+ (for miner core)
- OpenCL SDK (for GPU support)
2025-11-08 16:52:16 +00:00
2025-12-31 00:25:26 +00:00
### Build Commands
2025-11-08 16:52:16 +00:00
```bash
2026-01-13 16:45:44 +00:00
# Go Backend
2025-12-31 00:25:26 +00:00
make build # Build CLI binary
2026-01-13 16:45:44 +00:00
make test # Run all tests (Go + C++)
2025-12-31 00:25:26 +00:00
make dev # Start dev server on :9090
2026-01-13 16:45:44 +00:00
# Miner (C++ Binaries)
make build-miner # Build miner and proxy
make build-miner-all # Build and package to dist/miner/
2025-12-31 00:25:26 +00:00
# Frontend
cd ui
npm install
npm run build # Build web component
2026-01-13 16:45:44 +00:00
npm test # Run unit tests
2025-12-31 00:25:26 +00:00
# Desktop
cd cmd/desktop/mining-desktop
wails3 build # Build native app
2025-11-08 16:52:16 +00:00
```
## Configuration
2025-12-31 00:25:26 +00:00
Mining profiles are stored in `~/.config/lethean-desktop/mining_profiles.json`
Example profile:
```json
{
"id": "uuid",
"name": "My XMR Mining",
"minerType": "xmrig",
"config": {
"pool": "stratum+tcp://pool.supportxmr.com:3333",
"wallet": "YOUR_WALLET_ADDRESS",
"algo": "rx/0"
}
}
2025-11-08 16:52:16 +00:00
```
## Contributing
2025-12-31 10:43:52 +00:00
We welcome contributions! Please read our [Code of Conduct ](CODE_OF_CONDUCT.md ) and [Contributing Guidelines ](docs/development/contributing.md ) first.
2025-11-08 16:52:16 +00:00
1. Fork the repository
2. Create your feature branch (`git checkout -b feature/amazing-feature` )
2025-12-31 00:25:26 +00:00
3. Commit your changes (`git commit -m 'Add amazing feature'` )
2025-11-08 16:52:16 +00:00
4. Push to the branch (`git push origin feature/amazing-feature` )
5. Open a Pull Request
2025-12-31 10:43:52 +00:00
See [CONTRIBUTORS.md ](CONTRIBUTORS.md ) for the list of contributors.
2025-11-08 16:52:16 +00:00
## License
This project is licensed under the EUPL-1.2 License - see the [LICENSE ](LICENSE ) file for details.
## Acknowledgments
2025-12-31 00:25:26 +00:00
- [XMRig ](https://github.com/xmrig/xmrig ) - High performance miner
- [Wails ](https://wails.io ) - Desktop application framework
- [Angular ](https://angular.io ) - Web framework
- [Gin ](https://gin-gonic.com ) - HTTP web framework
- [Cobra ](https://github.com/spf13/cobra ) - CLI framework