

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
Examples on how to use
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
- Obtain the credentials and device token for the mobile platforms that you want to support.
- Use the credentials to create a platform application object (PlatformApplicationArn) using Amazon SNS. For more information, see Creating a platform endpoint.
- 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.
- 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.
- 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