Decentralized Social Media Using Aws Amplify and Ethereum

Decentralized Social Media Using Aws Amplify and Ethereum

Are you bored with the centralized social apps and are being banned or targeted for no reason? Here is a Blockchain-based solution for you


5 min read


In the present world, social media has become a very important part of our lives. We share so much content every day ranging from what we are doing in our personal lives to professional information. For some, it's a source of income due to its marketing capabilities and for some, it's a platform to share their content, for some it's a platform to raise their voice, and for some, it's a platform to connect to the world. In fact, some social media platforms have become a political playground also. Many decisions, ideas, events are shared on these platforms, consider the case of twitter many heads of countries share updates on this platform. But with all these things we know social media has a problem due to its centralized nature. we have seen password leaks by twitter users and forceful banning of accounts due to political influence. Also, the advertisers may not know whether the ads they are promoting are not influenced by these companies. All these things force us to adopt decentralization and this project has tried to implement that.

Platform Overview

The platform is a decentralized social media something similar to twitter but totally in a decentralized way having no server(Thanks to AWS Amplify). The platform is having a smart contract containing all the important logic and is deployed on Ethereum Blockchain. Some of the features of the platform are:

  • Secure and user-friendly login using metamask wallet
  • Only your Public address is the key to access the platform
  • Cool user profile same as Twitter
  • Easy use interface
  • Commenting feature on dweets
  • Reporting feature on dweets
    • Once a dweet get a specified no of reports it will be sent to maintainers for action
    • You will have to stake some ethers for reporting
    • If the dweet is banned by maintainers you will get a refund and a reward
    • If the dweet is not Banned by maintainers you will get no refund and the staked amount will go to the reported dweet author
  • Like feature on dweets
  • You can upload advertisements(image and a link) and reach out to platform users at a nominal cost
    • Advertisements once submitted will be sent to maintainers for acceptance -If it is rejected then 80% amount will be refunded
  • Maintainers can be added to the platform
  • A dedicated maintainer page where you can give acceptance and ban dweets(only If it gets required reports)

Here Is a short video

Tech stack Used

  • Ethereum
  • IPFS
  • Web3js
  • HTML
  • CSS
  • Bootstrap
  • Javascript
  • Jquery
  • Truffle
  • AWS Amplify


Now let's deep dive into how this is made.

The Frontend:

The tech stack used to make frontend is simple HTML, CSS, javascript, and node as this application is serverless and lite so no need for heavy tech stack, though I could have used react as AWS amplify is awesome to combine with but due to less time, I thought to go with the normal stack.

The Blockchain: The Blockchain used is ethereum and IPFS Network along with wallet support of metamask. I have used Jquery to connect all the aspects of the app with the frontend and web3js library to connect it with blockchain.

The Dweets are stored on Ethereum smart contract and the images and other big data are stored on IPFS(InterPlanetary File Storage) which is a decentralized file storage system. Ipfs returns as a hash of the data uploaded and that is what is linked in the smart contract to avoid the large gas cost.

The dweets are fetched directly from blockchain and events are used to increase the loading speed. I will not go deep into the solidity or blockchain logic part as it would take two-three blogs to explain that but you can view the solidity logic in the repo given at end.

The Backend and Hosting:

Thanks to AWS amplify which provides easy-to-use low-cost hosting and backend serverless integrations that gave this app a powerful boost. The WebApp is deployed on AWS amplify with zero code was written to manage it. There are lambda functions configured to trigger tags update so that a real-time trending post can be shown, I tried but due to less time was not able to complete it, will share the same in the next blog. Also, the AWS amplify text to speech and Machine learning frameworks like sentiment analysis, etc will be used to monitor dweets so that maintainers can get a technological point of view of a bad and good post.

Screenshot from 2021-03-02 12-43-08.png

Screenshot from 2021-03-02 12-43-13.png

I just Loved the AWS amplify as it provides so much ease to configure and deploy things for which we usually waste a lot of time

The AWS amplify with Blockchain is really a great combination that can provide great products in future

Future Work

  • Use Meta transactions(gasless transactions) to make the platform gas-free for users
  • Add more Features like follow, profile view, etc
  • Add video Advertisement options
  • Add reporting on comments
  • Aws Amplify Text to speech and AWS Sentiment Analysis for better management
  • Aws Object and Image Detection to track explicit or wrong images
  • Aws amplify analytics to track platform
  • Aws amplify push notifications for real-time dweet updates

Project Demo

Website ๐Ÿ‘‰

Project Repo

Repo ๐Ÿ‘‰