No description
  • TypeScript 58.1%
  • CSS 30.4%
  • JavaScript 11.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Lucy Ada Randall 4be8105b70
Some checks failed
StatusFlare CI/CD / build (push) Failing after 3s
StatusFlare CI/CD / deploy (push) Has been skipped
fix it
Signed-off-by: Lucy Ada Randall <[email protected]>
2026-09-03 12:25:39 -07:00
.forgejo/workflows update the linting 2026-09-02 19:45:51 -07:00
.vscode update the linting 2026-09-02 19:45:51 -07:00
migrations feat: deduplicate status_db and add rate limiting for DB-write APIs 2026-09-01 23:27:29 -07:00
public fix it 2026-09-03 12:25:39 -07:00
scripts fix it 2026-09-03 12:25:39 -07:00
src fix it 2026-09-03 12:25:39 -07:00
test feat: migrate D1 status_db to MongoDB Atlas (native driver >=6.15.0, nodejs_compat + nodejs_als) 2026-09-02 11:56:31 -07:00
.dev.vars.example fix it 2026-09-03 12:25:39 -07:00
.editorconfig refactor: modularize index.ts into focused services and utilities 2026-06-20 13:32:20 -07:00
.gitignore update the linting 2026-09-02 19:45:51 -07:00
.npmrc even further 2026-03-21 06:22:09 -07:00
.prettierrc Restructure project: Move worker to repository root 2026-03-10 00:53:14 -07:00
.prettierrc.js chore: replace gts with prettier for formatting/linting 2026-09-02 19:17:40 -07:00
_subdomains.json update the linting 2026-09-02 19:45:51 -07:00
AGENTS.md fix it 2026-09-03 12:25:39 -07:00
eslint.config.js chore: replace gts with prettier for formatting/linting 2026-09-02 19:17:40 -07:00
eslint.ignores.js refactor: modularize index.ts into focused services and utilities 2026-06-20 13:32:20 -07:00
favicon.ico Initial commit: Implement StatusFlare worker with D1 and Admin Panel 2026-03-09 22:37:32 -07:00
package.json fix it 2026-09-03 12:25:39 -07:00
pnpm-lock.yaml update the linting 2026-09-02 19:45:51 -07:00
pnpm-workspace.yaml update the linting 2026-09-02 19:45:51 -07:00
README.md update the linting 2026-09-02 19:45:51 -07:00
schema.sql feat: deduplicate status_db and add rate limiting for DB-write APIs 2026-09-01 23:27:29 -07:00
seed.sql feat: add Romm service with retroarch icon and fix ServiceIcon fallback chain 2026-08-02 02:18:14 -07:00
status.svg SVG Upgrade: Convert status.svg to a dynamic template 2026-03-10 02:05:24 -07:00
tsconfig.json feat: migrate D1 status_db to MongoDB Atlas (native driver >=6.15.0) 2026-09-02 19:41:00 -07:00
vitest.config.mts feat: migrate D1 status_db to MongoDB Atlas (native driver >=6.15.0) 2026-09-02 19:41:00 -07:00
worker-configuration.d.ts fix it 2026-09-03 12:25:39 -07:00
wrangler.jsonc chore: remove D1 binding after MongoDB Atlas migration verified 2026-09-02 19:56:09 -07:00
wrangler.test.jsonc feat: migrate D1 status_db to MongoDB Atlas (native driver >=6.15.0) 2026-09-02 19:41:00 -07:00

StatusFlare 🛰️

StatusFlare is a lightweight, edge-hosted system health monitoring dashboard built on Cloudflare Workers and D1 Database. It provides real-time monitoring, incident management, and dynamic status badges with zero infrastructure overhead.

This is useful for the following usecases:

  • You want a FOSS solution for a system health deashboard, but you don't want to host it yourself.
  • You want to be sure of your service's public availability, but you don't want to pay companies that you don't trust.
  • You want a system health dashboard with discord webhook capabilities, a smooth default theme, and highly customizable interface that integrates with your current stack
  • all of the above.

Status Dashboard

Features

  • Edge-native: Powered by Cloudflare Workers for global availability and high performance.
  • Automated Health Checks: Scheduled monitoring via Cron triggers (default: every minute).
  • Real-time Dashboard: A beautiful, responsive HTML dashboard with Light/Dark mode (Catppuccin theme).
  • Incident Management: Create, manage, and resolve system-wide or service-specific incidents.
  • Detailed Insights: View average latency, recent uptime percentages, and full response snippets.
  • Dynamic SVG Badges: Embeddable status dots for your READMEs or websites (e.g., /badge/My%20Service.svg).
  • D1 Persistence: All data—services, health history, and incidents—is stored in Cloudflare's D1 SQL database.
  • Admin Panel: Secure management interface with support for OIDC (Authelia) and legacy password login.
  • Smart Parsing: Automatically prettifies JSON and GraphQL responses in the service detail view.
  • Email Notifications: Integrated with Mailgun to send alerts when services go down or incidents are created/resolved.

🚀 Quick Start

Forking / Redistribution

This repo contains personal configuration (domains, emails, an admin password hash). Before publishing a fork, remove it:

pnpm clean:repo   # replaces personal values with placeholders, deletes personal-only files

The only personal values remaining afterward are inside scripts/cleanup.mjs itself (its replacement table).

Fresh Deployment

New operators configure everything interactively (domain, notification email, admin auth — password or Authelia — plus optional Mailgun/Discord secrets, D1 creation, and local setup):

pnpm setup

An admin password or Authelia client ID + secret is required; all other inputs are optional.

Prerequisites

Setup

  1. Clone the repository:

    git clone https://github.com/yourusername/statusflare.git
    cd statusflare
    
  2. Install dependencies:

    pnpm install
    
  3. Create your D1 Database:

    pnpm exec wrangler d1 create status_db
    

    Copy the database_id from the output and update it in your wrangler.jsonc.

  4. Initialize the database schema:

    pnpm exec wrangler d1 execute status_db --file=schema.sql
    
  5. Set required secrets:

    # Used for JWT session signing
    pnpm exec wrangler secret put SESSION_SECRET
    
    # Optional: For legacy password login (SHA-256 hash)
    pnpm exec wrangler secret put ADMIN_PASSWORD_HASH
    
    # Email Alerts (Mailgun)
    pnpm exec wrangler secret put MAILGUN_API_KEY
    
  6. Configure Mailgun Variables: Update your wrangler.jsonc with your Mailgun domain and recipient email:

    {
    	"vars": {
    		"MAILGUN_DOMAIN": "mg.yourdomain.com",
    		"MAILGUN_FROM": "StatusFlare <[email protected]>",
    		"NOTIFICATION_EMAIL": "[email protected]",
    	},
    }
    
  7. Deploy to Cloudflare:

    pnpm deploy
    

🛠️ Configuration

Edit wrangler.jsonc to configure your custom domain, OIDC provider (e.g., Authelia), and other environment variables:

{
	"vars": {
		"AUTHELIA_ISSUER": "https://auth.example.com",
		"AUTHELIA_CLIENT_ID": "statusflare",
		"OIDC_REDIRECT_URI": "https://status.example.com/admin/callback",
	},
}

📈 Usage

  • Dashboard: https://your-status-page.com/
  • Admin Panel: https://your-status-page.com/admin
  • JSON API: https://your-status-page.com/api/status
  • SVG Badges: https://your-status-page.com/badge/Service%20Name.svg?w=128&h=128

🧪 Development & Testing

Run local development server:

pnpm dev

Run the test suite (Vitest + Cloudflare Workers Pool):

pnpm test

📄 License

MIT