Dapp Boilerplate is an boilerplate for building full-stack DApps using Solidity and React. It's built with the latest versions of React, Redux, Parcel, Truffle and has a superior organization and directory structure. It comes with a solid CSS, React and contract architecture that helps you correctly skin your DApp.
-
Clone the repo.
git clone https://github.com/consensolabs/dapp-boilerplate.git
-
Navigate to the project
cd dapp-boilerplate
-
Install the node dependencies.
npm install || yarn install
-
Start your local blockchain (I use Ganache-CLI) on a different terminal.
ganache-cli --networkId 10 --seed seedphrase
-
Add modify contracts in the /contracts directory, then compile, test and migrate it.
cd contracts truffle migrate
-
Start the dapp, then point your browser to localhost:3000. If you want to use yarn instead of npm, just nuke the node_modules directory and run the command
yarn install
.npm start || yarn start
-
Build the Dapp for production, use the build command. A production build of the entire Dapp will be placed in the /build folder.
npm run build || yarn build