Decentralized Hive Communities Chat App with similar UI/UX to Discord.

in HiveDevs3 years ago (edited)

Many hive communities depend and use Discord daily for reasons, such as:

  • there is no chat support for communities.
  • discord is convenient and can be accessed with a click of a link.
  • people not on hive can participate.

We can notice that this dependence clearly shows us that there is a use and need for such application. Communities need a space for chat and if they do not find it in hive ecosystem, they look elsewhere.

Let's imagine that we could create a similar app:
stream.png

In the above picture we can see a design of a similar app. The difference is that there are no chat servers, but rather hive communities. And each hive community can customize and moderate their chat space. On the right side, we can see the use of hive community roles and hive usernames subscribed to the community.

What benefits would such app bring...

  • Message authentication: if a hive user posts a message, the app verifies the authenticity by checking its signature.
  • Promoting hive ecosystem: if the app proves successful, instead of sharing Discord links, communities would posts links to apps in the hive ecosystem
  • On-boarding users: guest/lite accounts can check, post messages depending on community settings.
  • Encrypted communication: a channel can be public or encrypted, private messages would only be encrypted.
  • Decentralized system: more on this point below.
  • Open source.
  • API: since the app would be decentralized and opensource, programmers could write chat bots just like they do on Discord, or they could create a customized front-end or embed the chat in their application
  • Potential to add additional features and integration with hive or with current discord servers.

Message authentication

One of the key features of decentralized chat app is message authentication. Without proper message authentication, anyone could impersonate any user. In other words, such application would be unreliable. That's why this is a key feature.

Decentralized system

Generally, chatting apps work by connecting to a server, which keeps track of who is online, stores chat logs and passes messages. In a distributed system, there is more than one node and data is duplicated across the network.
From the point of view of users or communities, they will not have to deal with the trouble of running any nodes as long as there is at least one public node running.
A public node is a node that would serve all hive communities, and store their chat logs for X amount of time or Y space per channel as configured by node owner.
A private or partial node would serve a subset of communities.
By default, hive communities would use all available nodes, or they could switch to a whitelist configuration.

Additional features

Apart from the chat features, the app can display additional information about each hive community, such as the about page, and list of posts.

about.png

posts.png

This proposal is for support for:

  • web chat client: opensource, with UI/UX shown in pictures above
  • web chat server: opensource, decentralized, chat server

The main features include:

  • Message authentication
  • Share link
  • Chat space customization
  • Encrypted communication
  • hive keychain login
  • Guest/lite accounts
  • API
  • show community info, posts

This is the list of features for the first version of the application.

You can support this proposal via:

Other ways of support:

One reason for posting this proposal is to see the community reaction and to find out about your opinion on this application. If you got an idea of a feature, or are up for a more technical discussion on points mentioned above, feel free to do so. Also if there are others who are doing a similar application, I welcome collaboration.

Past Work:

In hive ecosystem:

Other relevant:

Thank you for your attention! 🌻

Sort:  

I would love to hear more detailed technical aspects of the proposal. How do you plan to utilize the blockchain? Are going to use custom_json? Do you plan to store all the messages on-chain? How do you plan to encrypt private channels to make it possible to access only by the members of the channel?

Hi, thank you for your interest in discussion.
How do you plan to utilize the blockchain?
The blockchain has support for communities. Communities can set roles and titles. People can subscribe and unsubscribe to them. These features will be used in this application. This way, for example, people who subscribed into LeoFinance, will also be inside the LeoFinance chat server in this app. In other words there will be no need for them to join some other chat group. The action of joining a community means they joined the chat server.
Are going to use custom_json?
Most of community settings utilize custom_json, so it is required to use it for setting up the community. Furthermore, the admins can edit community properties, which if they can support custom keys, can be used to set up the number of channels, their names permissions or other settings. Otherwise custom_json can be used for setting up the channels.
Do you plan to store all the messages on-chain?
No. The proposal includes the creation of a decentralized chat server node, which will accept signed messages (signed by posting key or memo key. Or for example, another alternative would be to use throwaway keys.). The decentralized chat server node will verify the signature and pass the message to interested clients. These clients will verify it again to prevent impersonation by dishonest decentralized chat nodes. This achieves message authentication.
How do you plan to encrypt private channels to make it possible to access only by the members of the channel?
For two person channel the hive.memo.encode(hive-js library) can be used. It can also be used for 3 or more people but the storage cost of the messages increases as the message has to be encoded for each participant. For larger private channels, the person who opens it shares an encrypted invite link. The encrypted invite link would contain a random or user entered private key which would be used for encryption and decryption. Now to correctly answer your question, this will not prevent others from accessing the channel via API, however all they would see is encrypted messages.
If however, you are asking how to make it possible so that it is accessible only by the members of the channel, then the answer is: A member of the channel will have to run their own private server chat node. And set up their community to use whitelist for that particular channel. This way the encrypted messages will be only stored on the server they control and served to people who can see them. This however does not mean that others have no access to the encrypted messages, as they still use the internet, your hosting provider can access them, ISP, etc.
If you got any more question or if something is not clear, feel free to ask.

How do you plan to incentivize running a node?

There is already a very similar project, running for 2 years and it's basically dying (even though it is integrated with peakd): https://peakd.com/beechat/@aggroed/beechat-chatting-with-friends-through-hive-sites-like-nftshowroom-com

