Project

lesli_bell

0.0
The project is in a healthy, maintained state
Notifications & Announcements System for the Lesli Framework.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

~> 5.1.0
 Project Readme

LesliBell

Notifications and announcements for the Lesli Framework.



LesliBell notifications and announcements


Introduction

LesliBell is the official notifications and announcements engine for the Lesli Framework.

It provides account-scoped communication tools that integrate with Lesli users, permissions, navigation, and shared application infrastructure.


Features

  • User notification feeds with unread counts and read status
  • Notification categories for informational, success, warning, and danger messages
  • Delivery-channel metadata for web, push, email, dialog, and mobile notifications
  • Account-scoped announcements
  • Announcement metadata for paths, date ranges, links, and dismissible presentation
  • Pagination and integration with the standard Lesli interface

Try LesliBell


Quick Start

Requirements

  • A Rails application with Lesli 5.1 or newer
  • SQLite by default, or PostgreSQL when preferred by the host application

Install LesliBell

Add the engine to the host Rails application and prepare its database:

bundle add lesli_bell
bin/rails lesli:db:prepare

Mount the engine

Applications using Lesli's standard router mount LesliBell automatically at /bell:

# config/routes.rb
Rails.application.routes.draw do
    Lesli::Router.mount(self)
end

If the application does not use the standard Lesli router, mount the engine directly:

# config/routes.rb
Rails.application.routes.draw do
    mount LesliBell::Engine => "/bell"
end

Start Rails and visit http://127.0.0.1:3000/bell:

bin/rails server

Usage

Create a notification for the current user

LesliBell creates notifications through an account-scoped service. Pass a signed-in Lesli user to the service:

LesliBell::NotificationService.new(current_user).create_for_me(
    subject: "Your report is ready",
    body: "Open the report to review the latest results.",
    category: :success,
    channel: :web,
    url: "/reports/weekly"
)

Notify multiple users

Use user IDs that belong to the current account:

user_ids = current_user.account.users.pluck(:id)

LesliBell::NotificationService.new(current_user).create(
    {
        subject: "Scheduled maintenance",
        category: :warning,
        channel: :web
    },
    send_to_user_ids: user_ids
)

Unknown categories fall back to info; unknown channels fall back to web. The notification feed displays created, sent, and legacy records without a status. Updating /bell/notifications/:id marks that notification as read for the current user.

See Notifications and Announcements for the data contracts, service behavior, and current route surface.


Development

Clone LesliBell into the host application's engines directory:

cd RailsApp
mkdir -p engines
git clone https://github.com/LesliTech/LesliBell.git engines/LesliBell

Reference the local engine from the host application's Gemfile:

gem "lesli_bell", path: "engines/LesliBell"

Install dependencies, prepare the host database, and start Rails:

bundle install
bin/rails lesli:db:prepare
bin/rails server

Tests

From a complete Lesli development workspace, run the engine test suite from the LesliBell directory:

cd engines/LesliBell
bin/rails test

Run the same suite with the engine coverage profile enabled:

COVERAGE=true bin/rails test

Documentation


Community


License

Copyright (c) 2026, Lesli Technologies, S. A.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

The complete license text is available in the license file.




Lesli icon

The Open-Source SaaS Development Framework for Ruby on Rails.