Configuration file
Every setting accepted by heyoStatus(), its default and where it is read.
heyo-status.config.ts in the project root is the single source of truth. The
CLI loads it from that path, the framework routes import it, the deployment
overlays reference it, and the scheduler reads its cron expressions. Keep one
file; do not maintain a second configuration for the build.
heyoStatus() validates the object as the module loads, applies defaults and
returns a StatusPage. Misspelled keys and wrongly shaped values throw
immediately rather than being silently ignored — every section of the schema
is strict().
The CLI accepts either. Generated templates export both so that
import { statusPage } and heyo-status check run work from the same file.
Top-level settings
| Setting | Type | Default | Purpose |
|---|---|---|---|
database | StatusDatabaseAdapter | required | Persistence. SQLite, D1, PostgreSQL or your own implementation. |
title | string | "Heyo Status" | Metadata, feed and notification name. Not header text. |
description | string | "Real-time service status and uptime." | Page and feed description. |
siteUrl | string | — | Canonical HTTP(S) base URL. No query string or fragment. |
basePath | string | "/api/heyo-status" | Mount point of the catch-all route; stripped before routing. |
adminToken | string | HEYO_STATUS_API_TOKEN | Bearer token for /admin/*. |
theme | "slate" | "fern" | "onyx" | "dune" | "reed" | "slate" | Bundled layout and its tokens. |
colors | { primary?, secondary? } | {} | CSS colour overrides applied as tokens. |
mode | "system" | "light" | "dark" | "system" | Initial colour mode. |
branding | { name?, logo? } | {} | Header logo and optional label beside it. |
monitors | StatusMonitorConfig[] | [] | What to check. Names must be unique. |
checks | object | see below | Schedule, retention and the displayed window. |
notifications | object | see below | Failure threshold and channels. |
incidents | { enabled } | { enabled: true } | Incident API, feeds and automatic incidents. |
maintenance | { enabled } | { enabled: true } | Maintenance API and alert suppression. |
metrics | object | see below | What the UI shows, plus badges and Prometheus. |
subscribers | object | { enabled: false, … } | Public subscriptions. |
cache | { snapshotTtlMs } | { snapshotTtlMs: 30000 } | In-process snapshot cache lifetime. |
telemetry | boolean | { enabled, endpoint } | enabled | Anonymous adoption ping. |
Nested defaults
Each nested object is merged with its defaults, so you only set what differs.
interval "*/5 * * * *" · retentionDays 90 · displayDays 90 ·
summaryCron "10 0 * * *" · cleanupCron "0 3 * * *".
displayDays may not exceed retentionDays.
See Checks and scheduling.
failureThreshold 3 · channels []. Channel ids must be unique.
See Notifications.
showLatency true · showLatencyChart true · showUptimePercent
true · uptimePeriods ["24h","7d","30d","90d"] · badges true ·
prometheus false.
See Metrics and badges.
enabled false · methods ["email","rss"] · requireConfirmation
true. webhook is never enabled implicitly.
See Subscribers.
snapshotTtlMs 30000, between 0 (disabled) and 3600000.
enabled true · endpoint "https://telemetry.heyo.sh/v1/status".
See Telemetry.
A complete example
What heyoStatus() returns
The returned object is the validated configuration with three non-enumerable runtime properties attached, so it still serialises cleanly:
The whole HTTP surface. It strips basePath from the incoming URL, so one
catch-all route serves every endpoint.
getSnapshot(now?), listMonitors(now?), getMonitor(name, now?) and
invalidate(). Reads share the snapshot cache with the HTTP routes.
runChecks(now?), summarize(now?) and cleanup(now?) — the three jobs a
scheduler calls.
Environment variables
| Variable | Read by | Purpose |
|---|---|---|
HEYO_STATUS_API_TOKEN | /admin/* middleware | Fallback admin bearer token. |
HEYO_STATUS_CONFIG | CLI | Default configuration path. |
HEYO_STATUS_DB_PATH | generated SQLite adapter | SQLite file location. |
DATABASE_URL | generated PostgreSQL adapter | PostgreSQL connection string. |
CRON_SECRET | vercelCronHandler | Bearer secret for Vercel cron routes. |
HEYO_TELEMETRY_DISABLED | telemetry | Opt out of the anonymous ping. |
DO_NOT_TRACK, CI | telemetry | Also disable telemetry. |
PORT | heyo-status dev standalone server | Port when no framework command is passed. |
Validation rules that surprise people
basePathmust start with/, must not be"/", must not contain//, a query string or a fragment. Trailing slashes are trimmed.siteUrlmust be HTTP(S) with no query string or fragment. A trailing slash is removed.checks.displayDayscannot exceedchecks.retentionDays: the page cannot display history the cleanup job has already deleted.- Monitor names must be unique, and a
compositemonitor may only reference monitors that actually perform a check. notifications.channelscannot contain two channels with the sameid.metrics.uptimePeriodsandsubscribers.methodscannot contain duplicates.