mbcse / Decentralized_Social_Media

A decentralized social network deployed on ethereum network where you can share your content freely as there is no central authority to control and also can earn cryptos by keeping the platform free from abusive content
https://dwittermedia.herokuapp.com/
MIT License
24 stars 13 forks source link
bootstrap css ethereum html ipfs javascript jquery truffle truffle-framework web3js

Decentralized Social Media(Dwitter)

Consensys Bootcamp Project

Introduction

In the present world social media has become a very important part of our lives. We share so much content everyday 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 capabilties and for some it's platform to share there content, for some its a platform to raise there voice and for some it's a platform to connect to world. Infact some social media platforms have become a political playground also. Many decisions, ideas, events our 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 of password leak of twitter users and forcefull banning of accounts due to political influence. Also the advertisers may not know wether the ads they are promoting are not influenced by these companies. All these things force us to adopt a decentralization and this project have tried to implemented that.

Platform Overview

The platform is a decentralized social media something similar to twitter but totally in a decentralized way having no server. 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:

Tech stack Used

Future Work

Directory Structure

πŸ“¦ DECENTRALIZED_SOCIAL_MEDIA
 ┣ πŸ“‚ .github
 ┣ πŸ“‚ node_modules
 ┣ πŸ“‚ build (Recent build of the Smart Contracts)
 ┣ πŸ“‚ contract (Solidity Smart Contracts)
 ┣ πŸ“‚ migrations (Truffle deployment migrations)
 ┣ πŸ“‚ test (Smart Contract Tests)
 ┣ πŸ“‚ src (Dapp Frontend)
 ┣ πŸ“œ avoiding_common_attacks.md
 ┣ πŸ“œ design_pattern_decisions.md
 ┣ πŸ“œ package.json (project dependencies)
 ┣ πŸ“œ README.md (Project Documentation)
 ┣ πŸ“œ server.js (Lite server to host frontend)
 β”— πŸ“œ truffle-config.js (Truffle Project Config)

Running the project

Smart Contracts

  1. Run npm i to install dependencies.
  2. Run ganache-cli to start a local chain.
  3. In the projects root directory, run truffle console to interact with the porject.
  4. To compile contracts run truffle compile
  5. To deploy run truffle migrate
  6. To test run truffle test

Frontend/To Start Local Server

  1. In the projects root directory, run npm start

Project Demo

Website πŸ‘‰ https://dwittermedia.herokuapp.com/

YouTube πŸ‘‰ https://youtu.be/l75vF8HAJ8Y

Avoiding Common Attacks

Documented here πŸ‘‰ avoiding_common_attacks.md

Deployed Addresses

Documented here πŸ‘‰ deployed_addresses.md

Design Pattern Decisions

Documented here πŸ‘‰ design_pattern_decisions.md