Repolode
yshmarov

yshmarov/livechat

Self-hosted live chat for Rails apps: a support widget and team inbox that store conversations in your own database.

Open-source alternative to:IntercomCrisp

Stars
66
Forks
2
Open issues
2
Last commit
11 days ago

What is it?

livechat is a Ruby gem that adds in-app support messaging to a Rails application. A chat bubble lets visitors ask questions from the page where they get stuck, and the team answers from a mounted inbox at /livechat. Conversations, messages and attachments are stored in the host app's database, so no third-party service or external script is involved.

The gem works with Rails 7.1 and later and uses polling for realtime updates by default, so it needs no Redis or Action Cable. Action Cable push can be enabled as an option. Authorization, visitor identification and notification hooks are configured with lambdas that receive the raw request, so they work with Devise, Rails 8 built-in auth or custom sessions. Email notifications in both directions, file attachments through Active Storage, and an embed script for static sites on the same origin are also supported.

The inbox is shared: any authorized agent can read and reply to any conversation, and the gem does not provide tenant-isolated inboxes. It also does not include AI bots, canned replies or channels such as WhatsApp.

Key features

  • 01Chat bubble widget that visitors can open from any page, with unread badges and preserved drafts.
  • 02Team inbox with open and resolved filters, search and per-reply author attribution.
  • 03Polling-based realtime updates by default, with optional Action Cable push.
  • 04Email notifications in both directions, grouped per unread stretch.
  • 05File attachments via Active Storage, served through the engine with access control.
  • 06Configurable authorization, visitor identity and hooks such as Slack notifications.

Use cases

  • Answering billing, onboarding or account questions from inside a SaaS app.
  • Letting customers ask about orders, invoices or bookings from a customer portal.
  • Giving internal admin users a direct line to support teammates from admin screens.
  • Adding contextual support buttons that prefill the chat with the current order or record.

Quick start

  1. 1

    Add the gem to your Gemfile

  2. 2

    Install the bundle

    bundle install
  3. 3

    Run the installer generator

    bin/rails generate livechat:install
  4. 4

    Run the database migrations

    bin/rails db:migrate

Things to know

  • Only works with Ruby on Rails apps (Ruby >= 3.2, Rails >= 7.1, < 9).
  • The inbox defaults to development only, so you must set authorize_agent before deploying.

In collections

Topics

#ruby-on-rails#live-chat#customer-support#rails-engine#self-hosted#chat-widget#chatwoot-alternative#crisp-alternative#intercom-alternative#livechat

FAQ

What is livechat?
Self-hosted live chat for Rails apps: a support widget and team inbox that store conversations in your own database. livechat is a Ruby gem that adds in-app support messaging to a Rails application. A chat bubble lets visitors ask questions from the page where they get stuck, and the team answers from a mounted inbox at /livechat. Conversations, messages and attachments are stored in the host app's database, so no third-party service or external script is involved.
Is livechat free to use? What license does it have?
livechat is open source under the MIT license. Check the license terms before using it in commercial products.
Is livechat still maintained?
Actively maintained. The last commit to livechat was on Oct 27, 2026.
What can I use livechat for?
Answering billing, onboarding or account questions from inside a SaaS app. Letting customers ask about orders, invoices or bookings from a customer portal. Giving internal admin users a direct line to support teammates from admin screens. Adding contextual support buttons that prefill the chat with the current order or record.
How do I install livechat?
Add the gem to your Gemfile Install the bundle: bundle install Run the installer generator: bin/rails generate livechat:install Run the database migrations: bin/rails db:migrate
Where can I get livechat?
The source code and installation instructions are on GitHub: https://github.com/yshmarov/livechat

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects