Mining Pool Stats is an open-source Node.js and PostgreSQL web application for tracking proof-of-work coins, mining pools, exchange listings, hashrate, workers, market pairs, volume, exchange reputation, scam flags, and domain-age trust signals.
The project was originally built as a live community dashboard. It is now published so other developers can continue it, audit it, improve the data pipeline, or run their own instance.
- Tracks approved coins, pools, exchanges, and public API endpoints.
- Polls mining pool APIs for live hashrate, workers, blocks, and status.
- Polls exchange APIs and aggregator APIs for prices, pairs, and volume.
- Computes consensus price and 24h volume from exchange market data where possible.
- Tracks exchange reputation votes and admin scam flags.
- Enriches exchanges with domain age, registrar, and WHOIS/RDAP metadata.
- Provides public pages for coins, pools, exchanges, and a public REST API.
- Provides a user dashboard for submissions and an admin dashboard for moderation.
- Lets admins approve/reject listings, transfer ownership, reset user passwords, remove spam reputation votes, and mark exchanges as scam.
- Node.js 22+
- Express 5
- EJS templates
- PostgreSQL
- Sequelize ORM
- PM2 for production process management
- Nginx recommended as reverse proxy
src/app.js Express app setup, middleware, route mounting
src/server.js Web process entrypoint
src/worker.js Background worker entrypoint
src/bootstrap.js Idempotent production schema/data repairs
src/config/ App, auth, and database config
src/controllers/ API controllers
src/database/models/ Sequelize models and associations
src/database/seeders/ Optional Sequelize seeders
src/routes/ Web routes and API routes
src/services/ Main business logic
src/utils/ Shared helpers
src/workers/ Pollers, enrichers, cleanup, scheduler
views/ EJS pages
public/ Static assets and uploads placeholder
scripts/ One-off maintenance and audit scripts
nginx/ Example Nginx config
ecosystem.config.cjs Production PM2 process definitions
cp .env.example .env
npm install
createdb miningpoolstats
npm run db:init
npm run devThen open http://localhost:3000.
npm run db:init connects to PostgreSQL, syncs the Sequelize schema, runs the idempotent bootstrap repairs, and creates or updates an admin user when ADMIN_EMAIL and ADMIN_PASSWORD are set in .env.
Copy .env.example and change every placeholder before production use.
Minimum local variables:
NODE_ENV=development
PORT=3000
BASE_URL=http://localhost:3000
DB_HOST=localhost
DB_PORT=5432
DB_NAME=miningpoolstats
DB_USER=miningpool
DB_PASSWORD=change_me
JWT_SECRET=change_this_to_a_long_random_secret
ADMIN_EMAIL=admin@example.com
ADMIN_PASSWORD=change_this_admin_passwordOptional integrations:
LCW_API_KEYfor LiveCoinWatch lookups.RECAPTCHA_SITE_KEYandRECAPTCHA_SECRET_KEYfor public forms.TELEGRAM_BOT_TOKEN,TELEGRAM_CHANNEL, andDISCORD_WEBHOOKSfor notifications.
Development usually runs the combined server and scheduler:
npm run devProduction should split web and workers:
WEB_ONLY=true DISABLE_WORKERS=true npm start
WORKER_ONLY=true npm run workerThe included ecosystem.config.cjs defines both PM2 processes.
This project depends on external pool and exchange APIs. Data quality varies a lot across small mining projects and exchanges. The worker system is built to reduce bad data through:
- endpoint health checks,
- stale cleanup,
- price consensus and outlier filtering,
- exchange link synchronization,
- domain age enrichment,
- duplicate pool cleanup,
- data consistency checks,
- manual admin overrides for bad actors.
When auditing an instance, start with:
node scripts/health-check.js
node scripts/audit-data-quality.js
node scripts/check-all-exchanges.jsSome scripts were originally written for live maintenance. Read each script before running it against production data.
Public API docs are served by the app at:
/api/public/docs
Common endpoints:
GET /api/public/overview
GET /api/public/coins
GET /api/public/coins/:symbol
GET /api/public/coins/:symbol/pools
GET /api/public/coins/:symbol/hashrate
GET /api/public/pools
GET /api/public/exchanges
- Never commit
.env, database dumps, backups, private keys, or token files. - Set a long random
JWT_SECRETin production. - Do not use demo admin passwords.
- Keep
NODE_ENV=productionbehind HTTPS. - Run web and worker as an unprivileged system user when possible.
- Treat exchange and pool APIs as untrusted input.
See SECURITY.md for reporting guidance.
MIT. See LICENSE.