Skip to content

This repository contains dependencies you need to get started with making a dapp on thirdweb!

License

Notifications You must be signed in to change notification settings

Peace-Antz/build-a-dapp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Build-a-Dapp

This repository contains the instructions and dependencies you need to start building a decentralized application (Dapp) on Thirdweb.

📋 Requirements

  • A computer with an active internet connection.
  • A code editor like Visual Studio Code.
  • Node Version Manager (NVM) and Node Package Manager (NPM) setup.

🚀 Getting Started

You can enter these code snippets in your terminal.

For macOS:

  1. Install Homebrew:

    Before we can install NVM and NPM, you need to have Homebrew installed:

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  2. Create NVM Working Directory:

    mkdir ~/.nvm
  3. Configure NVM:

    Add the necessary configurations to your ~/.zshrc file:

    echo 'export NVM_DIR="$HOME/.nvm"' >> ~/.zshrc
    echo '[ -s "/usr/local/opt/nvm/nvm.sh" ] && \. "/usr/local/opt/nvm/nvm.sh" # This loads nvm' >> ~/.zshrc
    echo '[ -s "/usr/local/opt/nvm/etc/bash_completion.d/nvm" ] && \. "/usr/local/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion' >> ~/.zshrc
    source ~/.zshrc
  4. Install Node using NVM:

    nvm install node
  5. Resolve Potential Errors:

    If you encounter a http-stream and/or polyfill error, resolve it by:

    npm install stream-http https-browserify browserify-zlib url
  6. Webpack Configuration:

    Create a new file in your project folder named webpack.config.js and paste the following code:

    module.exports = function override(config, env) {
        config.resolve = config.resolve || {};
        config.resolve.fallback = config.resolve.fallback || {};
        config.resolve.fallback["http"] = false;
        config.resolve.fallback["https"] = false;
        config.resolve.fallback["zlib"] = false;
        config.resolve.fallback["url"] = false;
        return config;
    }

For Windows:

  1. Check if Node.js is Installed:

    If not, download and install it from Node.js official site.

  2. Set the $PATH:

    Ensure that the computer recognizes the Node.js command by setting the $PATH.

🛠 Thirdweb Setup

  1. Install Necessary Packages:

    npm i @thirdweb-dev/react @thirdweb-dev/sdk ethers@^5
  2. Create Your App with Thirdweb:

    npx thirdweb create app
  3. Start Your Dapp:

    npm start

About

This repository contains dependencies you need to get started with making a dapp on thirdweb!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published