Repolode
SAMA-Communications

SAMA-Communications/sama-server

A chat server built on uWebSockets.js that offers an alternative to XMPP, with a Node.js backend, MongoDB and Redis.

Stars
161
Forks
16
Open issues
3
Last commit
last month

What is it?

SAMA is a chat server and messaging protocol designed as an alternative to XMPP, the long-standing standard for instant messaging. The server is written in JavaScript on Node.js and uses uWebSockets.js for WebSocket handling. It stores data in MongoDB and uses Redis for cluster state.

The server exposes APIs for users, conversations, messages, activities, address books and push notifications. Official web and Flutter clients are available as separate repositories, and a hosted demo is provided for testing the full stack.

Nodes in a cluster discover each other through records in Redis, open WebSocket connections between themselves, and clean up data left by nodes that have gone away.

Key features

  • 01Chat server built on uWebSockets.js and Node.js
  • 02Uses MongoDB for storage and Redis for cluster coordination
  • 03Provides APIs for users, conversations, messages and push notifications
  • 04Supports multi-node clustering with automatic node discovery and reconnection
  • 05Includes an address book API and activity API

Use cases

  • Building a self-hosted chat backend as an alternative to XMPP
  • Running a messaging service that scales across several Node.js nodes
  • Prototyping a chat product with existing web or Flutter clients

Things to know

  • Requires MongoDB and Redis as backend dependencies.
  • Licensed under GPL-3.0, a copyleft license that carries obligations for derivative works.
  • The README points to external docs for local development and deployment rather than giving setup steps.

Topics

FAQ

What is sama-server?
A chat server built on uWebSockets.js that offers an alternative to XMPP, with a Node.js backend, MongoDB and Redis. SAMA is a chat server and messaging protocol designed as an alternative to XMPP, the long-standing standard for instant messaging. The server is written in JavaScript on Node.js and uses uWebSockets.js for WebSocket handling. It stores data in MongoDB and uses Redis for cluster state.
Is sama-server free to use? What license does it have?
sama-server is open source under the GPL-3.0 license. Check the license terms before using it in commercial products.
Is sama-server still maintained?
Updated within 6 months. The last commit to sama-server was on Oct 5, 2026.
What can I use sama-server for?
Building a self-hosted chat backend as an alternative to XMPP Running a messaging service that scales across several Node.js nodes Prototyping a chat product with existing web or Flutter clients
Where can I get sama-server?
The source code and installation instructions are on GitHub: https://github.com/SAMA-Communications/sama-server

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

Related projects