Skip to content

Repository files navigation

⚑ PulseGuard β€” Keep-Alive Uptime Monitor

PulseGuard is a self-hosted uptime monitoring tool that keeps your free-tier services alive (Render, Railway, etc.) by pinging them on a schedule. It features a beautiful dark-mode dashboard showing real-time status, response times, and uptime history.

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  GitHub Actions  │────▢│  Vercel (Next.js) │────▢│   Supabase   β”‚
β”‚  (Scheduler)     β”‚     β”‚  (Dashboard+API)  β”‚     β”‚  (Postgres)  β”‚
β”‚  every 5 min     β”‚     β”‚                   β”‚     β”‚              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
        β”‚                        β–²
        β”‚   GET /api/ping-targets β”‚
        β”‚   POST /api/ping-callback
        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

All free tier: Vercel (Hobby), Supabase (Free), GitHub Actions (Free for public repos, 2000 min/mo for private).

Features

  • 🟒 Real-time status monitoring β€” See at a glance which services are up or down
  • πŸ“Š Response time charts β€” Track performance over 24h, 7d, or 30d
  • πŸ“ˆ Uptime percentages β€” Know your service reliability
  • ⏸️ Pause/Resume β€” Toggle monitoring without losing history
  • πŸ”’ Simple auth β€” Password-protected dashboard
  • πŸ€– GitHub Actions scheduler β€” Reliable 5-minute ping intervals
  • πŸŒ™ Beautiful dark UI β€” Modern, card-based dashboard

Setup Guide

1. Create a Supabase Project

  1. Go to supabase.com and create a new project
  2. Go to SQL Editor and run the migration in supabase/schema.sql
  3. Go to Settings β†’ API and copy:
    • Project URL β†’ NEXT_PUBLIC_SUPABASE_URL
    • anon public key β†’ NEXT_PUBLIC_SUPABASE_ANON_KEY
    • service_role secret key β†’ SUPABASE_SERVICE_ROLE_KEY

2. Deploy to Vercel

  1. Push this repo to GitHub

  2. Go to vercel.com and import the repo

  3. Add the following Environment Variables in Vercel project settings:

    Variable Value
    NEXT_PUBLIC_SUPABASE_URL Your Supabase project URL
    NEXT_PUBLIC_SUPABASE_ANON_KEY Your Supabase anon key
    SUPABASE_SERVICE_ROLE_KEY Your Supabase service role key
    APP_PASSWORD Your chosen dashboard password
    PING_CALLBACK_SECRET A random secret (generate with openssl rand -hex 32)
  4. Deploy!

3. Configure GitHub Actions

  1. In your GitHub repo, go to Settings β†’ Secrets and variables β†’ Actions

  2. Add these Repository Secrets:

    Secret Value
    VERCEL_APP_URL Your Vercel deployment URL (e.g., https://pulseguard.vercel.app)
    PING_CALLBACK_SECRET Same secret you set in Vercel
  3. The workflow at .github/workflows/ping.yml will automatically run every 5 minutes

4. Verify Everything Works

  1. Log in to your dashboard at https://your-app.vercel.app
  2. Add a URL to monitor (e.g., your Render service)
  3. Go to GitHub β†’ Actions tab β†’ Uptime Pinger β†’ Run workflow (manual trigger)
  4. Wait ~30 seconds, then refresh your dashboard β€” you should see the ping result!

Environment Variables

Variable Where Description
NEXT_PUBLIC_SUPABASE_URL Vercel Supabase project URL
NEXT_PUBLIC_SUPABASE_ANON_KEY Vercel Supabase anon/public key
SUPABASE_SERVICE_ROLE_KEY Vercel Supabase service role key (server-side only)
APP_PASSWORD Vercel Password for dashboard login
PING_CALLBACK_SECRET Vercel + GitHub Shared secret for ping callbacks
VERCEL_APP_URL GitHub Your Vercel deployment URL

API Endpoints

Method Endpoint Auth Description
GET /api/urls Session List all monitored URLs with status
POST /api/urls Session Add a new URL
PATCH /api/urls/:id Session Update URL or toggle active
DELETE /api/urls/:id Session Delete URL and its history
GET /api/urls/:id/history Session Get ping history (24h/7d/30d)
GET /api/ping-targets Public Get active URLs (for GitHub Action)
POST /api/ping-callback Bearer Token Report ping results (for GitHub Action)

Tech Stack

  • Frontend: Next.js 14+ (App Router), TypeScript, Tailwind CSS
  • Charts: Recharts
  • Database: Supabase (PostgreSQL)
  • Scheduler: GitHub Actions
  • Hosting: Vercel

Local Development

# Install dependencies
npm install

# Copy env file and fill in values
cp .env.example .env.local

# Run dev server
npm run dev

License

MIT

About

⚑ A beautiful, self-hosted uptime monitor & keep-alive pinger designed to stop free-tier services (Render, Railway, Fly.io) from sleeping. Powered by Next.js, Supabase, and GitHub Actions β€” 100% free forever! πŸš€

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages