A real-time dashboard for monitoring gitcoin indexer synchronization status across multiple networks. This application tracks and displays the sync status between RPC nodes, Envio indexer, and the main indexer.
- Real-time monitoring of gitcoin indexer sync status
- Support for multiple networks (Ethereum, Polygon, Arbitrum, etc.)
- Dark/light mode theme support
- Event processing tracking
- Auto-refresh every 30 seconds
- Responsive design for all screen sizes
- Detailed sync status visualization
- RPC endpoint configuration via environment variables
- Next.js 14
- TypeScript
- Tailwind CSS
- GraphQL (with graphql-request)
- Lucide React for icons
- Clone the repository
- Install dependencies:
npm install
- Set up environment variables (see Configuration section)
- Run the development server:
npm run dev
Create a .env
file in the root directory with the following variables:
# GraphQL Endpoints
NEXT_PUBLIC_ENVIO_URL=https://indexer.hyperindex.xyz/a5d76f2/v1/graphql
NEXT_PUBLIC_INDEXER_URL=https://beta.indexer.gitcoin.co/v1/graphql
# RPC URLs (customize as needed)
NEXT_PUBLIC_ETH_RPC_URL=https://eth.llamarpc.com
NEXT_PUBLIC_OPTIMISM_RPC_URL=https://mainnet.optimism.io
# ... Add other chain RPC URLs as needed
# Alert Configuration
NEXT_PUBLIC_ALERT_THRESHOLD=15 # Percentage difference that triggers alerts
-
StatusCard: Displays individual chain status
- Block numbers (RPC, Envio, Indexer)
- Sync percentages
- Events processed
- RPC endpoint information
-
OverallStatus: Shows system-wide health status
- Aggregate sync status
- Quick view of all chains
- Last update timestamp
-
/api/blocks: Fetches and aggregates blockchain data
- Combines data from Envio and Indexer
- Calculates sync percentages
- Provides unified response to frontend
-
/api/monitor: Handles monitoring and alerts
- Periodic health checks
- Sync status verification
- Alert triggering based on thresholds
- Frontend initiates request to
/api/blocks
- API fetches data from:
- Envio GraphQL endpoint
- Indexer GraphQL endpoint
- Data is processed and sync status calculated
- Frontend updates UI with new data
- Process repeats every 30 seconds
Add new chains to the chainConfigs
object in src/config.ts
:
export const chainConfigs = {
'1': {
name: 'Ethereum',
rpcUrl: process.env.NEXT_PUBLIC_ETH_RPC_URL || 'https://eth.llamarpc.com'
},
// Add new chain:
'56': {
name: 'BNB Chain',
rpcUrl: process.env.NEXT_PUBLIC_BNB_RPC_URL || 'https://bsc-dataseed.binance.org'
}
};
npm run dev
: Start development servernpm run build
: Build for productionnpm start
: Run production servernpm run lint
: Run ESLint
src/
├── app/
│ ├── api/
│ │ ├── blocks/
│ │ └── monitor/
│ ├── page.tsx
│ └── layout.tsx
├── components/
│ ├── StatusCard.tsx
│ └── OverallStatus.tsx
├── config.ts
├── types.ts
└── utils.ts
The system monitors:
- Block sync status
- Event processing
- Network health
- RPC endpoint availability
Alert thresholds:
- Default: 15% difference triggers alerts
- Configurable via
NEXT_PUBLIC_ALERT_THRESHOLD
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
MIT License
For issues and feature requests, please open an issue on the repository.