Scalable open-source real-time chat server with WebSocket API

158 stars 15 forks last commit first released GPL-3.0

Actively maintained

Last commit 22 Jul 2026.

SAMA screenshot

SAMA is an open-source messaging server designed as a modern alternative to legacy chat protocols. It provides real-time WebSocket and HTTP APIs for users, conversations, messages, activities and address books, and ships with reference web and mobile clients.

Key Features

  • High-performance WebSocket core powered by uWebSockets.js for low-latency messaging
  • REST and real-time APIs covering Users, Conversations, Messages, Activities, Address Book and Push Notifications
  • Persistent storage using MongoDB and ephemeral/state features backed by Redis (presence, caching/pubsub)
  • End-to-end encryption support and built-in push notification flows
  • Clustering and horizontal scaling primitives for multi-node deployments
  • Docker-friendly deployment and reference frontend (web) and Flutter mobile clients
  • GPL-3.0 licensed project with an emphasis on a compact, modern protocol alternative to XMPP

Use Cases

  • Add real-time chat, group conversations and activity streams to mobile and web applications
  • Build team chat or community messaging platforms with end-to-end encryption and push notifications
  • Implement lightweight, scalable messaging backends for consumer or enterprise apps requiring low latency

Limitations and Considerations

  • Uses a custom SAMA protocol (designed as an alternative to XMPP) which has a smaller ecosystem and fewer third-party clients
  • GPL-3.0 license can restrict embedding into proprietary products without complying with license terms
  • High-concurrency deployments require tuning and appropriate resources for uWebSockets.js, MongoDB and Redis

SAMA is a focused chat server for teams and apps that need a high-performance, modern messaging backend. It is suitable for projects that can adopt its protocol and license model and want a Docker-friendly, scalable real-time messaging stack.

Categories:

Tags:

Tech Stack:

Share:

Similar to SAMA

NodeBB logo

NodeBB

Modern Node.js-based forum and community discussion platform

15.2k
3k
Last commit

NodeBB is a modern forum platform with real-time discussions, built-in chat, SSO options, plugins, and flexible theming, backed by Redis, MongoDB, or PostgreSQL.

GPL-3.0Actively maintained
Alternative to:
Discourse logo
Discourse
+14
Novu logo

Novu

Open-source notifications infrastructure for inbox and multi-channel delivery

39.7k
4.4k
Last commit

Novu is an open-source notifications platform with a unified API, workflow orchestration, and embeddable in-app inbox for email, SMS, push, and chat.

Actively maintained
Alternative to:
Novu Cloud logo
Novu Cloud
+4
Databag logo

Databag

Lightweight federated messenger with end-to-end encryption

1.5k
96
Last commit

Self-hosted, lightweight federated messenger with end-to-end encrypted threads and optional WebRTC audio/video calling across independently hosted nodes.

Apache-2.0Actively maintained
Alternative to:
Signal logo
Signal
+19

u-wave

Self-hosted collaborative music listening with a shared queue

u-wave is a self-hosted social music room with DJ-style queueing, chat, and browser-based playback for listening together in real time.

Activity unknown
Alternative to:
Plug.dj logo
Plug.dj
+3
Jitsi Meet logo

Jitsi Meet

WebRTC-based video conferencing for the web and mobile

29.8k
8k
Last commit

Self-hostable WebRTC video conferencing with chat, screen sharing, moderation tools, and SDKs for embedding meetings into web and mobile apps.

Apache-2.0Actively maintained
Alternative to:
Zoom logo
Zoom
+12

Countly

Privacy-first product analytics and customer engagement platform

5.9k
983
Last commit

Open-source product analytics platform with SDKs for mobile, web and desktop; provides dashboards, events, crash reporting, messaging, A/B testing and APIs.

Actively maintained
Alternative to:
Mixpanel logo
Mixpanel
+19