# arodus/signalk-alert-center architecture

> Architecture diagram of the GitHub repository arodus/signalk-alert-center, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/arodus/signalk-alert-center
- Repository: https://github.com/arodus/signalk-alert-center

## Overview

Signal K Alert Center is a Signal K plugin for viewing alert state and history and managing durable, multi-service notification delivery. The principal flow is Signal K notification input through normalization and runtime policy into persisted alert and delivery records, then scheduled, independently retried transport sends; users inspect and configure alerts through the web interface and API. The README documents live readings, zones, snooze, quiet hours, service-health alerts, and six notification integrations. Some subsystem links are documented rather than verified in sampled implementation excerpts.

Main entry points: [`src/runtime.ts`](https://github.com/arodus/signalk-alert-center/blob/main/src/runtime.ts) (Alert runtime), [`src/transports/transport.ts`](https://github.com/arodus/signalk-alert-center/blob/main/src/transports/transport.ts) (Transport contract), [`src/delivery/scheduler.ts`](https://github.com/arodus/signalk-alert-center/blob/main/src/delivery/scheduler.ts) (Delivery scheduler), [`src/api/routes.ts`](https://github.com/arodus/signalk-alert-center/blob/main/src/api/routes.ts) (HTTP API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Plugin and interface"]
  node_plugin["Plugin bootstrap<br/>[plugin.ts]"]
  node_runtime["Alert runtime<br/>[runtime.ts]"]
  node_webapp["Alert web app<br/>[app.js]"]
  node_settings["Plugin settings"]
  node_api["HTTP API<br/>[routes.ts]"]
end

subgraph group_alerts["Alert processing"]
  node_ingestion["Notification queue<br/>[ingestion-queue.ts]"]
  node_normalize["Alert normalization<br/>[normalize.ts]"]
  node_zones["Zone definitions<br/>[zones.ts]"]
  node_policy["Alert policy<br/>[policy.ts]"]
  node_live["Live readings<br/>[live-values.js]"]
end

subgraph group_delivery["Delivery and controls"]
  node_scheduler["Delivery scheduler<br/>[scheduler.ts]"]
  node_suppression["Quiet hours and snooze<br/>[store.ts]"]
  node_connectivity["Connectivity manager<br/>[manager.ts]"]
end

subgraph group_state["Persistence"]
  node_database[("Alert and delivery store<br/>[db.ts]")]
end

subgraph group_integrations["Signal K and services"]
  node_health["Service health alerts<br/>[service-health.ts]"]
  node_transport["Transport contract<br/>[transport.ts]"]
  node_ntfy["ntfy<br/>[ntfy.ts]"]
  node_pagerduty["PagerDuty<br/>[pagerduty.ts]"]
  node_discord["Discord<br/>[discord.ts]"]
  node_telegram["Telegram<br/>[telegram.ts]"]
  node_pushover["Pushover<br/>[pushover.ts]"]
  node_wyoming["Wyoming audio<br/>[wyoming.ts]"]
end

node_operator(("Operator"))
node_signalk{{"Signal K server"}}
node_services{{"Notification services"}}

node_operator -->|"uses"| node_webapp
node_operator -->|"configures"| node_settings
node_signalk -->|"loads plugin"| node_plugin
node_plugin -->|"starts"| node_runtime
node_plugin -->|"registers routes"| node_api
node_webapp -.->|"requests data"| node_api
node_settings -.->|"sets configuration"| node_plugin
node_signalk -->|"provides alerts"| node_ingestion
node_ingestion -->|"normalizes"| node_normalize
node_runtime -->|"processes input"| node_ingestion
node_runtime -->|"applies policy"| node_policy
node_runtime -->|"loads zones"| node_zones
node_runtime -->|"records alerts"| node_database
node_runtime -->|"schedules delivery"| node_scheduler
node_runtime -->|"checks controls"| node_suppression
node_runtime -->|"checks connectivity"| node_connectivity
node_runtime -->|"publishes health"| node_health
node_runtime -->|"publishes notifications"| node_signalk
node_api -->|"reads and writes"| node_database
node_api -->|"sets snooze"| node_suppression
node_api -->|"tests service"| node_services
node_scheduler -->|"claims and records"| node_database
node_scheduler -->|"sends delivery"| node_transport
node_scheduler -.->|"respects controls"| node_suppression
node_scheduler -.->|"waits offline"| node_connectivity
node_transport -.->|"dispatches"| node_ntfy
node_transport -.->|"dispatches"| node_pagerduty
node_transport -.->|"dispatches"| node_discord
node_transport -.->|"dispatches"| node_telegram
node_transport -.->|"dispatches"| node_pushover
node_transport -.->|"dispatches"| node_wyoming
node_ntfy -->|"notifies"| node_services
node_pagerduty -->|"notifies"| node_services
node_discord -->|"notifies"| node_services
node_telegram -->|"notifies"| node_services
node_pushover -->|"notifies"| node_services
node_wyoming -->|"announces"| node_services
node_live -->|"subscribes readings"| node_signalk
node_webapp -->|"shows readings"| node_live

click node_plugin "https://github.com/arodus/signalk-alert-center/blob/main/src/plugin.ts"
click node_runtime "https://github.com/arodus/signalk-alert-center/blob/main/src/runtime.ts"
click node_webapp "https://github.com/arodus/signalk-alert-center/blob/main/public/app.js"
click node_settings "https://github.com/arodus/signalk-alert-center/blob/main/src/configpanel/PluginConfigurationPanel.jsx"
click node_api "https://github.com/arodus/signalk-alert-center/blob/main/src/api/routes.ts"
click node_ingestion "https://github.com/arodus/signalk-alert-center/blob/main/src/signalk/ingestion-queue.ts"
click node_normalize "https://github.com/arodus/signalk-alert-center/blob/main/src/alerts/normalize.ts"
click node_zones "https://github.com/arodus/signalk-alert-center/blob/main/src/alerts/zones.ts"
click node_policy "https://github.com/arodus/signalk-alert-center/blob/main/src/alerts/policy.ts"
click node_live "https://github.com/arodus/signalk-alert-center/blob/main/public/live-values.js"
click node_database "https://github.com/arodus/signalk-alert-center/blob/main/src/storage/db.ts"
click node_scheduler "https://github.com/arodus/signalk-alert-center/blob/main/src/delivery/scheduler.ts"
click node_suppression "https://github.com/arodus/signalk-alert-center/blob/main/src/suppression/store.ts"
click node_connectivity "https://github.com/arodus/signalk-alert-center/blob/main/src/connectivity/manager.ts"
click node_health "https://github.com/arodus/signalk-alert-center/blob/main/src/signalk/service-health.ts"
click node_transport "https://github.com/arodus/signalk-alert-center/blob/main/src/transports/transport.ts"
click node_ntfy "https://github.com/arodus/signalk-alert-center/blob/main/src/transports/ntfy.ts"
click node_pagerduty "https://github.com/arodus/signalk-alert-center/blob/main/src/transports/pagerduty.ts"
click node_discord "https://github.com/arodus/signalk-alert-center/blob/main/src/transports/discord.ts"
click node_telegram "https://github.com/arodus/signalk-alert-center/blob/main/src/transports/telegram.ts"
click node_pushover "https://github.com/arodus/signalk-alert-center/blob/main/src/transports/pushover.ts"
click node_wyoming "https://github.com/arodus/signalk-alert-center/blob/main/src/transports/wyoming.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_plugin,node_runtime,node_webapp,node_settings,node_api toneBlue
class node_ingestion,node_normalize,node_zones,node_policy,node_live toneAmber
class node_scheduler,node_suppression,node_connectivity,node_signalk toneMint
class node_database toneRose
class node_health,node_transport,node_ntfy,node_pagerduty,node_discord,node_telegram,node_pushover,node_wyoming,node_operator,node_services toneIndigo
```

## Components

### Plugin and interface

- [Plugin bootstrap](https://github.com/arodus/signalk-alert-center/blob/main/src/plugin.ts): `src/plugin.ts`
- [Alert runtime](https://github.com/arodus/signalk-alert-center/blob/main/src/runtime.ts): `src/runtime.ts`
- [Alert web app](https://github.com/arodus/signalk-alert-center/blob/main/public/app.js): `public/app.js`
- [Plugin settings](https://github.com/arodus/signalk-alert-center/blob/main/src/configpanel/PluginConfigurationPanel.jsx): `src/configpanel/PluginConfigurationPanel.jsx`
- [HTTP API](https://github.com/arodus/signalk-alert-center/blob/main/src/api/routes.ts): `src/api/routes.ts`

### Alert processing

- [Notification queue](https://github.com/arodus/signalk-alert-center/blob/main/src/signalk/ingestion-queue.ts): `src/signalk/ingestion-queue.ts`
- [Alert normalization](https://github.com/arodus/signalk-alert-center/blob/main/src/alerts/normalize.ts): `src/alerts/normalize.ts`
- [Zone definitions](https://github.com/arodus/signalk-alert-center/blob/main/src/alerts/zones.ts): `src/alerts/zones.ts`
- [Alert policy](https://github.com/arodus/signalk-alert-center/blob/main/src/alerts/policy.ts): `src/alerts/policy.ts`
- [Live readings](https://github.com/arodus/signalk-alert-center/blob/main/public/live-values.js): `public/live-values.js`

### Delivery and controls

- [Delivery scheduler](https://github.com/arodus/signalk-alert-center/blob/main/src/delivery/scheduler.ts): `src/delivery/scheduler.ts`
- [Quiet hours and snooze](https://github.com/arodus/signalk-alert-center/blob/main/src/suppression/store.ts): `src/suppression/store.ts`
- [Connectivity manager](https://github.com/arodus/signalk-alert-center/blob/main/src/connectivity/manager.ts): `src/connectivity/manager.ts`

### Persistence

- [Alert and delivery store](https://github.com/arodus/signalk-alert-center/blob/main/src/storage/db.ts): `src/storage/db.ts`

### Signal K and services

- [Service health alerts](https://github.com/arodus/signalk-alert-center/blob/main/src/signalk/service-health.ts): `src/signalk/service-health.ts`
- [Transport contract](https://github.com/arodus/signalk-alert-center/blob/main/src/transports/transport.ts): `src/transports/transport.ts`
- [ntfy](https://github.com/arodus/signalk-alert-center/blob/main/src/transports/ntfy.ts): `src/transports/ntfy.ts`
- [PagerDuty](https://github.com/arodus/signalk-alert-center/blob/main/src/transports/pagerduty.ts): `src/transports/pagerduty.ts`
- [Discord](https://github.com/arodus/signalk-alert-center/blob/main/src/transports/discord.ts): `src/transports/discord.ts`
- [Telegram](https://github.com/arodus/signalk-alert-center/blob/main/src/transports/telegram.ts): `src/transports/telegram.ts`
- [Pushover](https://github.com/arodus/signalk-alert-center/blob/main/src/transports/pushover.ts): `src/transports/pushover.ts`
- [Wyoming audio](https://github.com/arodus/signalk-alert-center/blob/main/src/transports/wyoming.ts): `src/transports/wyoming.ts`

### Other components

- **Operator**
- **Signal K server**
- **Notification services**

## Connections

- Operator → Alert web app: uses (evidence: `README.md`)
- Operator → Plugin settings: configures (evidence: `README.md`)
- Signal K server → Plugin bootstrap: loads plugin (evidence: `src/plugin.ts`)
- Plugin bootstrap → Alert runtime: starts (evidence: `src/plugin.ts`)
- Plugin bootstrap → HTTP API: registers routes (evidence: `src/plugin.ts`)
- Alert web app → HTTP API: requests data
- Plugin settings → Plugin bootstrap: sets configuration
- Signal K server → Notification queue: provides alerts (evidence: `src/signalk/ingestion-queue.ts`)
- Notification queue → Alert normalization: normalizes (evidence: `src/signalk/ingestion-queue.ts`)
- Alert runtime → Notification queue: processes input (evidence: `src/runtime.ts`)
- Alert runtime → Alert policy: applies policy (evidence: `src/runtime.ts`)
- Alert runtime → Zone definitions: loads zones (evidence: `src/runtime.ts`)
- Alert runtime → Alert and delivery store: records alerts (evidence: `src/runtime.ts`)
- Alert runtime → Delivery scheduler: schedules delivery (evidence: `src/runtime.ts`)
- Alert runtime → Quiet hours and snooze: checks controls (evidence: `src/runtime.ts`)
- Alert runtime → Connectivity manager: checks connectivity (evidence: `src/runtime.ts`)
- Alert runtime → Service health alerts: publishes health (evidence: `src/runtime.ts`)
- Alert runtime → Signal K server: publishes notifications (evidence: `src/runtime.ts`)
- HTTP API → Alert and delivery store: reads and writes (evidence: `src/api/routes.ts`)
- HTTP API → Quiet hours and snooze: sets snooze (evidence: `src/api/routes.ts`)
- HTTP API → Notification services: tests service (evidence: `src/api/routes.ts`)
- Delivery scheduler → Alert and delivery store: claims and records (evidence: `src/delivery/scheduler.ts`)
- Delivery scheduler → Transport contract: sends delivery (evidence: `src/delivery/scheduler.ts`)
- Delivery scheduler → Quiet hours and snooze: respects controls
- Delivery scheduler → Connectivity manager: waits offline
- Transport contract → ntfy: dispatches
- Transport contract → PagerDuty: dispatches
- Transport contract → Discord: dispatches (evidence: `src/transports/discord.ts`)
- Transport contract → Telegram: dispatches (evidence: `src/transports/telegram.ts`)
- Transport contract → Pushover: dispatches (evidence: `src/transports/pushover.ts`)
- Transport contract → Wyoming audio: dispatches (evidence: `src/transports/wyoming.ts`)
- ntfy → Notification services: notifies (evidence: `README.md`)
- PagerDuty → Notification services: notifies (evidence: `README.md`)
- Discord → Notification services: notifies (evidence: `README.md`)
- Telegram → Notification services: notifies (evidence: `README.md`)
- Pushover → Notification services: notifies (evidence: `README.md`)
- Wyoming audio → Notification services: announces (evidence: `README.md`)
- Live readings → Signal K server: subscribes readings (evidence: `README.md`)
- Alert web app → Live readings: shows readings (evidence: `README.md`)
