Skip to content

feat: add Bark webhook notification support - #628

Open
thedavidweng wants to merge 1 commit into
TheNetsky:v4from
thedavidweng:feat/bark-webhook
Open

thedavidweng wants to merge 1 commit into
TheNetsky:v4from
thedavidweng:feat/bark-webhook

Conversation

@thedavidweng

Copy link
Copy Markdown

Resolves #627

Summary

Adds native support for Bark, an open-source iOS push notification service. It supports both the official cloud service (https://api.day.app) and self-hosted bark-server instances.

Key Changes

  • Webhook Dispatcher (src/logging/Bark.ts):
    • Implements sendBark and flushBarkQueue using p-queue for concurrency and rate control, matching the existing Ntfy.ts and Telegram.ts patterns.
    • Automatically handles target endpoint resolution (/push) and payload formatting (device_key, title, body, group, icon, sound, level).
    • Automatically sets interruption level to timeSensitive for error logs and active for warnings if not explicitly overridden.
  • Config & Validation:
    • Adds WebhookBarkConfig interface to src/interface/Config.ts.
    • Adds bark schema validation to src/util/Validator.ts.
    • Adds Docker environment variable overrides (CONFIG_BARK_*) to src/util/ConfigEnvOverrides.ts.
    • Adds bark configuration template in config.example.json.
  • Process Orchestration & IPC:
    • Integrates sendBark into src/logging/Logger.ts for primary process log dispatch.
    • Forwards worker IPC logs to sendBark in src/index.ts.
    • Adds flushBarkQueue into flushAllWebhooks during graceful shutdown.
  • API Dashboard & Security:
    • Adds bark validation to scripts/api/configEditor.js.
    • Masks sensitive deviceKey and url fields in scripts/api/lib.js (redactSecrets).
  • Documentation:
    • Updates README.md webhook settings table and filter warning notes.

Verification

  • Verified push delivery against a self-hosted bark-server instance and verified alert arrival on iOS.
  • Ran and passed npm run lint, npm run format:check, npm run build, and npm run test:log-parser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Add Bark webhook notifications support

1 participant