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.
RE: Decentralized Hive Communities Chat App with similar UI/UX to Discord.