Skip to content

JaredTate/dgbstats

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

DigiByte Blockchain Stats

A comprehensive real-time blockchain statistics dashboard for the DigiByte network. This React-based web application provides detailed analytics, visualizations, and monitoring tools for the DigiByte blockchain.

Features

πŸ“Š Real-time Dashboard

  • Live blockchain statistics with WebSocket updates
  • Current block height, network hashrate, and difficulty
  • Supply economics and market capitalization
  • Recent blocks and transaction monitoring

πŸ“ˆ Analytics Pages

  1. Home - Main dashboard with key metrics
  2. Blocks - Real-time block explorer with mining details
  3. Mining Pools - Pool distribution analysis with interactive charts
  4. Algorithms - Multi-algorithm mining statistics (SHA256, Scrypt, Skein, Qubit, Odocrypt)
  5. Hashrate - Network hashrate trends and analysis
  6. Difficulties - Mining difficulty tracking per algorithm
  7. Nodes - Geographic visualization of network nodes worldwide
  8. Supply - Supply economics, emission rate, and distribution metrics
  9. Transactions - Transaction volume and fee analytics
  10. Taproot - Network upgrade activation monitoring
  11. Downloads - DigiByte Core wallet download statistics
  12. Roadmap - Development priorities and upcoming features

🎨 Modern UI/UX

  • Material-UI v5 components with DigiByte branding
  • Responsive design optimized for mobile and desktop
  • Interactive D3.js and Chart.js visualizations
  • Dark theme with gradient backgrounds
  • Real-time data updates without page refresh

Prerequisites

  • Node.js v14.x or higher (tested with v21.7.2)
  • DigiByte Node with RPC enabled (digibyte-core)
  • dgbstats-server backend (repository)

Installation

1. Install Node.js (macOS with Homebrew)

# Install Homebrew if not already installed
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# Install Node.js
brew update
brew install node

# Verify installation
node -v
npm -v

# Optional: Install specific Node version
sudo npm install -g n
sudo n install 21.7.2
sudo n use 21.7.2

2. Clone Repositories

# Clone frontend and backend
git clone https://github.com/JaredTate/dgbstats.git
git clone https://github.com/JaredTate/dgbstats-server.git

# Install dependencies
cd dgbstats
npm install

Configuration

1. DigiByte Node Setup

Edit your digibyte.conf file:

# RPC Configuration
rpcuser=your_username
rpcpassword=your_password
server=1
txindex=1
debug=1

# Performance Settings
rpcworkqueue=64
rpcthreads=8
maxconnections=128

# Network Settings
dandelion=0

# Block Notifications (optional)
blocknotify=/path/to/dgbstats-server/blocknotify.sh %s

2. Backend Server Configuration

Update credentials in dgbstats-server/server.js:

const rpcUser = 'your_username';
const rpcPassword = 'your_password';
const rpcUrl = 'http://127.0.0.1:14022';

3. Frontend Configuration

The frontend configuration is in src/config.js:

const config = {
  apiBaseUrl: process.env.REACT_APP_API_URL || 'http://localhost:5001',
  wsBaseUrl: process.env.REACT_APP_WS_URL || 'ws://localhost:5002'
};

Running the Application

Start Backend Server

cd dgbstats-server
sudo npm start
# Server runs on port 5001 (API) and 5002 (WebSocket)

Start Frontend Application

cd dgbstats
npm start
# Application opens at http://localhost:3005

Development

Project Structure

dgbstats/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ pages/          # Page components (12 pages)
β”‚   β”œβ”€β”€ components/     # Reusable components
β”‚   β”œβ”€β”€ utils/          # Utility functions
β”‚   β”œβ”€β”€ tests/          # Test suites
β”‚   β”œβ”€β”€ config.js       # Configuration
β”‚   └── App.js          # Main application
β”œβ”€β”€ public/             # Static assets
└── package.json        # Dependencies

Available Scripts

npm start              # Start development server
npm run build          # Create production build
npm test               # Run tests in watch mode
npm run test:run       # Run tests once
npm run test:coverage  # Generate coverage report
npm run test:e2e       # Run end-to-end tests
npm run test:all       # Run all test suites

Testing

Comprehensive Test Coverage

The project maintains 95%+ code coverage with:

  • 214 Unit Tests - Component and function testing
  • 1,112 E2E Tests - Cross-browser integration testing
  • 7 Browser Engines - Chrome, Firefox, Safari, Edge, Mobile Chrome, Mobile Safari

Test Features

  • βœ… WebSocket mocking for real-time data
  • βœ… D3.js and Chart.js visualization testing
  • βœ… WCAG accessibility compliance
  • βœ… Performance benchmarking
  • βœ… Mobile responsiveness testing
  • βœ… Cross-browser compatibility

Running Tests

# Unit & Integration Tests (Vitest)
npm test                 # Watch mode
npm run test:run         # Single run
npm run test:coverage    # Coverage report
npm run test:ui          # Vitest UI

# End-to-End Tests (Playwright)
npm run test:e2e         # All browsers
npm run test:e2e:ui      # Playwright UI

# Combined Testing
npm run test:all         # All tests
npm run test:all:clean   # Tests + cleanup

Performance

Optimization Features

  • React.memo for component memoization
  • useMemo/useCallback for expensive operations
  • WebSocket batching for real-time updates
  • Virtual scrolling for large datasets
  • Responsive charts with mobile optimizations
  • Code splitting for faster initial load

Lighthouse Scores

  • Performance: 90+
  • Accessibility: 95+
  • Best Practices: 100
  • SEO: 90+

Browser Support

  • Chrome (latest 2 versions)
  • Firefox (latest 2 versions)
  • Safari (latest 2 versions)
  • Edge (latest 2 versions)
  • Mobile Chrome
  • Mobile Safari

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -m 'Add amazing feature')
  4. Push to branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Development Guidelines

  • Follow existing code patterns and styling
  • Maintain 95%+ test coverage
  • Test on mobile and desktop viewports
  • Ensure WCAG 2.1 AA accessibility compliance
  • Update documentation for new features

Recent Updates

  • TAP Route Activation: Successfully activated and buried - UI elements removed
  • Enhanced Testing: Comprehensive test suite with 95%+ coverage
  • Performance Improvements: Optimized chart rendering and WebSocket handling
  • Mobile Optimization: Improved responsive design for all screen sizes

Documentation

License

This project is open-source and available under the MIT License.

Support

For issues, feature requests, or questions:

  • Open an issue on GitHub
  • Contact the development team

Credits

Developed by the DigiByte community for real-time blockchain analytics and monitoring.

About

DigiByte Stats front end site.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages