Enterprise-grade notification management system with Pushover integration, persistent YAML storage, and REST API for cross-platform alerts.
Feature | Description |
---|---|
đą Multi-channel Delivery | Send to iOS, Android & desktop via Pushover API |
đž Persistent Storage | YAML-backed notification history with read/unread status |
đ RESTful API | Fully documented JSON API with Swagger support |
â ī¸ Priority System | Emergency (-2) to High (+2) priority levels |
đ Sound Library | 20+ built-in sounds with automatic updates |
đ File Attachments | Send images and documents with notifications |
đŠē Health Monitoring | Built-in system diagnostics endpoint |
# Clone and setup
git clone https://github.com/munirmardinli/pushover-notification.git
cd pushover-notification
npm install
Edit '.env' file:
# Server Configuration
PORT=9095
# Pushover Integration
PUSHOVER_USER_KEY=your_user_key
PUSHOVER_API_TOKEN=your_api_token
import { App } from '@munirmardinli_org/pushover-notification';
// Initialize with custom port and storage path
const app = new App(
parseInt(process.env.PORT || '9095'),
'./notifications.yaml'
);
// Start the notification service
app.start()
.then(() => console.log('Notification service running'))
.catch(err => console.error('Service failed:', err));
Method | Endpoint | Description |
---|---|---|
POST | /notifications |
Create new notification |
GET | /notifications/:recipient |
Get all notifications |
GET | /notifications/single/:id |
Get single notification |
PATCH | /notifications/:id/read |
Mark as read |
DELETE | /notifications/:id |
Delete notification |
GET | /health |
System status |
// Initialize service
const pushover = new PushoverService({
userKey: process.env.PUSHOVER_USER_KEY,
apiToken: process.env.PUSHOVER_API_TOKEN,
});
// Critical alert example
try {
const receipt = await pushover.sendNotification({
message: "Database cluster failure!",
title: "đ¨ PRODUCTION ALERT",
priority: 2, // High priority
sound: "siren",
url: "https://status.example.com",
});
console.log(`Notification sent with receipt: ${receipt}`);
} catch (error) {
console.error("Failed to send notification:", error);
}
src/
âââ services/ # Service layer
â âââ pushover.service.ts # High-level API wrapper
â âââ pushover.ts # Low-level HTTP client
âââ types/ # Type definitions
â âââ globals.ts # Shared interfaces
âââ index.ts # Express application
âââ assets/ # Persistent storage
âââ notifications.yaml # YAML data store
# Run in development mode
npx tsx watch src/index.ts
# Build production version
npx tsc
MIT License Š Munir Mardinli
MIT License
Copyright (c) 2025 Munir Mardinli
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Trademark Disclaimer: âšī¸ PushoverÂŽ is a registered trademark of Superblock, Inc. â ī¸ This project is an independent, third-party implementation:
Proper Usage Guidelines:
For official Pushover services, visit: pushover.net