Chimeway

Chimeway is an explainable, durable notification library for Elixir. Every notification decision is traceable — teams can reliably answer why a notification sent, failed, or was suppressed.

Hex.pmCI

Installation

Add chimeway to your mix.exs dependencies:

def deps do
  [
    {:chimeway, "~> 0.1"}
  ]
end

Then run:

mix deps.get
mix ecto.migrate

Quick Start

Define a notifier:

defmodule MyApp.OrderShippedNotifier do
  use Chimeway.Notifier,
    notification_key: "order_shipped",
    version: 1

  @impl true
  def resolve_recipients(%{user_id: user_id}, _opts) do
    {:ok, [%{identity: "user:#{user_id}", type: "user"}]}
  end
end

Trigger a notification:

Chimeway.trigger(
  MyApp.OrderShippedNotifier,
  %{order_id: "ord-123", user_id: 42},
  idempotency_key: "order-shipped-ord-123"
)
# => {:ok, %{event: %Chimeway.Events.Event{}, notifications: [...]}}

Documentation

License

MIT — see LICENSE.md.