Edge Blockbook Status is a real-time monitoring dashboard for Blockbook servers. It provides live status updates, metrics, and health monitoring for multiple Blockbook cryptocurrency server instances.
- Type: Full-stack web application (TypeScript)
- Purpose: Real-time server monitoring and status visualization
- Primary Users: System administrators, DevOps teams monitoring Blockbook infrastructure
- Stack: TypeScript, React, Express, styled-components, Webpack
edge-blockbook-status/
├── .editorconfig # EditorConfig (UTF-8, LF, 2-space indent)
├── .gitignore # Git ignore rules
├── .husky/pre-commit # Husky pre-commit hook (runs lint)
├── .prettierrc # Prettier config (single quotes, no semi)
├── .yarnrc # Yarn security config (--ignore-scripts)
├── eslint.config.mjs # ESLint flat config (standard-kit)
├── package.json # Yarn-managed dependencies and scripts
├── pm2.json # PM2 production process config
├── tsconfig.json # Base TypeScript config (client)
├── tsconfig.server.json # Server TypeScript config (CommonJS)
├── webpack.config.js # Webpack config for client bundling
├── CLAUDE.md # This file
├── README.md # User-facing documentation
└── src/
├── config.ts # Server config via cleaner-config
├── common/
│ ├── types.ts # Cleaner-validated Blockbook API types
│ ├── values.ts # Constants (port, servers, intervals)
│ └── utils.ts # Shared utilities (retryFetch, getTimeSince)
├── server/
│ └── index.ts # Express server with /api/proxy endpoint
└── client/
├── index.html # Minimal HTML shell
├── index.tsx # React entry point
├── App.tsx # Root component with GlobalStyle
├── api/
│ └── baseUrl.ts # Dev/prod API base URL logic
└── components/
├── Header.tsx # Dashboard header + refresh button
├── ServerGrid.tsx # Grid layout, polling, state management
├── ServerCard.tsx # Individual server card with status
└── StatusIndicator.tsx # Pulsing dot status indicator
Single full-stack application. The Express server serves the webpack-built frontend AND provides the API proxy. One Node.js process, one deployment.
- Framework: Express 5
- Port: 8008 (configurable via
config.jsonorPORTenv var) - Serves Static Files: From
dist/(webpack output) - Key Endpoint:
/api/proxy?url=<blockbook-url>- Proxies requests to Blockbook servers
- Validates URLs (only allows edge.app endpoints)
- Configurable timeout via cleaner-config
- Configuration:
cleaner-configreads fromconfig.json
- Framework: React 19 with styled-components
- Build: Webpack with ts-loader
- Auto-refresh: 15-second polling intervals
- Server Configuration: Defined in
src/common/values.ts - Features:
- Color-coded status indicators (HEALTHY, DEGRADED, ERROR, OFFLINE)
- Block height tracking with change highlighting
- Version, sync status, mempool status display
- Last block time tracking with relative timestamps
- Mobile-responsive with expand/collapse cards
- Manual refresh button
- types.ts: Cleaner-validated types for Blockbook API responses
- values.ts: Server list, port, refresh interval constants
- utils.ts: Retry logic, time formatting
Servers are defined in src/common/values.ts:
export const servers: ServerConfig[] = [
{ name: 'Bitcoin', region: 'Europe 1', url: 'https://btc-eu1.edge.app/', accentColor: '#f7931a' }
]Uses the cleaners library for type-safe API response validation:
export const asBlockbookResponse = asObject({
blockbook: asBlockbookInfo,
backend: asBackendInfo
})Uses cleaner-config for server settings:
export const asConfig = asObject({
port: asOptional(asNumber, 8008),
allowedDomain: asOptional(asString, 'edge.app/api/v2'),
fetchTimeout: asOptional(asNumber, 10000)
})yarn start.dev-- Start backend with Sucrase (hot TypeScript, no build needed)yarn start.web-- Start webpack dev server on port 3000 (proxies API to 8008)yarn start-- Start production server fromlib/(requires build)yarn build.server-- Compile server TypeScript tolib/yarn build.web-- Bundle client with webpack todist/yarn lint-- Run ESLintyarn fix-- Run ESLint with auto-fixyarn clean-- Removelib/anddist/yarn prepare-- Full build (husky + clean + build all)
- Terminal 1:
yarn start.dev(backend on port 8008) - Terminal 2:
yarn start.web(frontend on port 3000, proxies API) - Open
http://localhost:3000
yarn prepare # Build everything
yarn start # Or: pm2 start pm2.jsonThis project follows Edge development conventions:
- Package Manager: Yarn v1
- Language: TypeScript (strict mode)
- Linting: ESLint with eslint-config-standard-kit + Prettier
- Formatting: Single quotes, no semicolons, no trailing commas
- Exports: Named exports only (no default exports)
- Imports: Auto-sorted by eslint-config-standard-kit
- Hooks: Husky pre-commit runs ESLint
- Process Management: PM2 for production
- Data Validation: cleaners library
- Config: cleaner-config
express-- Web frameworkcors-- CORS middlewarenode-fetch-- HTTP client for API proxycleaners-- Data validationcleaner-config-- Configuration management
typescript,sucrase-- TypeScript compilationwebpack,ts-loader,html-webpack-plugin-- Client bundlingreact,react-dom,styled-components-- Frontend UIeslint,eslint-config-standard-kit,prettier-- Code qualityhusky,lint-staged-- Git hooks
- Follow Edge conventions (named exports, single quotes, no semicolons)
- Use
cleanersfor any new data validation - Keep the dashboard lightweight and focused on monitoring
- Test changes with actual Blockbook endpoints
- Run
yarn lintbefore considering any change complete