Trying to find a library (open source) to include a messaging feature in an app. Looking for an email type equivalent, although a chatbot type thing would work. Anyone found anything like that?
I haven’t worked with any, so I can’t really help.
I did give the question to AppStudio’s built in ChatGPT:
You: I’m trying to find an open source library for messaging in a JavaScript app
ChatGPT:
Here are some notable open-source libraries for adding messaging features in a JavaScript application:
Description: A library for real-time web applications. It enables real-time, bidirectional, and event-based communication between web clients and servers.
GitHub: Socket.IO
Usage: Ideal for chat applications, real-time notifications, and collaborative tools.
2. Rocket.Chat
Description: An open-source team chat platform that you can use to build messaging features. It supports real-time messaging, file sharing, and integration with other services.
GitHub: Rocket.Chat
Usage: You can host your own instance and customize the chat functionality as needed.
3. PeerJS
Description: A library that simplifies peer-to-peer connections, particularly useful for real-time messaging and file sharing.
GitHub: PeerJS
Usage: You can build decentralized real-time apps without the need for server infrastructure.
4. ChatJS
Description: A lightweight chat library for creating real-time messaging applications. It provides a straightforward API for building chat features.
GitHub: ChatJS
Usage: Great for basic chat functionalities without too much overhead.
5. Mattermost
Description: An open-source messaging platform designed primarily for team communication. Offers features such as group messaging, notifications, and file sharing.
GitHub: Mattermost
Usage: You can use it as a standalone system or integrate it with your app for messaging.
6. Discourse
Description: An open-source discussion platform that can be used for building messaging and community forums.
GitHub: Discourse
Usage: Provides a rich set of features for discussions, including messaging and notifications.
Integration Tips
Choosing the Right Library: Depending on whether you need real-time capabilities or a more structured messaging system, choose a library that fits your requirements.
Documentation: Always refer to the official documentation and examples provided in the library’s GitHub repository to get started.
By utilizing one of these libraries, you can effectively integrate messaging functionalities into your JavaScript application.
You can do it fairly easily using push notifications.
- User types message
- User hits send
- Message is sent to server
- Server generates a push notification containing the message text or a message id
- App displays received text or makes an ajax call to retrieve the message text
Hope that helps.
#ppetree assisted me with a push notification system based on google messaging. It’s free and supports many platforms via chrome.
We used websockets in appstudio to an aws server who distributed the messages to the entire chat connected users.
EG, you need a server to decide what to do with what mrssages and user tracking of who’s in what group, the endpoint id, etc.
Thank you. I have no problem doing that just avoiding finding out after the fact that there is a library that I could’ve added, instead of doing a days work.
Thank you. I have succesfully done push notifications to my app when it is not running but the service I found does cost after a farily large number of impressions. Which service did you end up with?
Thank you. I need to use that AI a bit more.
Back when I was looking, the decent libraries all charged a monthly fee and had access to the users texts… something I couldn’t allow for legal reasons. Not sure what the current status is but once you write this it’s done and it’s yours.
Also, I use Framework7 and it has all the css and JavaScript to manage the chat display. https://framework7.io/vue/messages
I’m using Google Firebase Cloud Messaging (FCM).
I did write a test program in appstudio that directly called this service without any server based software.
The issue was knowing the endpoint ids. You can also send to everyone without knowing ids.
That looks good. Work well?