/create-web3-dapp

The complete toolbox to create web3 applications

Primary LanguageTypeScriptGNU Affero General Public License v3.0AGPL-3.0

Create Web3 DApp

Stargazers Forks Contributors Issues MIT License

Everything you need to create Web3 Dapps.

  • Creating an App – How to create a new app.
  • Docs – How to develop apps bootstrapped with Create Web3 Dapp

Create Web3 DApp works on macOS, Windows, and Linux.
If something doesn’t work, please file an issue.
If you have questions or need help, please ask in GitHub Discussions.

About The Project

create-web3-dapp is an npx package that allows developers to create any web3 application in ~2 minutes.

The create-web3-dapp package is a NextJS-based framework, compatible with the most used blockchains such as Ethereum, Polygon, Optimism, Arbitrum, and Solana, that helps web3 developers build production-ready decentralized applications at lightning speed, using pre-made React components, webhooks, and APIs.

Quick Overview

npx create-web3-dapp@latest
cd my-dapp
npm run dev

If you've previously installed create-web3-dapp globally via npx create-web3-dapp, the CLI builder will notify you if a new version has been released. In any case, we always suggest you to run using the latest available version by running npx create-web3-dapp@latest.

(npx comes with npm 5.2+ and higher, see instructions for older npm versions)

Then open http://localhost:3000/ to see your app.

alt text

Get Started Immediately

You don’t need to install or configure tools like Rainbowkit, Phantom connect, Hardhat, or Anchor
They will be automatically added and preconfigured for you to focus on the code.

Create a new project, and you’re good to go.

Creating an App

You’ll need to have Node 14.0.0 or later version on your local development machine (but it’s not required on the server). We recommend using the latest LTS version. You can use nvm (macOS/Linux) or nvm-windows to switch Node versions between different projects.

To create a new app, go through the following steps:

  1. In your terminal run:
  npx create-web3-dapp@latest
  1. Select the dependencies and components you want to include in your web3 application: product-screenshot-2

It will create a directory called with the given name inside the current folder.

Inside that directory, Create Web3 Dapp it will generate the initial project structure and install the needed dependencies:

Folder Structure

Without Blockchain Development Environment

my-dapp
├── README.md
├── node_modules
├── package.json
├── .gitignore
├── public
│   ├── favicon.ico
│   ├── index.html
│   └── manifest.json
└── src
    ├── App.css
    ├── App.js
    ├── App.test.js
    ├── index.css
    ├── index.js
    ├── logo.svg
    └── serviceWorker.js
    └── setupTests.js

With Blockchain Development Environment

my-dapp
├── README.md
├── node_modules
├── package.json
├── .gitignore
├── public
│   ├── favicon.ico
│   ├── index.html
│   └── manifest.json
└── src
    ├── App.css
    ├── App.js
    ├── App.test.js
    ├── index.css
    ├── index.js
    ├── logo.svg
    └── serviceWorker.js
    └── setupTests.js

No configuration or complicated folder structures, only the files you need to build your Dapp.
Once the installation is done, you can open your project folder:

cd my-dapp

And, in case you've installed a blockchain development environment, navigate to the frontend folder.

Inside the newly created project, you can run some built-in commands:

npm run dev

Runs the app in development mode.
Open http://localhost:3000 to view it in the browser.

The page will automatically reload if you make changes to the code.
You will see the build errors and lint warnings in the console.

User Guide

You can find detailed instructions on using Create Web3 DApp and many tips in its documentation.

Philosophy

  • One Dependency: There is only one build dependency. It uses webpack, Babel, ESLint, and other amazing projects, but provides a cohesive curated experience on top of them.

  • No Configuration Required: You don't need to configure anything. A reasonably good configuration of both development and production builds is handled for you so you can focus on writing code.

  • No Lock-In: You can “eject” to a custom setup at any time. Run a single command, and all the configuration and build dependencies will be moved directly into your project, so you can pick up right where you left off.

What’s Included?

Your environment will have everything you need to build a dapp:

  • NextJS, React, Alchemy Enhanced APIs, Alchemy SDK, Rainbowkit, Wagmi
  • Hassle-free updates for the above tools with a single dependency.

Check out this guide (coming soon) to learn how to build with Create Web3 Dapp.

Check out this guide (coming soon) for an overview of the full overview of the code base.

Popular Alternatives

Create Web3 Dapp is a great fit for:

  • Learning Web3 in a comfortable and feature-rich development environment.
  • Starting new Web3 Applications
  • Creating examples and experiment with React for your libraries and components.

Here are a few common cases where you might want to try something else:

  • If you want to try React without hundreds of transitive build tool dependencies, consider using a single HTML file or an online sandbox instead.

  • If you need to integrate React code with a server-side template framework like Rails, Django or Symfony, or if you’re not building a single-page app, consider using nwb, or Neutrino which are more flexible. For Rails specifically, you can use Rails Webpacker. For Symfony, try Symfony's webpack Encore.

  • If you need to publish a React component, nwb can also do this, as well as Neutrino's react-components preset.

  • If you want to do server rendering with React and Node.js, check out Next.js or Razzle. Create React App is agnostic of the backend, and only produces static HTML/JS/CSS bundles.

  • If your website is mostly static (for example, a portfolio or a blog), consider using Gatsby or Next.js. Unlike Create React App, Gatsby pre-renders the website into HTML at build time. Next.js supports both server rendering and pre-rendering.

  • Finally, if you need more customization, check out Neutrino and its React preset.

All of the above tools can work with little to no configuration.

If you prefer configuring the build yourself, follow this guide.

Alchemy

Looking for something similar, but for React Native?
Check out Expo CLI.

Contributing

We'd love to have your helping hand on create-web3-dapp! See CONTRIBUTING.md for more information on what we're looking for and how to get started.

Supporting Create Web3 DApp

Create Web3 DApp is a community maintained project and all contributors are volunteers. If you'd like to support the future development of Create React App then please consider donating to our Open Collective.

Credits

This project exists thanks to all the people who contribute.

Acknowledgements

We are grateful to the authors of existing related projects for their ideas and collaboration:

License

Create React App is open source software licensed as GNU-AGPL.