Convert Figma logo to code with AI

tinode logochat

Instant messaging platform. Backend in Go. Clients: Swift iOS, Java Android, JS webapp, scriptable command line; chatbots

11,918
1,866
11,918
33

Top Related Projects

21,147

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

Mattermost is an open source platform for secure collaboration across the entire software development lifecycle..

The communications platform that puts data protection first.

A glossy Matrix collaboration client for the web.

11,786

Synapse: Matrix homeserver written in Python/Twisted.

bridge between mattermost, IRC, gitter, xmpp, slack, discord, telegram, rocketchat, twitch, ssh-chat, zulip, whatsapp, keybase, matrix, microsoft teams, nextcloud, mumble, vk and more with REST API (mattermost not required!)

Quick Overview

Tinode is an instant messaging platform designed for modern mobile and web applications. It offers a scalable, open-source solution for building chat applications with features like one-on-one messaging, group chats, and topic-based conversations. Tinode supports multiple platforms and provides SDKs for easy integration.

Pros

  • Open-source and self-hostable, offering flexibility and control over data
  • Supports multiple platforms (iOS, Android, Web) with native SDKs
  • Scalable architecture suitable for both small and large-scale deployments
  • Rich feature set including end-to-end encryption, push notifications, and file sharing

Cons

  • Steeper learning curve compared to some commercial chat solutions
  • Documentation could be more comprehensive for advanced use cases
  • Limited built-in moderation tools compared to some enterprise solutions
  • Requires more setup and maintenance effort than fully managed services

Code Examples

Here are a few examples of using Tinode with its Go SDK:

  1. Connecting to a Tinode server:
import "github.com/tinode/chat/pbx"

// Create a new Tinode client
client := pbx.NewTinodeClient(conn)

// Authenticate with the server
_, err := client.Login(ctx, &pbx.ClientMsg{
    Login: &pbx.ClientLogin{
        Scheme: "basic",
        Secret: []byte("username:password"),
    },
})
  1. Sending a message:
// Send a message to a topic
_, err := client.Publish(ctx, &pbx.ClientMsg{
    Pub: &pbx.ClientPub{
        Topic: "grp1XUtEhjv6HND",
        Content: "Hello, Tinode!",
    },
})
  1. Subscribing to a topic:
// Subscribe to a topic
_, err := client.Subscribe(ctx, &pbx.ClientMsg{
    Sub: &pbx.ClientSub{
        Topic: "grp1XUtEhjv6HND",
    },
})

Getting Started

To get started with Tinode:

  1. Clone the repository:

    git clone https://github.com/tinode/chat.git
    
  2. Navigate to the server directory:

    cd chat/server
    
  3. Build and run the server:

    go build
    ./server
    
  4. Use one of the provided SDKs (iOS, Android, Web) to connect to your Tinode server and start building your chat application.

Competitor Comparisons

21,147

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

Pros of Zulip

  • More comprehensive and feature-rich platform with advanced threading and topic-based conversations
  • Larger and more active community, with extensive documentation and support
  • Better integration capabilities with third-party services and tools

Cons of Zulip

  • Steeper learning curve due to its unique conversation model and extensive features
  • Heavier resource requirements for self-hosting and maintenance
  • Less flexibility in terms of customization compared to Tinode

Code Comparison

Zulip (Python):

def get_user_profile(request: HttpRequest, user_profile_id: int) -> HttpResponse:
    user_profile = get_object_or_404(UserProfile, id=user_profile_id)
    if not user_profile.is_active and not request.user.is_staff:
        return render(request, "zerver/deactivated_user.html")
    return render(request, "zerver/user_profile.html", context={"user_profile": user_profile})

Tinode (Go):

func (t *Topic) Get(sess *Session, asUid types.Uid, opts *MsgGetOpts) (*MsgGetResult, error) {
	now := types.TimeNow()
	tcat := t.GetCat()
	if tcat == types.TopicCatMe || tcat == types.TopicCatFnd {
		return t.MetaGet(sess, asUid, opts)
	}
	return t.DataGet(sess, asUid, opts, now)
}

Both repositories showcase different approaches to handling user profiles and topic data retrieval, reflecting their respective language choices and architectural designs.

Mattermost is an open source platform for secure collaboration across the entire software development lifecycle..

Pros of Mattermost

  • More extensive feature set, including advanced team collaboration tools
  • Larger community and ecosystem, with numerous integrations available
  • Better suited for enterprise-level deployments with robust security features

Cons of Mattermost

  • Heavier resource requirements, potentially more complex to set up and maintain
  • Less flexible for customization in certain areas compared to Tinode
  • May be overkill for smaller teams or simpler chat applications

