Skip to main content

Leaderboard

The Leaderboard is a specialized frontend application designed to track and rank community participation in Mina Rust node testnets. It provides real-time visibility into testnet contributions, encouraging healthy competition among participants.

Overview

The Leaderboard system was developed to monitor testnet participation metrics and provide transparent rankings of community members based on their contributions to network stability, block production, and overall testnet health.

Configuration

Building for Leaderboard

Build the Leaderboard-specific version:

scripts/frontend/build-leaderboard.sh
# Build the Leaderboard-specific version
cd frontend

# Build with leaderboard configuration
make build-leaderboard

Deployment

Firebase Deployment

Outdated Configuration

The Firebase deployment configuration may be outdated. Please verify the current deployment targets and update the configuration as needed before deploying to production.

Deploy the Leaderboard to Firebase hosting:

scripts/frontend/deploy-leaderboard.sh
# Deploy leaderboard variant to Firebase hosting
cd frontend

# Deploy leaderboard variant
make deploy-leaderboard

This command will:

  1. Run prebuild to update version
  2. Build production assets with Sentry integration
  3. Configure leaderboard-specific environment
  4. Deploy to Firebase hosting

Standalone Deployment

For custom hosting solutions:

scripts/frontend/serve-leaderboard.sh
# Build and serve the leaderboard application for custom hosting
cd frontend

# Build the application with leaderboard configuration
make build-leaderboard

# Serve the static files
npx http-server dist/frontend/browser -p 8080

Docker deployment

The Leaderboard can be deployed using Docker.

Environment configuration

The Leaderboard uses the leaderboard environment configuration which:

  • Community participation tracking - Optimized for monitoring testnet contributions and rankings
  • Real-time metrics - Provides live updates of participant performance and network statistics
  • Leaderboard APIs - Connects to specialized endpoints for ranking and participation data
  • Analytics enabled - Includes detailed participation tracking and usage analytics

Build Docker image

scripts/frontend/docker-build-leaderboard.sh
# Build Docker image for the leaderboard frontend

# Generate .env.docker with current git information (required for WASM build)
frontend/docker/generate-docker-env.sh

# Build the Docker image (from project root)
docker build -t mina-frontend -f frontend/Dockerfile .

Run with Docker

scripts/frontend/docker-run-leaderboard.sh
# Run Leaderboard with leaderboard configuration
docker run -p 4200:80 -e MINA_FRONTEND_ENVIRONMENT=leaderboard mina-frontend
Docker Build Process

The Docker image builds the frontend at container startup based on the MINA_FRONTEND_ENVIRONMENT variable. For the Leaderboard, use production environment.