Everything you need to create Web3 Dapps.
- Creating an App – How to create a new app.
- User Guide – How to develop apps bootstrapped with Create React App.
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.
Create Web3 DApp is an npx package that allows developers to create anything from a simple, barebones dApp to a feature-rich decentralized platform, in ~2 minutes.
The create-web3-dapp package is a NextJs-based framework, compatible with the most used blockchains including Ethereum, Polygon, Optimism, Arbitrum, Solana, that helps web3 developers build a decentralized production-ready application at lightning speed, using pre-made React components, webhooks, and APIs.
npx create-web3-dapp
cd my-dapp
npm run dev
If you've previously installed create-react-app
globally via npm install -g create-react-app
, the CLI builder will notify you if a new version has been released. We always suggest you to run using the latest available version.
(npx comes with npm 5.2+ and higher, see instructions for older npm versions)
Then open http://localhost:3000/ to see your app.
You don’t need to install or configure tools like Rainbowkit, Phantom connect, Hardhat, or Anchor
They will be automatically added and preconfigured so that you can focus on the code.
Create a project, and you’re good to go.
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:
-
Create a new account on Alchemy.com
-
Create a new Alchemy application.
-
In your terminal run:
npx create-web3-dapp
-
The first time you run this command, it will install the package.
-
Once installed, run the following command again - This will start the DApp creation flow.:
npx create-web3-dapp
It will create a directory called with the give name inside the current folder.
Inside that directory, it will generate the initial project structure and install the transitive dependencies:
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:
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.
You can find detailed instructions on using Create Web3 DApp and many tips in its documentation.
Every time you run Create web3 DApp, the CLI builder will take care of updating your package to the latest version available.
-
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.
Your environment will have everything you need to build a modern single-page React app:
- NextJS, React, JSX, ES6, TypeScript and Flow syntax support.
- 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 how to a full overview of the code base.
Create React App 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.
Looking for something similar, but for React Native?
Check out Expo CLI.
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.
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.
This project exists thanks to all the people who contribute.
We are grateful to the authors of existing related projects for their ideas and collaboration:
Create React App is open source software licensed as GNU-AGPL.