Code Comparison

Mattermost (Go):

func (a *App) CreatePost(c *request.Context, post *model.Post, channel *model.Channel, triggerWebhooks bool, setOnline bool) (savedPost *model.Post, err error) {
    // Post creation logic
}

Tinode (Go):

func (t *Topic) SaveMessage(msg *types.Message, isAdmin bool) error {
    // Message saving logic
}

Both projects use Go for their backend, but Mattermost's codebase is generally more complex due to its broader feature set. Tinode's code tends to be more focused on core messaging functionality.

Mattermost is better suited for large organizations requiring a comprehensive collaboration platform, while Tinode is more appropriate for developers looking to build custom chat applications or for smaller teams needing a lightweight solution.

The communications platform that puts data protection first.

Pros of Rocket.Chat

  • More extensive feature set, including video conferencing and screen sharing
  • Larger community and ecosystem, with numerous integrations available
  • Self-hosted option for better control over data and customization

Cons of Rocket.Chat

  • Higher resource requirements due to its comprehensive feature set
  • Steeper learning curve for administrators and developers
  • More complex setup and maintenance compared to simpler alternatives

Code Comparison

Rocket.Chat (JavaScript):

Meteor.startup(() => {
  RocketChat.settings.add('Site_Url', '', {
    type: 'string',
    group: 'General',
    public: true
  });
});

Tinode Chat (Go):

func main() {
    tinode.SetupAppContext(tinode.AppContext{
        AppName:    "Tinode",
        APIKey:     "AQEAAAABAAD_rAp4DJh05a1HAwFT3A6K",
        APIBaseURL: "https://api.tinode.co",
    })
}

The code snippets show different approaches to configuration. Rocket.Chat uses Meteor's startup function to add settings, while Tinode Chat uses a more straightforward setup function in Go. Rocket.Chat's approach allows for more dynamic configuration, while Tinode Chat's method is simpler and more direct.

Both projects are open-source chat platforms, but Rocket.Chat offers a more comprehensive solution with a wider range of features. Tinode Chat, on the other hand, provides a lighter-weight alternative that may be easier to set up and maintain for simpler use cases.

A glossy Matrix collaboration client for the web.

Pros of Element Web

  • Built on the Matrix protocol, offering better interoperability and federation
  • More extensive feature set, including end-to-end encryption and cross-platform sync
  • Larger community and more active development

Cons of Element Web

  • More complex codebase, potentially harder to customize or self-host
  • Higher resource usage due to its comprehensive feature set
  • Steeper learning curve for developers new to the Matrix ecosystem

Code Comparison

Element Web (React):

const roomView = useCallback(() => (
    <RoomView
        ref={roomViewRef}
        onRegistered={onRegistered}
        threepidInvite={threepidInvite}
        oobData={oobData}
        justCreatedOpts={justCreatedOpts}
        forceTimeline={forceTimeline}
    />
), [onRegistered, threepidInvite, oobData, justCreatedOpts, forceTimeline]);

Tinode Chat (React):

const ChatMessage = ({ content, sender, timestamp }) => (
  <div className="chat-message">
    <span className="sender">{sender}</span>
    <p>{content}</p>
    <span className="timestamp">{timestamp}</span>
  </div>
);

Both projects use React, but Element Web's code tends to be more complex due to its broader feature set. Tinode Chat's code is generally simpler and more straightforward, making it easier for developers to understand and modify.

11,786

Synapse: Matrix homeserver written in Python/Twisted.

Pros of Synapse

  • More mature and widely adopted project with a larger community
  • Supports end-to-end encryption out of the box
  • Federated architecture allows for decentralized communication

Cons of Synapse

  • Higher resource requirements and potentially slower performance
  • More complex setup and configuration process
  • Steeper learning curve for developers and administrators

Code Comparison

Synapse (Python):

class FederationServlet(servlet.ServletBase):
    def __init__(self, hs):
        super(FederationServlet, self).__init__()
        self.hs = hs
        self.federation_handler = hs.get_federation_handler()

Chat (Go):

type Session struct {
    proto     string
    remoteAddr string
    locale    string
    userAgent string
    sid       string
    uid       types.Uid
}

Both projects use different programming languages and architectures. Synapse, written in Python, focuses on federation and decentralized communication. Chat, written in Go, appears to have a more straightforward session management approach.

Synapse's code snippet shows a class for handling federation, highlighting its focus on decentralized communication. Chat's code snippet demonstrates a simpler session structure, which may contribute to its potentially better performance and easier setup compared to Synapse.

