How to design a flexible messaging system with multiple user types and attachments

Wanted to know how to go about creating a messaging system akin to what’s utilised within the Wappler community. Specifically, I’m looking to implement a feature-rich inbox messaging functionality that supports not only text but also attachments and images.
I’d greatly appreciate insights, tips, and best practices on how to architect such a system effectively in Wappler.

1 Like

We have an application like that, built in Wappler.
Its a SaaS product which has been in active development for multiple years, and has many clients/users.

The biggest challenge we have had to face is keeping the page performance in check. Wappler’s AppConnect is not very performant. It has become better over the years, but still lacks compared to other front-end frameworks.
We haven’t seen any major improvement with AC2, which is in beta right now.
So, we’ve had to make sure that we don’t have too many dynamic components on the inbox page at one time.
The complete conversation HTML we build on the server-side and bind it directly on the client side. This is because there are many different designs of messages - in, out, reply, forward, image, video, notes etc - that each need a separate HTML. Using conditions & repeats make the page extremely slow. (Could be done client side as well, using custom JS or custom Wappler component. Its just our choice to do it server side)

One other suggestion - sockets, filters and security.
Its been a challenge to ensure data privacy with complex conditions. We can send sockets securely to the SaaS clients, so that there is no data leak. But within a client’s company also, there can be permissions which do not allow users to see certain messages.
If you do have such a requirement, or see it coming in the future, build your socket architecture with this in mind.
Additionally, when a user has some filters applied on client side, emit messages received from a conversation could show data that otherwise should not be shown due to filter. So another thing to think about.

Lastly, in terms of attachments, images, videos, documents, emojis etc - all work well using built-in components, or some JS library. Given that you maintain the AG Grid component, it would be very easy for you to do those integrations where needed.

2 Likes