Skip to content

calternal-plugin-notifications

Web push and the in-app inbox for calternal.

The Index stores inbox items and push subscriptions. The PWA receives only the VAPID public key. Producers use the typed hook from calternal-plugin; this Plugin writes those events before it queues any push delivery.

Source: crates/plugins/notifications/src/lib.rs

pub async fn initialize(
db: Db,
root: Root,
public_url: &str,
) -> Result<(), Box<dyn std::error::Error>>

Prepare VAPID keys and install the typed durable publish hook.

Call this after migrations() and before the Plugin registry is built. The private key is stored in the Index secret table and remains in process memory only for signing push messages.

Source: crates/plugins/notifications/src/lib.rs:58

pub fn migrations() -> MigrationSet

Create the Notifications Index tables.

Source: crates/plugins/notifications/src/store.rs:29