Coder Social home page Coder Social logo

magnet_link_billboard's Introduction

Magnet Link Billboard

Authors

Mingyuan Du    Zijun Wang

Yuhang Xiao    Zhaosheng Li

Table of contents

Description

This project is about building a decentralized application (DApp). The DApp we propose to create is magnet link billboard, which is a peer-to-peer (P2P) platform that encourages users to share documents without worrying about centralized authority and the location of original files. Each document on the platform is considered as a seed. The user can act as a writer and contribute to the DApp by uploading seeds. Also, the user can become a visitor to the platform by browsing, downloading, or endorsing the seeds on the billboard. The back-end of this work is a smart contract, which guarantees the trustworthy transactions of digital assets and constraints some operations on the online platform.

Architecture diagram

This image illustrates the business logic defined by the smart contract at back-end

Architecture.png

Constraints

Our smart contrat defines the following contraints on this DApp:

  • A user shall not download the seeds that are uploaded by himself/hersel
  • A user shall download every single seed only for once
  • A user shall only endorse the seeds he/she has already downloaded

Constraint.png

Files in this repo

This GitHub repo contains the following folders or files

  • migrations folder contains migration files when delploying the smart contract

  • img folder contains some relevant images for this project

  • src folder contains the smart contract code react components code

  • test folder contains the test code for smart contract and some react components

  • package.json and package-lock.json list out all the dependencies for this DApp

  • truffle-config.js is the file when we configure a truffle project at the beginning stage of this work

  • Project_Report.pdf is the report of this project, which contains a specific user workflow

  • sample_data.txt is a test seed transmitted to the DApp

Front-end URL

https://www.magnetlinkbillboard.com/

NOTE 1: A MetaMask account is required when using this DApp

NOTE 2: The frontend interface only indicates the basic information of seeds except the link. If one wants to acquire the link, he/she needs to click the Download button and has enough amount of ether, unless the seed is for free

Running the code

  1. Clone this repo to your local machine
git clone https://github.com/zhaoshengEE/Magnet_Link_Billboard.git
  1. Open the repo with Visual Studio Code, IntelliJ, or other IDE

  2. Delete the two .json files in src/abis

  3. Change Node Version Manager into the 12.13.0 version

nvm use 12.13.0
  1. Install all the dependencies
npm install
  1. Deploy the smart contract and create migration files
truffle migrate --network rinkeby
  1. Run the DApp and start your journey on the magnet link billboard
npm start

magnet_link_billboard's People

Contributors

zijun726911 avatar yuhang-eng avatar zhaoshengee avatar dukedudu avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.