It was created by a known team, with much more resources to code and market the solution. How do you think your project will be different and how do you plan to market it?

While beechat may in name appear similar, there are many differences. I'd point some out. (Correct me if I am wrong) bee chat client is open source, the server is not. If the server is not opensource it is neither decentralized. Putting aside comparisons:
The projects stems from the observation that most communities on hive use discord. This shows a need for such application. Bee chat did not fill this need as it did not integrate with communities as discord does. In other words, the main users of this application would be hive community owners. With this application, just by setting up their community they would immediately have a chat space, that can be configured to their needs. As long as this application does not miss any feature that is expected by community owners they might consider using it. If community owners start using it, they will post invite links for their members to join.

How do you plan to incentivize running a node?
The node running cost could be very cheap ranging from $3-$5/month for minimal node. Each node could set how much disk space and bandwidth it is willing to use and whether to serve all communities or a selected few. In general, users and community owners will not need to deal with setting up their node as long as there is a public node running. In the beginning two-three public nodes would suffice. If it would be necessary to incentivize running a node, it could be done, but in this case I do not think it will be needed. After-all, the chat servers are handling messages, not transactions. The worst thing that can happen is that the chat log history gets deleted. But with two-three nodes this should be very unlikely.

Don't get me wrong but this sounds to me like wishful thinking. If you design the app to be decentralized, you have to provide a mechanism to incentivize node operators. If you don't do that no third party will run the node in the long run, even if the resource requirements are low. Running a node requires time and effort to keep it alive and the cost of the resources (server) is only one of the many factors. If you're the only one who runs the node, the solution is not decentralized and will have a single point of failure.

With all the respect, I don't think it's possible to create any meaningful chat solution with the proposed budget, especially the one that might compete with Discord. It might be possible to create a proof of concept but that's all. And there is a huge difference between the POC and the production-ready solution. If you want to create POC, you should mention it in the proposal and you should also present further plans and the expected budget for the next steps.

Don't get me wrong but this sounds to me like wishful thinking. If you design the app to be decentralized, you have to provide a mechanism to incentivize node operators.
Let's assume it would be as you say. Would you focus on incentivizing node running before deploying a sufficiently working prototype and seeing the usage report?
Incentivizing node running is not a priority for first version.
Why? It is not necessary in this case. If there were transactions, then yes, decentralization would depend on number of different nodes. However for chat app, the decentralization is there only to provide redundancy and availability.

If you're the only one who runs the node, the solution is not decentralized and will have a single point of failure.
The solution is decentralizable! That's the correct term. Yes if there is just one node it is not decentralized and that's how things first start off, but it would still still be decentralizable.

With all the respect, I don't think it's possible to create any meaningful chat solution with the proposed budget, especially the one that might compete with Discord.
This project is not meant to compete with Discord, but rather create a chat space so that hive communities do not have to rely on Discord and in turn promote hive ecosystem by creating share links (instead of discord share links), and allow guest/lite accounts to participate (as long as the channel settings allow it) to help with on-boarding.

And there is a huge difference between the POC and the production-ready solution.
In marketing terms, yes this is POC. But in software terms, it is a production-ready solution.

What exactly does a node do?
I get that it's a server, but in this situation what creates the need for the node? The new chat app itself I'm guessing requires at least one? Does each node & app include a Hive instance? If so then obviously there isn't a strong incentive to run the chat app server node for other people.
But I'd also assume Hive has many nodes and they are incentivized by earning Hive tokens and Hive cash?

what about @spk.network ?

Isn't it a game changer? It will incentivize running a node, or not?

They have plans to incentivize running a node, so it's totally different thing.

Okay, I dont understand.

Thks for your answer.

I'd be very interested to see something like this but using matrix protocol with some custom functionality to make Hive work nicely. That way there is interop between hive and non hive users out of the box plus you can use already existing clients like element to interact with the platform

I have checked the matrix protocol. It would be interesting idea to add a matrix interop. On the other hand the matrix protocol is huge and complex, and so the programming time and maintenance would be huge. But its definitely a good option. I would have to read the matrix documentation in greater detail to get an estimate of how much time and effort would be required to use it.

What about BeeChat by Peakd team?

I responded to engrave's question about beechat in the comment https://peakd.com/@mirafun/re-engrave-rci138 .

Thank you i will check it out

It would be great to see some competition in this area. Many have attempted at a successful application. Spending 6000 HBD on this experiment barely makes a dent in DHF. You have my vote on this. Best of Luck!
!PIZZA
!LUV

Congratulations @mirafun! You have completed the following achievement on the Hive blockchain and have been rewarded with new badge(s):

You got more than 50 replies.
Your next target is to reach 100 replies.

You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

Support the HiveBuzz project. Vote for our proposal!

PIZZA!

PIZZA Holders sent $PIZZA tips in this post's comments:
@vimukthi(1/5) tipped @mirafun (x1)

Learn more at https://hive.pizza.

Give me a reply to this meager so I can locate it easy from my pc and support it after work

Im very happy to hear about your proposal.
I totally support you and will promote your proposal all I can.

If a serious messaging system is not posible on chain, then I don't believe in a great future for HIVE. And I really dont want to lose my vision.

I have no idea about code, so finding you is like a lifejacket to me!!!

GO GO GO!!!