Inspiration

These days we have come to know about big tech companies reported for prviacy leaks. And it seems obvious, since all our data is handled by a single body and they can do whatever they want with that data. So there is a solution? Yes, ofcourse blockchain and web3. Tris is inspired by one such idea. It is a totally decentralised social media dapp with a lot more than a conventional social media app.

Screenshot

Screenshot 2022-08-08 005915 create

What it does

In basic terms it is similar to other social media platforms, i.e., you can upload posts, like posts, comment on them, follow others etc. But it comes with a lot more that just this. Some keypoints are :

  • Totally decentrailsed environment, deployed on polygon network, ensures complete data security.
  • Seamless login with Metamask, which also ensures security.
  • All the storage of files and images are done on IPFS servers.
  • You can even upload your wall photo and bio.
  • You can not just upload posts but can actually make NFT of them and then can sell or buy them from others.
  • Clean and minimalistic UI ensures a user friendly environment.

Contract deployment links

How I built it

I used a great combination of backend and frontend to finish this project.

Frontend

  • Next js
  • Chakra-UI

Backend

  • Alchemy ( For deploying the contract to polygon )
  • NFT.storage ( for IPFS servers/storing files )
  • Web3 Js ( Integration of frontend with backend )
  • Sequence ( Wallet integration )

Hosting

  • Spheron ( Hosting service )
  • Filecoin ( IPFS hosting )

And I created this whole project on vim. ( A really big achievement for meπŸ˜… )

Challenges I ran into

While building this project since I used a lot of different technlogies, most of them for the first time, I ran into couple of really tough challenges

  • Adding an effective post system for users

    • I couldn't store every post directly inside user struct so I had to create a seperate system for storing posts, I used SHA-3 encryption with the IPFS link for the post and used that hash to identify each post.
  • Creating a system for buying and selling posts

    • For buying and selling a post I had to create a bit complex system to ensure that the post is properly transfered and it is resellable, it took a lots of effort but that was worth it.
  • Integrating all the different data with the frontend

    • The contract itself was quite big so handling logins, data, user etc. was quite hard. But this was solved as I went into integrating the code with the backend. I used a mixture of local storage and session storage to create a secure environment for the user.

Accomplishments that I'm proud of

  • Post system
    • I could successfully create a system for buying and selling posts (NFT) which can be sold or bought any number of time without any complication.
  • Clean UI
    • I designed the whole project keeping the UI clean and responsive. Every single page is more or less responsive for mobile devices.

What I learned

  • Creating a complex and responsive web UI.
  • Working of blockchain and especially polygon.
  • IPFS storage system and logic behind it.
  • Wrinting clean solidity code.
  • In mid way I thought to migrate the whole prroject to typescript hence mastering it.

What's next for Tris

  • Creating a clean marketplace for selling and buying posts.
  • Using meta ( gas less ) transaction to provide a better user experience.
  • Encrypting each post data to make it more secure.
  • Adding a share of the owner of the contract in all the transaction in the system.

Built With

Share this project:

Updates