feat: status pages with custom domains, tls, themes and export (M7) #55

Merged
Sebi merged 10 commits from feat/m7-statuspages into main 2026-11-22 09:41:12 +00:00
10 Commits
Author SHA1 Message Date
Sebastian UnterschützandClaude Opus 5.5 6e2f8d0626 feat(statuspage): keep serving status pages while the api is down
Snapshots are persisted to UPTIME_STATUSPAGE_CACHE_DIR and loaded at
start, so pages survive restarts during an outage. Cached pages are
answered without waiting for the API, refreshed in the background and
served for as long as the API stays unreachable, with a notice once they
are older than five minutes. Only an explicit not found from the API
removes a page. Readiness no longer depends on the API when pages are
cached, the server starts without a reachable API, and certificates are
mirrored locally so HTTPS keeps working after a restart.

Closes #56

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-22 09:05:20 +01:00
Sebastian UnterschützandClaude Opus 5.5 20664dd5dd fix(schedule): decide and prune in one step during reconciliation
The previous fix read upsert times once and pruned later, so monitors
created in between were still dropped. A Lua script now checks the
upsert time and removes the entry atomically.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-22 09:05:20 +01:00
Sebastian UnterschützandClaude Opus 5.5 e6c3deb54d fix(api): report a page as degraded unless every component is down
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-22 08:55:39 +01:00
Sebastian UnterschützandClaude Opus 5.5 4d1db0943e feat(statuspage): obtain tls certificates on demand for custom domains
With UPTIME_STATUSPAGE_TLS the server serves HTTPS with ACME
certificates for its hosts and for verified custom domains of pages it
may serve, shared by all instances through the API. Plain HTTP answers
ACME challenges and health checks and redirects everything else.

Closes #22

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-22 08:54:08 +01:00
Sebastian UnterschützandClaude Opus 5.5 46f1f82481 feat(api): give status page servers sealed key-value storage
Certificates and ACME keys are stored encrypted in the database,
namespaced per owner so an organization's servers cannot read platform
or other organizations' keys. Locks live in Redis and expire.

Refs #22

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-22 08:54:08 +01:00
Sebastian UnterschützandClaude Opus 5.5 f52ae33cf0 test: print api logs when UPTIME_TEST_LOG is set
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-22 08:48:10 +01:00
Sebastian UnterschützandClaude Opus 5.5 4f57cafbdd fix(schedule): keep monitors created while reconciliation reads the database
Reconciliation removed every monitor missing from its database read,
including ones created in the meantime; they stayed unscheduled until
the next run a minute later. Upserts now record when they happened and
reconciliation only prunes entries older than its read.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-22 08:48:10 +01:00
Sebastian UnterschützandClaude Opus 5.5 a6126b353e feat(api): manage status pages with themes, custom domains and export
Organizations build pages from their monitors, grouped into sections
with public names, choose an accent color, logo and CSS, verify custom
domains with a TXT record and export a page as one self-contained HTML
file. Assignments scoped to a single status page are honored.

Closes #21
Closes #23
Closes #24

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-22 08:39:00 +01:00
Sebastian UnterschützandClaude Opus 5.5 2b72715a9d feat(statuspage): serve public status pages from api snapshots
Pages render without JavaScript, are matched by verified custom domain
or by slug, and stay available from a stale snapshot for ten minutes if
the API is unreachable. Snapshots contain no targets or error details.

Refs #21, #22

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-22 08:39:00 +01:00
Sebastian UnterschützandClaude Opus 5.5 d820547e8c feat(store): add status pages and their components
Composite foreign keys keep pages from listing monitors of other
organizations, independent of row-level security.

Refs #21

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
2026-11-22 08:39:00 +01:00