New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

airhorn

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

airhorn

Cloud Notification Library

  • 0.5.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
17
decreased by-82.11%
Maintainers
1
Weekly downloads
 
Created
Source

Airhorn Logo


build release codecov license npm

Cloud Native Notifications Library

Airhorn is built to enable a more robust notification system. We focused on making it cloud native by default (using cloud services).

Features

  • GitOps Based Templating System - email, sms, mobile push, and webhooks all in one place!
  • Email Notifications - easily send email across multple providers and even load balance or active/passive fail over.
  • SMS Notifications - SMS that is easy to use via a robust template system.
  • Mobile Push Notifications - Push to IOS and Android devices.
  • Webhook Notifications - Built right into the system as a native feature with retry support.
  • 100% Code Coverage / Tested with Integration Tests
  • Built using ecto for handling multiple templates

Settings / Opts

templatePath defaultTemplateLanguage ...

Cloud Services

  • Email: Twilio Sendgrid and AWS SES
  • SMS: Twilio and AWS SNS
  • Mobile Push: Google Firebase and AWS SNS

Library API

  • Templates
  • Providers
  • send()

Examples on how to use

  • sending a simple email
const airhorn = require('airhorn');
await airhorn.send('john@doe.org', 'hello@testing.com', 'generic-template-foo', ProviderType.SMTP);
  • sending a simple webhook
  • using two email providers
  • creating a template and sending it
  • how the template forlder structure works
  • how template overrides work subject in the template

How to setup Firebase for Mobile Push

To implement Firebase in your application, you will need to create a new project in the Firebase console and integrate the Firebase SDK according to the Firebase documentation.

In your Firebase Project Settings, go to the Service accounts tab to generate your private key as a json file and put the content of the file as FIREBASE_CERT environment variable.

How to setup AWS SNS for Mobile Push

To implement AWS SNS you will need to create a new SNS application in the AWS console and integrate the AWS SNS SDK in your application.

User notification overview

  1. Obtain the credentials and device token for the mobile platforms that you want to support.
  2. Use the credentials to create a platform application object (PlatformApplicationArn) using Amazon SNS. For more information, see Creating a platform endpoint.
  3. Use the returned credentials to request a device token for your mobile app and device from the mobile platforms. The token you receive represents your mobile app and device.
  4. Use the device token and the PlatformApplicationArn to create a platform endpoint object (EndpointArn) using Amazon SNS. For more information, see Creating a platform endpoint.
  5. Send the push message to the device endpoint (EndpointArn) using airhorn.
const airhorn = require('airhorn');
await airhorn.send('endpointArn', '', 'generic-template-foo', ProviderType.MOBILE_PUSH);

How to Contribute

FAQs

Package last updated on 14 Feb 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc