Skip to content

developerKRD/status.developer.krd

Repository files navigation

developer.krd

status.developer.krd

Real-time status monitoring for all developer.krd services

Live SiteQuick StartConfigurationDeployment


Node License Uptime

Features

  • Real-time monitoring — checks all configured services at a set interval
  • 90-day uptime history — visual day-by-day status bars with hover tooltips
  • Uptime percentages — 24h / 7d / 30d / 90d breakdowns per service
  • Service categories — group services (Websites, APIs, Services, etc.)
  • Click-to-detail modal — expanded stats and history per service
  • Response time sparklines — inline SVG charts per service
  • Animated UI — interactive grid background, glassmorphism, scroll reveals
  • Auto-refresh — page refreshes data every 60 seconds
  • Auto-purge — records beyond 90 days are cleaned automatically
  • Config-driven — add/remove sites via a single JSON file, no restart needed
  • SEO optimized — Open Graph, Twitter Cards, JSON-LD, sitemap, robots.txt
  • PWA ready — web manifest, icons, installable

Tech Stack

Component Technology
Backend Node.js + Express
Database SQLite (better-sqlite3)
Frontend Vanilla HTML/CSS/JS (single-page)
Monitoring Cron-based checker script
Process Manager PM2
Reverse Proxy Nginx
SSL Let's Encrypt (Certbot)

Quick Start

1. Clone the repository

git clone https://github.com/developer-krd/status.developer.krd.git
cd status.developer.krd

2. Install dependencies

npm install

3. Create your config

cp config.example.json config.json

Edit config.json to add your services (see Configuration).

4. Initialize the database

npm run setup

5. Run the first check

npm run check

6. Start the server

npm run serve

The status page will be available at http://localhost:3110.


Configuration

All services are managed in config.json. Changes are picked up automatically — no restart needed.

Adding a service

Add an entry to the services array:

{
  "name": "My Service",
  "url": "https://myservice.example.com",
  "description": "Short description",
  "category": "Websites",
  "expected_status": 200
}

Removing a service

Remove the entry from config.json. On the next check run, all historical data for that service will be purged automatically.

Config reference

site — Branding

Field Description
name Site title
description Meta description
url Canonical URL
logo Path to logo image
brand_color Primary brand color

settings — Behavior

Field Default Description
check_interval_minutes 5 How often checks run (must match cron)
history_days 90 Days of history to retain
timeout_seconds 10 HTTP timeout per check
retry_count 2 Retries on failure
timezone Asia/Baghdad Display timezone

services[] — Monitored endpoints

Field Description
name Display name (unique)
url Full URL to check
description Short description
category Grouping label
expected_status Expected HTTP status code

Deployment

Cron job (automated checks)

crontab -e

Add:

*/5 * * * * cd /path/to/status.developer.krd && /usr/bin/node checker.js >> data/checker.log 2>&1

PM2 (process manager)

npm install -g pm2
pm2 start server.js --name status-page
pm2 save
pm2 startup

Nginx (reverse proxy)

server {
    listen 443 ssl;
    server_name status.developer.krd;

    ssl_certificate /etc/letsencrypt/live/status.developer.krd/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/status.developer.krd/privkey.pem;

    location / {
        proxy_pass http://127.0.0.1:3110;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

server {
    listen 80;
    server_name status.developer.krd;
    return 301 https://$host$request_uri;
}

SSL (Let's Encrypt)

sudo certbot --nginx -d status.developer.krd

Project Structure

status.developer.krd/
├── config.example.json   # Template config (committed)
├── config.json           # Your config (gitignored)
├── checker.js            # Cron-based HTTP status checker
├── server.js             # Express API + static file server
├── setup.js              # SQLite database initializer
├── package.json
├── crontab.txt           # Cron job template
├── .gitignore
├── LICENSE
├── data/                 # Runtime data (gitignored)
│   ├── status.db         # SQLite database
│   └── checker.log       # Check logs
└── public/               # Frontend assets
    ├── index.html        # Single-page application
    ├── logo.png          # Site logo
    ├── og-image.png      # Social preview image
    ├── manifest.json     # PWA manifest
    ├── robots.txt        # Search engine directives
    ├── sitemap.xml       # Sitemap
    ├── favicon.ico       # Favicon
    └── ...               # Other icon sizes

API Endpoints

Endpoint Description
GET /api/config Public site config and service list
GET /api/status Current status of all services
GET /api/history/:name? 90-day aggregated history
GET /api/uptime Uptime percentages (24h/7d/30d/90d)

License

MIT © developer.krd

Contributors