bridge between mattermost, IRC, gitter, xmpp, slack, discord, telegram, rocketchat, twitch, ssh-chat, zulip, whatsapp, keybase, matrix, microsoft teams, nextcloud, mumble, vk and more with REST API (mattermost not required!)

Pros of Matterbridge

  • Supports a wide range of chat platforms and protocols
  • Allows bridging between different chat systems
  • Lightweight and easy to deploy

Cons of Matterbridge

  • Focused solely on bridging, lacks native chat functionality
  • May have limitations in message formatting across different platforms

Code Comparison

Matterbridge (Go):

type Bridge struct {
    Config    *config.Config
    General   *config.Protocol
    Gateways  map[string]*Gateway
    Protocols map[string]protocol.Protocol
    // ...
}

Tinode (Go):

type Topic struct {
    name        string
    xoriginal   string
    touched     time.Time
    perUser     map[*Session]perUserData
    sessions    map[*Session]sessionJoin
    // ...
}

Key Differences

  • Matterbridge focuses on connecting existing chat platforms, while Tinode is a complete chat solution
  • Tinode offers more advanced features like access control and real-time sync
  • Matterbridge is more suitable for integrating multiple chat systems, while Tinode is better for building a standalone chat application

Use Cases

  • Choose Matterbridge for connecting teams using different chat platforms
  • Opt for Tinode when building a custom chat application with advanced features

Both projects are open-source and actively maintained, catering to different needs in the messaging ecosystem.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Tinode Instant Messaging Server

Instant messaging full stack. Backend in pure Go (license GPL 3.0), clients for Android (Java), iOS (Swift), and web (ReactJS), as well as gRPC client support for C++, C#, Go, Java, Node, PHP, Python, Ruby, Objective-C, etc (all clients licensed under Apache 2.0). Wire transport is JSON over websocket (long polling is also available) or protobuf with gRPC.

This is beta-quality software: feature-complete and stable but probably with a few bugs or missing features. Follow instructions to install and run or use one of the cloud services below. Read API documentation.

Tinode is not XMPP/Jabber. It is not compatible with XMPP. It's meant as a replacement for XMPP. On the surface, it's a lot like open source WhatsApp or Telegram.

Why?

The promise of XMPP was to deliver federated instant messaging: anyone would be able to spin up an IM server capable of exchanging messages with any other XMPP server in the world. Unfortunately, XMPP never delivered on this promise. Instant messengers are still a bunch of incompatible walled gardens, similar to what AoL of the late 1990s was to the open Internet.

The goal of this project is to deliver on XMPP's original vision: create a modern open platform for federated instant messaging with an emphasis on mobile communication. A secondary goal is to create a decentralized IM platform that is much harder to track and block by the governments.

An explicit NON-goal: we are not building yet another Slack replacement.

Installing and running

See general instructions or docker-specific instructions.

Getting support

Helping out

  • If you appreciate our work, please help spread the word! Sharing on Reddit, HN, and other communities helps more than you think.
  • Consider buying paid support: https://tinode.co/support.html
  • If you are a software developer, send us your pull requests with bug fixes and new features.
  • If you use the app and discover bugs or missing features, let us know by filing bug reports and feature requests. Vote for existing feature requests you find most valuable.
  • If you speak a language other than English, translate the apps into your language. You may also review and improve existing translations.
  • If you are a UI/UX expert, help us polish the app UI.
  • Use it: install it for your colleagues or friends at work or at home.

Public service

A public Tinode service is available. You can use it just like any other instant messenger. Keep in mind that demo accounts present in sandbox are not available in the public service. You must register an account using valid email in order to use the service.

Web

TinodeWeb, a single page web app, is available at https://web.tinode.co/ (source). See screenshots below.

Android

Tinode for Android a.k.a Tindroid is stable and functional (source). See the screenshots below. A debug APK is also provided for convenience.

iOS

Tinode for iOS a.k.a. Tinodios is stable and functional (source). See the screenshots below.

Demo/Sandbox

A sandboxed demo service is available at https://sandbox.tinode.co/.

Log in as one of alice, bob, carol, dave, frank. Password is <login>123, e.g. login for alice is alice123. You can discover other users by email or phone by prefixing them with email: or tel: respectively. Emails are <login>@example.com, e.g. alice@example.com, phones are +17025550001 through +17025550009.

When you register a new account you are asked for an email address to send validation code to. For demo purposes you may use 123456 as a universal validation code. The code you get in the email is also valid.

