I’m in this situation right now and am exploring options that will help me avoid reinventing the wheel.
My plan was to just build it from scratch using socket.io.
While looking at options like using matrix or using a third party tool like pusher, I thought to check here to see what others have done.
My bias would be for Matrix (being project lead thereof); there is a whole new generation of client sdks (eg matrix-rust-sdk) on the horizon which are transformative - likewise massive serverside improvements like v3 sync which will provide instant login & sync (somewhat inspired by Discord). You also get e2ee, decentralisation and bridges to a bazillion other systems too.
That said, the right stack is generally the one that matches your requirements, and (if this isn't primarily a learning exercise) whatever you're most familiar with. The hardest part of building a Discord or Slack-like in 2022 is actually not the technical stuff. There are many comprehensive open-source products already out there that compete with these companies, such as Mattermost, RocketChat and Element.
There are more chat options here [4].
[1a] - https://www.unrealircd.org/
[1b]- https://github.com/unrealircd/unrealircd/
[2a] - https://anope.org/
[2b] - https://github.com/anope/anope/
[3a] - https://thelounge.chat/
[3b] - https://github.com/thelounge
[4] - https://www.ilmarilauhakangas.fi/irc_technology_news_from_th...
It is an nginx extension, that has supports all types of clients, channels, multiplexing, introspection, tens of thosuands connects, etc.
This doesn't scale, or you end up wasting all your resources on things that are not important to your customers.
Use something out there, if the business grew and you had nothing more impactful to do (building features that customers actually care about), invest on infrastructure.
Let me know if you want a tour! (egbert at company domain name)
You can host it, but it is very much in the beta phases as I'm working on better storage options.
While it would be acceptable to also have a web interface and/or other protocols, it should need to also display the connection information (host, port, channel) for IRC, even if JavaScripts and/or CSS are disabled.
I do think there is a missing or hard to find piece for privacy oriented friends and family chat (i.e. for just a few users, not a large userbase like discord). It would among other things have a super simple desktop client that doesn't confuse my mom. Maybe an IRC extension would suffice for the server side. Client side would be tkinter and super simple, no menus, no channels, no configuration options, just type and leave it running. I sometimes think of writing something like that.