A single repository that bundles the Gin/SQLite backend API together with the immersive Vite + React dashboard. The backend now performs automated HTTP health checks for every monitor entry and the frontend consumes that live telemetry without any manual status toggling.
UselessMonitor/
├── backend/ # Go + Gin API server
├── frontend/ # Vite + React single-page dashboard
└── README.md # You are here
- location:
backend/ - language: Go 1.21+
- features:
- Key-based read/admin access using
READ_KEYandADMIN_KEYheaders. - Monitor records include HTTP endpoint metadata and the last response metrics.
- A background worker issues HTTP GET probes on a configurable interval (
CHECK_INTERVAL_SECONDS, default 30s) and updates the monitor status (HEALTHY,DEGRADED,UNHEALTHY,UNKNOWN). GET /monitorandGET /statusare safe for read-only keys, whilePOST/PUT/DELETE /monitorrequire the admin key.
- Key-based read/admin access using
See backend/README.md for environment variables and the complete API description.
- location:
frontend/ - language: TypeScript + React 19, built with Vite 6.
- features:
- Real-time console that renders the backend monitor list, response codes, and last contact timestamp.
- HTTP status is now fully automated — the UI can no longer toggle statuses manually.
- Admin mode allows creating or editing monitors by providing the name, sector/type, and monitored URL; deletion is also available when the admin key is provided.
- Bilingual UI (English/Chinese) and ambient sci-fi visual treatments.
Configuration instructions (copying frontend/public/config.example.json to frontend/public/config.json) and npm scripts live in
frontend/README.md.
- Start the backend API:
cd backend go run .
- Start the frontend dev server in a separate shell:
cd frontend npm install npm run dev - Update
frontend/public/config.jsonso the dashboard knows which backend URL and read key to use.
Both services are intentionally lightweight so they can be deployed together or independently depending on your infrastructure.