Sandbox Notes

  • The sandbox server is reset (all data wiped) every night at 3:15am Pacific time. An error message User not found or offline means the server was reset while you were connected. If you see it on the web, reload and relogin. On Android log out and re-login. If the database was changed, delete the app then reinstall.
  • Sandbox user Tino is a basic chatbot which responds with a random quote to any message.
  • As generally accepted, when you register a new account you are asked for an email address. The server will send an email with a verification code to that address and you can use it to validate the account. To make things easier for testing, the server will also accept 123456 as a verification code. Remove line "debug_response": "123456" from tinode.conf to disable this option.
  • The sandbox server is configured to use ACME TLS implementation with hard-coded requirement for SNI. If you are unable to connect then the most likely reason is your TLS client's missing support for SNI. Use a different client.
  • The default web app loads a single minified javascript bundle and minified CSS. The un-minified version is also available at https://sandbox.tinode.co/index-dev.html
  • Docker images with the same demo are available.
  • You are welcome to test your client software against the sandbox, hack it, etc. No DDoS-ing though please.

Features

Supported

  • Multiple native platforms:
  • User features:
    • One-on-one and group messaging.
    • Video and voice calls. Voice messages.
    • Channels with unlimited number of read-only subscribers.
    • All chats are synchronized across all devices.
    • Granular access control with permissions for various actions.
    • User search/discovery.
    • Rich formatting of messages markdown-style: *style* → style, with inline images, videos, file attachments.
    • Forms and templated responses suitable for chatbots.
    • Verified/staff/untrusted account markers.
    • Message status notifications: message delivery to server; received and read notifications; typing notifications.
    • Most recent message preview in contact list.
    • Server-generated presence notifications for people, group chats.
    • Forwarding and replying to messages.
    • Editing sent messages.
  • Administration:
    • Granular access control with permissions for various actions.
    • Support for custom authentication backends.
    • Ability to block unwanted communication server-side.
    • Anonymous users (important for use cases related to tech support over chat).
    • Plugins to extend functionality, for example, to support moderation or chatbots.
    • Scriptable command-line tool for server administration.
  • Performance, reliability and development:
    • Sharded clustering with failover.
    • Storage and out of band transfer of large objects like images or document files using local file system or Amazon S3 (other storage systems can be supported with media handlers).
    • JSON or protobuf version 3 wire protocols.
    • Bindings for various programming languages:
      • Javascript with no external dependencies.
      • Java with dependencies on Jackson and Java-Websocket. Suitable for Android but with no Android SDK dependencies.
      • Swift with no external dependencies.
      • C/C++, C#, Go, Python, PHP, Ruby and many other languages using gRPC.
    • Choice of a database backend. Other databases can be added with by writing adapters.

Planned

  • Federation.
  • Location and contacts sharing.
  • Previews of attached documents, links.
  • Recording video messages.
  • Video/audio broadcasting.
  • Group video/audio calls.
  • Attaching music/audio other than voice messages.
  • Better emoji support.
  • Different levels of message persistence (from strict persistence to "store until delivered" to purely ephemeral messaging).
  • Message encryption at rest.
  • End to end encryption with OTR for one-on-one messaging and undecided method for group messaging.
  • Full text search in messages.

Translations

All client software has support for internationalization. The following translations are provided:

LanguageServerWebappAndroidiOS
English
Chinese simplified
Chinese traditional
French
German
Hindi
Korean
Portuguese
Romanian
Russian
Spanish
Thai
Ukrainian
Vietnamese

More translations are welcome. In addition to languages listed above, particularly interested in Arabic, Bengali, Indonesian, Urdu, Japanese, Turkish, Persian.

Third-Party

Projects

Licenses

Screenshots

Android

Android screenshot: list of chats Android screenshot: one conversation Android screenshot: video call

iOS

iOS screenshot: list of chats iOS screenshot: one conversation iOS screenshot: video call

Desktop Web

Desktop web: full app

Mobile Web

Mobile web: contacts Mobile web: chat Mobile web: topic info

SEO Strings

Words 'chat' and 'instant messaging' in Chinese, Russian, Persian and a few other languages.

  • 聊天室 即時通訊
  • чат мессенджер
  • インスタントメッセージ
  • 인스턴트 메신저
  • پیام رسان فوری
  • تراسل فوري
  • فوری پیغام رسانی
  • Nhắn tin tức thời
  • anlık mesajlaşma sohbet
  • mensageiro instantâneo
  • pesan instan
  • mensajería instantánea
  • চ্যাট ইন্সট্যান্ট মেসেজিং
  • चैट त्वरित संदेश
  • তাৎক্ষণিক বার্তা আদান প্রদান