Git Product home page Git Product logo

epic-byte / digital-library-marketplace Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 3.0 7.7 MB

A decentralized web3 Drive where digital items in ones Private Drive can be put up for sale on the public marketplace, when bought a copy of the item is made to the buyers own Drive.. User Manual: https://docs.google.com/document/d/1BdJDtpJNNA4v50HElhuG54_vyWScKbgA9w-xG7TFL-M/edit#heading=h.s809w61bx645

Home Page: http://lebium-beta.surge.sh/

License: MIT License

JavaScript 7.41% Solidity 0.24% Shell 0.33% CSS 89.41% HTML 2.45% Less 0.03% Dockerfile 0.08% TypeScript 0.03%
blockchain chainlink dapp hardhat infura ipfs react scaffold-eth smart-contracts solidity

digital-library-marketplace's Introduction

LEBIUM Dapp

Table of contents

Overview

This is a project by Team Call-Byte presented for the chainlink spring 2022 hackathon.

This is a digital decentralized library marketplace that allows users to upload files, retrieve files in their private library, share files with other users from the service. It also allows users to put their files up for public sales and make money from it.

We have integrated the use of Chainlink Price Feed to help Lebium communicate with live changing prices of ETHUSD to accurately represent items up for public sale.

We wanted people to have a safe secure private and permanent place to store private digital items like files, secretes etc, we also wanted people to be able to make money of the digital items they wish to make public, hence the public library market.

Project Features

  • Upload files.

  • Retrieve files.

  • Share files to other users.

  • Put files up for public sales.

  • Buy items from users.

Technologies

Stack Usage
Solidity Smart contract
React JS Frontend

Repo Setup

To setup the repo, fork Lebium repo, then clone the forked repository to create a copy on the local machine.

$ git clone https://github.com/{GitHub-Username}/Digital-Library-Marketplace.git

Change directory to the cloned repo and set the original repository as the "upstream" and your forked repository as the "origin" using terminal.

$ git remote add upstream https://github.com/Epic-Byte/Digital-Library-Marketplace.git

Requirements

  • Hardhat
  • Alchemy key
  • Metamask key
  • Etherscan.io API Url
  • Node JS

Setup the Project

These are the steps involved in setting up this project

Install Hardhat

The first step involves cloning and installing hardhat.

$ cd Digital-Library-Marketplace
 
$ npm i -D hardhat
 
$ npm install
 
$ npm install --save-dev "@nomiclabs/hardhat-waffle" "ethereum-waffle" "chai" "@nomiclabs/hardhat-ethers" "ethers" "web3" "@nomiclabs/hardhat-web3" "@nomiclabs/hardhat-etherscan" "@openzeppelin/contracts" "dotenv"
 
# If you encounter errors installing the dependencies above, delete the old package-lock.json and run the `npm install --save-dev` command again

Env Setup

Next create a .env file by using the sample.env. Retrieve your information from the relevant sites and input the information where needed in the .env file.

To retrieve your metamask private key.

  • Open your account details by clicking on the three dots on the metamask extension on your chrome browser
  • Click on export private key
  • Verify your password
  • Copy your private key and place it in the .env file

metamask

To retrieve your alchemy key.

  • Login to your account on https://www.alchemy.com/
  • Once youre redirected to your dashboard, click on create app.
  • Fill in the relevant details especially the chain and network
  • Once the app has been created, click on view key.
  • Copy the HTTP and place it in the .env file.

alchemy

To retrieve your etherscan key.

  • Login to etherscan and hover over the dropdown arrow for your profile on the navbar.
  • Click on API keys and add to create a new project (optional step).
  • Once the project has been created, click on the copy button to copy the API key.
  • Paste it in the .env file

etherscan key

Setup Hardhat.config

Below is the setup for the hardhat.config.json

hardhat

Create the SmartContract

  • First write the Smartcontract codes within the contracts folder.
  • The next step involves the compilation, deployment and verification of the contract on the testnet.

Compile

  • To compile the smartcontract before deployment:
$ npx hardhat compile

Deploy

  • To deploy the smartcontract:
$ npx hardhat run packages/hardhat/deploy/01_Library.js --network rinkeby

Verify

  • To verify the smartcontract:
$ npx hardhat verify 0xcdb25aa30af6bbe029e8348cad9a0d37293c0c85 --network rinkeby

Setup the Frontend

  • First run the frontend on your local server to ensure it's fully functional before building for production.

Install Dependencies

  • Setup and install dependencies
$ cd react-app
 
$ npm install
 
$ npm install react-scripts@latest

Start Server

  • Start the server on localhost
$ npm run start

Build the Frontend

  • Create an optimized production build, which can be hosted on sites like Heroku, Netlify, Surge etc.
$ npm run build

Contract Address

Live Link

Contributors

This Project was created by the members of Call Byte during the 2022 Chainlink Spring Hackathon.

GitHub Usernames

  • GbolahanAnon
  • Godhanded
  • Bori7
  • kingzamzon
  • frankudoags

Contributing to the project

If you find something worth contributing, please fork the repo, make a pull request and add valid and well-reasoned explanations about your changes or comments.

Before adding a pull request, please note:

  • Your contributions should be inviting and clear.
  • Any addition should be relevant.
  • New features should be easy to contribute to.

All suggestions are welcome!

README Created by GbolahanAnon for Call Byte

digital-library-marketplace's People

Contributors

galadd avatar godhanded avatar kingzamzon avatar maura-dev avatar taofeek-ob avatar

Stargazers

 avatar

Watchers

 avatar  avatar

digital-library-marketplace's Issues

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.