Skip to content

halilayyildiz/miner-guard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Miner Guard

Cryptocurrency Miner Pool Status Checker

About

This application simply checks earnings of the miners on Ahashpool. Supports multiple users and periodically updates miner earnings via pool service API.

Demo

Application is hosted on DigitalOcean Ubuntu droplet. You can access the demo app via the link below:

Miner Guard

Technology Stack

Component Technology
Frontend Angular 5, PrimeNG
Backend NodeJS, Express
Security Token Based (JWT )
Persistence Sqlite
Client Build Tools angular-cli, npm
Server Runtime Nginx, PM2

Project Structure

PROJECT_FOLDER
│  README.md
│  LICENCE           
└──[backend]  
│  │  package.json      
│  │  server.js               # entry point of the program 
│  └──[webui]                 # auto-generated frontend build code
│  └──[app]
│     │  MinerGuard.js 
│     └──[api]
│     │  └──[routes]          # route definitions
│     │  └──[controllers]     # controller implementations for APIs
│     └──[conf]               # configuration files
│     └──[db]                 # database scripts, migration folder etc
│     └──[model]              # Data model objects
│     └──[service]            # Service definitons
│     └──[util]     
│
└──[frontend]
   │  package.json     
   │  angular-cli.json        # ng build configurations
   └──[node_modules]
   └──[src]                   # frontend source files
   └──[dist]                  # frontend build files, auto-created after running angular build: ng -build

Prerequisites

  • NodeJS 9.4.0
  • NPM 5.6.0
  • Express 4.16.2
  • Sqllite 3.1.13
  • Angular 5.2.0
  • PrimeNG 5.2.0
  • Angular-cli 1.6.3
  • PM2 & Nginx

How to build & run

Start with building the backend code. It is node.js application, so installing the dependencies is enough.

# Navigate to PROJECT_FOLDER/backend (should contain package.json)
npm install

Then navigate to frontend folder and install dependencies. As a last step you need to build project to copy binaries under backend static resource folder.

# Navigate to PROJECT_FOLDER/frontend (should contain package.json)
npm install
# build the project (this will automtically copy the files into WEBUI folder under backend )
ng build --prod --aot=true

In order to start application, you need to run 'server.js' file with PM2 process manager.

# Navigate to PROJECT_FOLDER/backend (should contain sever.js)
pm2 start server.js
# In order to check application status, you need to run 'show' command
pm2 show server

Application APIs

Daily Earnings

# list daily earnings of user with id '1'
http://miner.halilayyildiz.com/api/earning/1/daily/

User Details

# list all users
http://miner.halilayyildiz.com/api/user/all/
# list detail of user with id '1'
http://miner.halilayyildiz.com/api/user/1/

Currency Rates

# get current bitcoin price
http://miner.halilayyildiz.com/api/currency/price/btcusd/

Screenshots

UserEarnings

About

Cryptocurrency Miner Pool Status Checker

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors