Hex Version HexDocs CI Status

Usher is a web framework-agnostic invitation link management library for any Elixir application with Ecto.

🚧 This library is in its infancy so you should treat all versions as early pre-release versions. We'll make the best effort to give heads up about breaking changes; however we can't guarantee backwards compatibility for every change.

Current Features

  • 🔐 Token generation: using cryptographic functions
  • 🏗️ Framework agnostic - works with any Ecto-based application
  • 🤝 Flexible usage tracking for tracking invitation link usage

What's planned?

  • [ ] Auto-cleanup of expired invitations.
  • [ ] More advanced usage tracking.
    • [ ] Metadata about those who visited and used the invitation (approx. location, user agent, etc.).
    • [x] Linking invitation tokens to user accounts (e.g. to track which user registered with which invitation): Added in v0.3.0.
  • [ ] Invitation expiration after X number of uses (including one-time use links).
  • [ ] One-time use invitation links tied to specific email addresses.
  • [ ] Descriptions for invitation links so you can provide context for its usage.
  • [ ] Cryptographic signing of invitation tokens to prevent tampering.
  • [ ] Add credo checks to ensure code quality.
  • [ ] Add status checks and run tests on pull requests.
  • [ ] Soft delete for invitations to keep them in the database for analytics purposes.

Installation

Add usher to your list of dependencies in mix.exs:

def deps do
  [
    {:usher, "~> 0.3.0"}
  ]
end

Usher requires Elixir 1.14 or later, and OTP 25 or later. It may work with earlier versions, but it wasn't tested against them.

Follow the installation instructions to set up Usher in your application.

Getting Started

Take a look at the overview guide for a quick introduction to Usher.

Phoenix Integration

Take a look at the Phoenix integration guide for details on how to set up Usher in your Phoenix application.

Configuration Options

View all the configuration options in the configuration guide.

Contributing

See the contribution guide for details on how to contribute to Usher.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Inspiration

We first built this invitation system into Accomplish and then decided to open-source it.