Skip to content

Repository files navigation

HealthBoard

Version 0.1.0

A lightweight, client-side application health monitoring dashboard for tracking service availability across multiple environments. Monitor applications in real-time with health checks, uptime tracking, and status visualizationβ€”all running entirely in the browser with no backend required.

Purpose

HealthBoard provides DevOps and engineering teams with a simple, self-hosted solution to monitor the health and availability of web applications across different environments (Dev, Stage, UAT, Preprod, Production). Built as a static Next.js application, it performs client-side health checks and displays real-time status information with historical uptime tracking.

Key Features:

  • πŸš€ Zero Backend - Runs entirely in the browser as a static site
  • πŸ”„ Real-time Monitoring - Automatic health checks with configurable intervals
  • πŸ“Š Uptime Tracking - Historical data stored locally in browser
  • 🎨 Modern UI - Clean, responsive interface built with React and Tailwind CSS
  • 🐳 Docker Ready - Easy deployment with Docker and nginx
  • ⚑ Fast & Lightweight - Static export with minimal dependencies

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for full terms.

Copyright 2024–2025 Devify LLC

Requirements

  • Node.js 18.x or higher (recommended: 22.x)
  • npm 9.x or higher
  • Docker (optional, for containerized deployment)

Dependencies

  • Next.js 15.1.0+
  • React 19.0.0+
  • TypeScript 5.7.2+
  • Tailwind CSS 4.0.0+

Configuration

Environment Configuration

The application is configured through the config/environments.ts file, which defines the environments and applications to monitor.

Structure

import { EnvironmentConfig } from '@/lib/types'

export const environments: EnvironmentConfig[] = [
  {
    name: 'dev',           // Environment identifier
    label: 'Dev',          // Display name
    applications: [
      {
        id: 'app-dev',                    // Unique application ID
        name: 'My Application',           // Display name
        url: 'https://dev.example.com',   // Application URL
        healthEndpoint: '/health'         // Optional: custom health check path
      }
    ]
  }
]

Configuration Fields

  • name: Environment identifier (used internally)
  • label: Display name shown in the UI
  • applications: Array of applications to monitor in this environment
    • id: Unique identifier for the application
    • name: Display name for the application
    • url: Base URL of the application to monitor
    • healthEndpoint (optional): Custom path for health checks (defaults to the base URL)

Example Configuration

export const environments: EnvironmentConfig[] = [
  {
    name: 'dev',
    label: 'Development',
    applications: [
      {
        id: 'api-dev',
        name: 'API Service',
        url: 'https://api-dev.example.com',
        healthEndpoint: '/api/health'
      },
      {
        id: 'web-dev',
        name: 'Web Application',
        url: 'https://web-dev.example.com'
      }
    ]
  },
  {
    name: 'prod',
    label: 'Production',
    applications: [
      {
        id: 'api-prod',
        name: 'API Service',
        url: 'https://api.example.com',
        healthEndpoint: '/api/health'
      },
      {
        id: 'web-prod',
        name: 'Web Application',
        url: 'https://www.example.com'
      }
    ]
  }
]

CORS Considerations

Since HealthBoard runs in the browser, the monitored applications must allow CORS requests from the HealthBoard origin. If an application blocks CORS, you have these options:

  1. Configure the application to allow the HealthBoard origin in Access-Control-Allow-Origin
  2. Use a proxy server to bypass CORS restrictions
  3. Exclude the application from monitoring

Running the Project

Development Mode

  1. Install dependencies:

    npm install
  2. Start the development server:

    npm run dev
  3. Open your browser: Navigate to http://localhost:3111

The development server includes hot-reload, so changes to the code will automatically refresh the browser.

Production Build

  1. Build the static site:

    npm run build
  2. Start the production server:

    npm start

    Or serve the out/ directory with any static file server.

Type Checking

Run TypeScript type checking without building:

npm run type-check

Linting

Check code quality with ESLint:

npm run lint

Running with Docker

HealthBoard includes Docker support for easy deployment with nginx.

Build and Run with Docker Compose

  1. Build and start the container:

    docker-compose up -d
  2. Access the application: Navigate to http://localhost:8080

  3. Stop the container:

    docker-compose down

Build Docker Image Manually

  1. Build the image:

    docker build -t healthboard:latest .
  2. Run the container:

    docker run -d -p 8080:80 --name healthboard healthboard:latest
  3. Stop and remove the container:

    docker stop healthboard
    docker rm healthboard

Docker Configuration

The Docker setup uses a multi-stage build:

  • Stage 1: Builds the Next.js static export
  • Stage 2: Serves the static files with nginx

The nginx configuration (nginx.conf) is optimized for serving the static site with proper caching headers.

Project Structure

healthboard/
β”œβ”€β”€ app/                    # Next.js app directory
β”‚   β”œβ”€β”€ globals.css        # Global styles
β”‚   β”œβ”€β”€ layout.tsx         # Root layout
β”‚   └── page.tsx           # Main page
β”œβ”€β”€ components/            # React components
β”‚   β”œβ”€β”€ AppCard.tsx        # Application status card
β”‚   β”œβ”€β”€ EnvironmentSection.tsx  # Environment grouping
β”‚   β”œβ”€β”€ Header.tsx         # Page header
β”‚   β”œβ”€β”€ Sidebar.tsx        # Navigation sidebar
β”‚   β”œβ”€β”€ StatusPill.tsx     # Status indicator
β”‚   β”œβ”€β”€ SummaryBar.tsx     # Summary statistics
β”‚   └── index.ts           # Component exports
β”œβ”€β”€ config/                # Configuration files
β”‚   β”œβ”€β”€ constants.ts       # App constants
β”‚   └── environments.ts    # Environment definitions
β”œβ”€β”€ hooks/                 # React hooks
β”‚   └── useHealthMonitor.ts  # Health monitoring logic
β”œβ”€β”€ lib/                   # Utility libraries
β”‚   β”œβ”€β”€ health-checker.ts  # Health check implementation
β”‚   β”œβ”€β”€ status.ts          # Status utilities
β”‚   β”œβ”€β”€ storage.ts         # Local storage management
β”‚   └── types.ts           # TypeScript types
β”œβ”€β”€ Dockerfile             # Docker build configuration
β”œβ”€β”€ docker-compose.yml     # Docker Compose setup
β”œβ”€β”€ nginx.conf             # nginx configuration
β”œβ”€β”€ next.config.ts         # Next.js configuration
β”œβ”€β”€ package.json           # Dependencies and scripts
└── tsconfig.json          # TypeScript configuration

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/my-feature
  3. Make your changes and test thoroughly
  4. Run type checking: npm run type-check
  5. Run linting: npm run lint
  6. Commit your changes with clear messages
  7. Push to your fork and submit a pull request

Support

For issues, questions, or feature requests, please open an issue on the GitHub repository.


Built with ❀️ by Devify LLC

About

A lightweight, client-side application health monitoring dashboard. Monitor multiple apps across different environments with real-time health checks, uptime tracking, and status visualization. Built with Next.js as a static export. no backend required. Perfect for DevOps teams tracking service availability.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages