Inspiration

In Web2, social media companies used to sell user data to others, resulting in users receiving feeds without actively providing likes or dislikes to websites. This situation could easily manipulate individuals. However, with decentralization, no one can access your messages or likes without your consent. You cannot be influenced by others' agendas.

What it does

The chat application I made allows you to chat with any other user without worrying even 1% that your messages are seen by anyone else. You can create an account using your own username for a particular wallet address. Only one account can be made on the blockchain, and then you can search for any other user and talk with them.

How we built it

I made the frontend with the help of React and Tailwind to ensure some responsiveness. I kept the UI simple for now. As for the backend, I developed the smart contract using Solidity and deployed it on the Polygon chain to make its functions accessible on the frontend.

Challenges we ran into

The main challenge I actually faced was figuring out how to proceed. Since I was still learning, my first challenge was ensuring that only a single wallet address was present on the blockchain. After overcoming that hurdle, I had to tackle the task of making the chat function work. I needed to ensure that when a message was sent to a user, it would be stored specifically for that user. However, the biggest challenge I encountered was deploying the smart contract. There weren't many tutorials available, so I had to rely on trial and error, constantly reading documents on Medium and GitHub.

Accomplishments that we're proud of

Finally, when the smart contract was successfully deployed, it was an incredibly gratifying moment for me. I couldn't believe that I had accomplished it. Then, I deployed the site on Netlify so that anyone could access it. When I shared the website with one of my friends, I received appreciation. They were amazed at how I had done it without any external help. At that moment, I felt very proud of creating the DApp chat application entirely by myself.

What we learned

While making this application, my main focus was on reading documentation as there weren't many instructional videos available. I immersed myself in understanding the documentation thoroughly. Writing the smart contract and deploying it were challenging tasks. During my struggles with deploying it on the blockchain, I encountered many new terms, such as cross-chain interoperability, which allows your app to be accessible to users on different blockchains. Additionally, I learned how to interact with the smart contract using React.js on the frontend. These were valuable lessons that I gained throughout the development process.

What's next for Decentralized Chat Application

Next, my plan is to make this app work for every blockchain, achieving cross-chain interoperability. Currently, if a user is on the Polygon chain, they can use the app, but I aim to extend its functionality so that users on different chains, such as Ethereum, can also communicate with each other and send messages. Additionally, I want to integrate transaction capabilities so that users can send tokens to each other.

Although I have some information on how to achieve these goals, I am highly excited to work on implementing them and completing the app as soon as possible. I can envision how beautiful it will look and function once it's fully done.

One issue I've encountered is the need to refresh the page for certain actions, such as creating an account and adding friends. While I've been working on handling this, I haven't fully implemented it due to time constraints. Additionally, there might be instances where transaction processing is slow, which users can check using tools like MetaMask.

Built With

Share this project:

Updates