# @notifire/core

> Notification Management Framework

Latest version **0.3.6-alpha.0** (published 2021-12-28) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @notifire/core
pnpm add @notifire/core
yarn add @notifire/core
bun add @notifire/core
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.3.6-alpha.0 |
| Published | 2021-12-28 |
| First published | 2021-09-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=10 |
| Dependencies | 3 |
| Unpacked size | 109.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 40003 |
| Maintainers | scopsy |

## Links

- npm: https://www.npmjs.com/package/@notifire/core
- Repository: https://github.com/notifirehq/notifire
- Homepage: https://github.com/notifirehq/notifire#readme
- Issues: https://github.com/notifirehq/notifire/issues
- npm.io page: https://npm.io/package/@notifire/core

## Dependencies (3)

- [handlebars](https://npm.io/package/handlebars.md) ^4.7.7
- [lodash.get](https://npm.io/package/lodash.get.md) ^4.4.2
- [lodash.merge](https://npm.io/package/lodash.merge.md) ^4.6.2

## Recent versions

- 0.3.6-alpha.0 (latest) — 2021-12-28
- 0.3.4 — 2021-12-24
- 0.3.3 — 2021-12-16
- 0.3.2-alpha.5 — 2021-12-15
- 0.3.2-alpha.4 — 2021-12-15
- 0.3.2-alpha.3 — 2021-12-15
- 0.3.2-alpha.0 — 2021-12-15
- 0.2.5 — 2021-11-05
- 0.2.4 — 2021-10-30
- 0.2.3 — 2021-10-20
- 0.2.2 — 2021-10-20
- 0.1.4 — 2021-09-29
- 0.1.1 — 2021-09-09
- 0.1.0 — 2021-09-09
- 0.0.3 — 2021-09-02
- … 1 more at https://npm.io/package/@notifire/core/versions

## README

<p align="center">
  <a href="https://discord.gg/9wcGSf22PM">
    <img src="https://user-images.githubusercontent.com/8877285/139603641-66966234-84f4-42aa-9c31-9d296fab7ba1.png">
  </a>
<p align="center">Read <a href="https://github.com/notifirehq/notifire/discussions/70">here</a> our plans for the upcoming weeks.</p>

</p>
<p align="center">
  <a href="https://notifire.co">
    <img width="200" src="https://uploads-ssl.webflow.com/6130b4d29bb0ab09e14ae9ee/6130e6931f755df302203fcc_SideLogo%20-%20BLack-p-800.png">
  </a>
</p>
<h1 align="center">Notification management simplified.</h1>

<div align="center">
The ultimate library for managing multi-channel notifications with a single API. 
</div>

  <p align="center">
    <br />
    <a href="https://docs.notifire.co"><strong>Explore the docs »</strong></a>
    <br />
  <br/>
    <a href="https://github.com/notifirehq/notifire/issues">Report Bug</a>
    ·
    <a href="https://github.com/notifirehq/notifire/discussions">Request Feature</a>
    ·
    <a href="https://blog.notifire.co/">Read our blog</a>
  </p>
  
## ⭐️ Why
Building a notification system is hard, at first it seems like just sending an email but in reality it's just the beginning. In today's world users expect multi channel communication experience over email, sms, push, direct and more... An ever growing list of providers are popping up each day, and notifications are spread around the code. Notifire's goal is to simplify notifications and provide developers the tools to create meaningful communication between the system and it's users.

## ✨ Features

- 🌈 Single API for all messaging providers (Email, SMS, Push, Direct)
- 💅 Easily manage notification over multiple channels
- 🚀 Equipped with a templating engine for advanced layouts and designs 
- 🛡 Built-in protection for missing variables
- 📦 Easy to set up and integrate
- 🛡 Written in TypeScript with predictable static types.
- 👨‍💻 Community driven

## 📦 Install

```bash
npm install @notifire/core
```

```bash
yarn add @notifire/core
```

## 🔨 Usage

```ts
import { Notifire, ChannelTypeEnum } from '@notifire/core';
import { SendgridEmailProvider } from '@notifire/sendgrid';

const notifire = new Notifire();

await notifire.registerProvider(
  new SendgridEmailProvider({
    apiKey: process.env.SENDGRID_API_KEY,
    from: 'sender@mail.com'
  })
);

const passwordResetTemplate = await notifire.registerTemplate({
  id: 'password-reset',
  messages: [
    {
      subject: 'Your password reset request',
      channel: ChannelTypeEnum.EMAIL,
      template: `
          Hi {{firstName}}!
          
          To reset your password click <a href="{{resetLink}}">here.</a>
          
          {{#if organization}}
            <img src="{{organization.logo}}" />
          {{/if}}
      `
    },
  ]
});

await notifire.trigger('<REPLACE_WITH_EVENT_NAME>', {
  $user_id: "<USER IDENTIFIER>",
  $email: "test@email.com",
  firstName: "John",
  lastName: "Doe",
  organization: {
    logo: 'https://evilcorp.com/logo.png'
  }
});
```

## Providers
Notifire provides a single API to manage providers across multiple channels with a single to use interface.

#### 💌 Email
- [x] [Sendgrid](https://github.com/notifirehq/notifire/tree/master/providers/sendgrid)
- [x] [Mailgun](https://github.com/notifirehq/notifire/tree/master/providers/mailgun)
- [x] [SES](https://github.com/notifirehq/notifire/tree/master/providers/ses)
- [x] [Postmark](https://github.com/notifirehq/notifire/tree/master/providers/postmark)
- [x] [NodeMailer](https://github.com/notifirehq/notifire/tree/master/providers/nodemailer)
- [x] [Mailjet](https://github.com/notifirehq/notifire/tree/master/providers/mailjet)
- [x] [Mandrill](https://github.com/notifirehq/notifire/tree/master/providers/mandrill)
- [ ] SendinBlue
- [ ] SparkPost

#### 📞 SMS
- [x] [Twilio](https://github.com/notifirehq/notifire/tree/master/providers/twilio)
- [x] [Plivo](https://github.com/notifirehq/notifire/tree/master/providers/plivo)
- [x] [SNS](https://github.com/notifirehq/notifire/tree/master/providers/sns)
- [x] Nexmo (Vonage)(https://github.com/notifirehq/notifire/tree/master/providers/nexmo)
- [ ] Bandwidth
- [ ] RingCentral

#### 📱 Push (Coming Soon...)
- [ ] Pushwoosh
- [ ] SNS

#### 👇 Direct (Coming Soon...)
- [ ] Slack
- [ ] MS Teams
- [ ] Discord
- [ ] Mattermost

#### 📱 In-App (Coming Soon...)
- [ ] Notifire
- [ ] MagicBell

#### Other (Coming Soon...)
- [ ] PagerDuty

## 🔗 Links
- [Home page](https://notifire.co/)

---
_Source: https://npm.io/package/@notifire/core · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
