Hi AppMaster Team,
I’m working on a 1-to-1 direct messaging (DM) feature between two users and need help figuring out how to achieve this in AppMaster.io.
I’ve read the WebSocket tutorial (How to use WebSockets | AppMaster), but I still have some questions:
My Questions
-
How exactly does backend WebSocket work in AppMaster — is it only for backend updates, or can it handle real-time chat?
-
For Web App, should I use Custom JavaScript to connect to the WebSocket endpoint, since there’s no native block?
-
For Mobile App, is WebSocket supported? If not, what’s the best fallback (like REST polling) to achieve real-time chat?
Please help me understand how to achieve this!
Has anyone already implemented a real-time 1-to-1 chat (DM) system like this in AppMaster?
Any tips or examples would be really appreciated.
Thanks so much!
Main difference of WebSockets and usual endpoints for REST API requests is that you need to start creating it with adding new WS endpoint first. Then you need to add variables (or parameters) for incoming and and outgoing messages. Next step is to create logic inside endpoint and configure what should be done when new message is received. So it can handle real-time chat.
As soon as you create WebSocket at backend - new triggers and blocks will be available for frontend
There is no need to use any custom JS.
Okay, i will follow this.
Thank you.
For WebSocket, there are two sides: client and server .
I want to know: which side does the component support?
Does it act as the WebSocket client , the server , or both?
AppMaster supports logic and required processes for both sides
I’m working on a one-to-one chat system
Here’s what I’m seeing in my backend logs:
[SEND TO WEBSOCKET] Connection with ID 'n2D9NyKsdRRuvf8KCjNd5U' (EP 2474251) not found
My questions:
- Is the WebSocket
connection_id
management handled on the server or by the client?
- Who is responsible for maintaining and tracking the active connections — the backend or the frontend?
- How can I programmatically check if a
connection_id
is still active before trying to send a message?
Context:
- My WebSocket BPs include:
Connect, Receive, and UI Send Action
- I’m using User IDs from the AppMaster database
- Logs confirm the sender’s connection is active, but fail when resolving the receiver’s connection_id
If you need to review the exact BPs I’ve built, I’m happy to share them — please let me know.
Would love any guidance, suggestions, or best practices to improve or debug this setup!
Thanks in advance