What is SAMA?

What? Where? When?

Oleksandr Chabaniuk
SAMA communications

--

In this article, we aim to provide developers with a thorough understanding of SAMA, its components, and its benefits for building powerful chat applications 😉.

Understanding SAMA

SAMA — Simple but Advanced Messaging Alternative

SAMA is more than just a chat client; it’s a robust API designed for speed and security 🔐. Users have consistently praised its performance, with messages being delivered 🛵 in fractions of a second. This speed is made possible through our carefully crafted interface and optimized API.

👀 This is how it looks now:

If you want to delve deeper into the updated design and its features, we recommend reading our previous article:

👉🏻 How we “simplified” UI/UX by 20%

Exploring SAMA’s Architecture

There’s a server at the core of SAMA, which serves as a lightning-fast ⚡️API for developers to build upon. Powered by WebSocket technology, our server ensures rapid packet exchange 🏸, enabling real-time communication without compromising security.

Our tech stack includes cutting-edge components:

  • Data Storage — MongoDB
  • Core — uWebSockets/Node.js
  • Files Storage — S3
  • Data Cache — Redis
  • Message Queue — Bull

For a deeper dive 🚤 into our tech stack, we recommend exploring our articles on SAMA’s chat server architecture and comprehensive deployment guide 🧰:

Components of the SAMA API

The SAMA API offers a comprehensive set of components to facilitate the development of chat applications:

1️⃣ Users

From user creation to searching and editing profiles, our API provides seamless management of user data

  • user_create | Create a new user
  • 🔽 user_login | Log in to the system
  • 🔼 user_logout | Log out of the active user session
  • ✏️ user_edit | Edit user data
  • user_delete | Delete a user
  • 🔍 user_search | Search for users in the database

Read more: Users API 📰

2️⃣ Conversations

Create, update, and manage conversations effortlessly, with features like adding or removing participants and retrieving conversation lists:

  • conversation_create | Create a new conversation
  • 📝 conversation_update | Add/Remove users from the conversation or update parameters
  • 📑 conversation_list | Get a list of all user conversations
  • conversation_delete | Delete a conversation
  • 👥 get_participants_by_cids | Get a list of conversation participants from the list of specified chats

Read more: Conversations API 📰

3️⃣ Messages

Send, edit, and retrieve messages in real-time, with options for marking messages as read and managing message content:

  • 📩 message | Create a message
  • 📝message_edit | Edit message content
  • 📃message_list | Get a list of chat messages
  • message_read | Mark message as read
  • message_delete | Delete a message
  • ✒️typing | * This will help to update your ‘typing’ status

Read more: Messages API 📰

4️⃣ Activities

Stay updated on user activities with subscription-based notifications, ensuring a dynamic user experience:

  • 🔔 status_subscribe | Subscribe to user activity
  • 🔕 status_unsubscribe | Unsubscribe from a user’s activity
  • 👁‍🗨 get_user_status | Get the latest activity of a list of users

Read more in the article: Activites API 📰

5️⃣ Address book

Manage contacts efficiently, with functions for adding, updating, and deleting contacts:

  • contact_add | Match user
  • 📋 contact_batch_add | Match users
  • ♻️ contact_update | Update contact
  • 📃 contact_list | Get a list of contacts
  • contact_delete | Delete a contact

Read more: Address book API 📰

6️⃣ Push notifications

Keep users engaged with push notifications, allowing for subscription management and custom event creation:

  • push_subscription_create | Subscribe your device to receive notifications
  • 📃push_subscription_list | Get a list of user subscriptions
  • push_subscription_delete | Unsubscribe your device from notifications
  • 📍push_event_create | Create your own event to send out

Read more: Push notifications API 📰

With these components, developers can build fully functional chat clients with ease. And with ongoing development, our API continues to evolve with new features and capabilities.

Our API page on Github:

Open Source and Future Development

We’re committed to open-source collaboration, and our API is already available for developers to integrate into their projects 📲. By embracing open-source principles, we aim to foster innovation and community-driven development. Additionally, we’re actively exploring ways to enhance and extend the capabilities of our API ✈️, including updates to legacy protocols and ambitious future plans 📃.

Join us on GitHub and stay updated on our latest developments and articles as we continue to push the boundaries of real-time communication 🏓 with SAMA.

Conclusion

SAMA offers developers a powerful toolkit 🛠 for building high-performance chat applications. With its speed ⏱, security 🔐, and comprehensive feature 💡 set, SAMA empowers developers to create engaging real-time communication experiences.

Explore our API, join our community, and unlock the full potential of SAMA for your project.

--

--