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

147stars
12forks
Last commit: 2mo ago
Repo age: 4y old
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 Services

Rocket.Chat

Rocket.Chat

Self-hosted secure team chat with voice, video, and omnichannel

44.3k
13k
Last commit: 18h ago

Rocket.Chat is an open-source communications platform for secure team messaging, channels, DMs, voice/video, integrations, and customer omnichannel support.

Alternative to:
Rocket.Chat Cloud
Rocket.Chat Cloud
+19
Novu

Novu

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

38.4k
4.2k
Last commit: 1d ago

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

Alternative to:
Novu Cloud
Novu Cloud
+4
Mattermost

Mattermost

Secure, self-hosted team collaboration and messaging platform.

34.9k
8.3k
Last commit: 22h ago

Open-source, self-hosted messaging platform for secure team collaboration with real-time chat, audio calls, screen sharing, and integrations.

Alternative to:
Slack
Slack
+19
ntfy

ntfy

HTTP-based pub-sub push notification service via PUT/POST

28.2k
1.1k
Last commit: 1d ago

ntfy is a lightweight HTTP pub-sub service to send push notifications to phones, desktops, and browsers via PUT/POST or a REST API.

Alternative to:
Pushover
Pushover
+8
Chatwoot

Chatwoot

Open-source omnichannel customer support and live chat platform

26.9k
6.1k
Last commit: 1d ago

Chatwoot is an open-source customer support platform with a shared inbox for live chat, email, and messaging channels, plus automation, reporting, and a help center.

Alternative to:
Intercom
Intercom
+19
Zulip

Zulip

Organized team chat with topic-based threading

24.2k
9.4k
Last commit: 9d ago

Open-source team chat server with topic-based threading for focused, asynchronous, and real-time communication in distributed teams.

Alternative to:
Zulip Cloud
Zulip Cloud
+19