FlowChat, A new era of messaging on FLOW

FlowChat, A new era of messaging on FLOW

FLowChat is a Fully decentralized messaging app Built using Cadence and React. it supports chats and channels. channel owner can get paid for their contents with FLOW token.

Created on 14th July 2023

FlowChat, A new era of messaging on FLOW

FlowChat, A new era of messaging on FLOW

FLowChat is a Fully decentralized messaging app Built using Cadence and React. it supports chats and channels. channel owner can get paid for their contents with FLOW token.

The problem FlowChat, A new era of messaging on FLOW solves

FlowChat enables users to communicate with each other through two distinct methods: Chats and Channels.

Chats facilitate the exchange of various types of messages, including text, voice, and pictures, among individuals. This feature is exclusively accessible to parties involved in the conversation.

Channels, on the other hand, can be either public or private. Both types of channels are stored as resources with specific storage paths.
Public channels allow anyone to join by utilizing its unique identification code. On the contrary, private channels require a subscription fee, determined by the channel administrator, to be paid by individuals seeking access.

Challenges I ran into

Resource Object: Flow is a blockchain designed with a focus on resource-oriented functionality, allowing the owner to have complete control over how they interact with the entity. However, since it's a relatively new concept in blockchain, fully utilizing its potential requires additional effort. When we began developing smart contracts for FlowChat, we initially used structures. However, we encountered difficulties when defining channels, particularly private ones. We wanted to ensure that only the owner had access to their channel and could grant access to followers. To address this, we started defining channels as resources, which ensured that only the owner could access their resource. Initially, granting access became complex as we implemented a waiting list approach for joining. However, after exploring the Cadence documentation further, we simplified the logic by using resource linking to grant access to followers. This approach made everything clearer and more straightforward. In future steps, we believe we can leverage the resource feature in other areas, such as chats.

Address Proofing: We recognized, we should limit access to chats more. In our early contract version, we passed AuthAccounts to our contracts. However, we encountered two disadvantages:

  • First, it was identified as an anti-pattern in the Cadence reference.
  • Second, in scripts, we didn't have access to AuthAccounts.

Therefore, we searched for better solutions. Eventually, we redesigned the contract to involve signing a nonce and verifying it using the PublicKey.verify function within the pre-section of the function. Unfortunately, we encountered an issue with the verification of signatures provided by the fcl package in the contract's verify function. Currently, we are still investigating the problem and require more time to resolve it.

Tracks Applied (2)

Mobile

The Project is design as first-Mobile project, in development, team trys to make everything easy mobile users, and it fu...Read More

Everything else

The project is a messaging app that is not fit in AI, Gaming and Defi category

Discussion

Builders also viewed

See more projects on Devfolio