Skip to content

ferdyhape/Blockchain-Create-Product-Split

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

Create Product | Blockchain Based

Table of Contents

  1. Preview
  2. Description
  3. Tech Stack
  4. How to Use
  5. About Creator

Preview

Description

  • This repository is made for learning the block chain technology and how to integrate it with the web application

Tech Stack

  • Solidity
  • Express.js
  • Web3.js
  • Remix IDE
  • Bootstrap 5.0.2
  • Node.js

How to Use

  1. Create Account on Infura or Alchemy and get the API Key for Ethereum testnet (in this case I use Goerli from Infura and Sepolia from Alchemy)

  2. Copy smart contract code from file Backend/TestProductRegistry.sol and paste it to Remix IDE

  3. Compile the smart contract and deploy it to Ethereum testnet (adjust the network to Goerli or Sepolia, depends on your API Key)

  4. Clone this repository

    git clone https://github.com/ferdyhape/Blockchain-Create-Product.git
    
  5. Open backend folder, copy paste .env.example file and rename as .env

  6. Adjust the .env file

    APP_PORT = 5000
    INFURA_URL_API = "https://goerli.infura.io/v3/YOUR_INFURA_API_KEY" // You can get this from Infura
    ALCHEMY_URL_API = "https://eth-sepolia.g.alchemy.com/v2/YOUR_ALCHEMY_API_KEY" // You can get this from Alchemy
    CONTRACT_ADDRESS_GOERLI = "YOUR_CONTRACT_ADDRESS" // You can get this from Remix IDE
    CONTRACT_ADDRESS_SEPOLIA = "YOUR_CONTRACT_ADDRESS" // You can get this from Remix IDE
    MY_WALLET_PRIVATE_KEY = "YOUR_WALLET_PRIVATE_KEY" // You can get this from your wallet
    MY_WALLET_ADDRESS = "YOUR_WALLET_ADDRESS" // You can get this from your wallet
    
  7. Open your terminal and go to the backend folder

    cd backend
    
  8. Install all backend dependencies

    npm install
    
  9. Run the backend server

    npm start
    
  10. Open new terminal and go to the frontend folder

    cd frontend
    
  11. Install all frontend dependencies

    npm install
    
  12. Run the frontend server

    npm start
    
  13. Open your browser and go to http://localhost:3000

  14. You can create a new product by filling the form

  15. You can see the list of products that have been created by clicking the Read Contract button

  16. Enjoy use!

About Creator

linkedin instagram github

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published