/build-onchain-apps

Accelerate your web3 creativity with the Build Onchain Apps Toolkit. ⛵️

Primary LanguageTypeScriptMIT LicenseMIT

Build Onchain Apps Toolkit

Accelerate your web3 creativity with the Build Onchain Apps Toolkit. ☕️

Current version GitHub contributors GitHub Stars GitHub


Build Onchain Apps Toolkit takes an opinionated approach to streamlining and automating early decisions you must make when building your consumer product.

The generated onchain app aims to provide everything you need to run a web product, along with additional tools, documentation, and tricks for building onchain.

Whether you're a hackathon participant or an ambitious entrepreneur looking to establish the next successful company, this toolkit is designed with you in mind. 💙


Save weeks of initial dApp setup and the hassle of integrating web3 components with web2 infrastructure. 🧰 🧙 ✨

  • Progressive Web App support using Next.js 🏗️
  • Eth L2 support through Base 🔵
  • Wallet connect integration with RainbowKit 🌈
  • Live examples and documentation for Minting and Payments experiences with wagmi and Viem 🚀
  • Latest styling best practices with Tailwind CSS 💅
  • Easy maintenance with linting, formatting, and tests ✅
  • Smart contract deployment with Foundry ☁️
  • Insights into Web Vitals performance metrics with Perfume.js 📈

Getting Started

Step 1: Kick off your onchain app

npx @coinbase/build-onchain-apps@latest create

Build Onchain Apps Toolkit

Step 2: Obtain Wallet Connect Project ID from walletconnect.com and assign to the .env.local file

NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID=ADD_WALLET_CONNECT_PROJECT_ID_HERE

Step 3: Install and Run your onchain app

# Install dependencies
yarn

# Run onchain app
yarn dev

Build Onchain Apps

Step 4: Kick start your contracts

# Install Foundry

curl -L https://foundry.paradigm.xyz | bash
foundryup

Follow the instructions of foundryup to completely setup foundry

Step 5: Build, test and format the sample contracts

cd contracts

# Install dependencies
forge install

# Build
forge build

Step 6: Deploy contracts to Base Sepolia

Create a .env file using the .env.example file provided in your contracts folder and add your private key. Make sure to add a 0x in front of your key to convert it to a hex string. Note: Get an API key from here for Base Sepolia by creating an account

source .env

forge script script/BuyMeACoffee.s.sol:BuyMeACoffeeScript --broadcast --verify --rpc-url ${RPC_URL} --etherscan-api-key ${BLOCK_EXPLORER_API_KEY}
forge script script/SignatureMintERC721.s.sol:SignatureMintERC721Script --broadcast --verify --rpc-url ${RPC_URL} --etherscan-api-key ${BLOCK_EXPLORER_API_KEY}

Note: The above command will print the address of your contract and a link to the block explorer. Click on the block explorer link to verify whether your contract has been deployed or not

For more information on contracts, visit here

Congrats ✨, Time to enjoy your onchain app with some coffee ☕️


For a Live demo use


Contributing ☕️ 🔵

Read below to learn how you can take part in improving Build Onchain Apps Toolkit.

Develop

To build and test either the CLI or the main App, start by cloning the repo.

# Clone the repo
git clone https://github.com/coinbase/build-onchain-apps.git

Develop the App

# Go to main application
cd template

# Install and run latest template
yarn
yarn dev

Develop the CLI

# From the root repo
# Install and build latest dependencies
yarn
yarn build

# Link the local package to the global npm registry
npm link

# Test CLI using the local package
build-onchain-apps create

# After testing, unlink the package from the global npm registry
npm unlink @coinbase/build-onchain-apps
npm uninstall -g @coinbase/build-onchain-apps

The Team and Our Community ☁️ 🌁 ☁️

Build Onchain Apps Toolkit is all about community; for any questions, feel free to:

  1. Open an issue
  2. Tell us what project you build ⛵️
  3. Reach out to the core maintainers on Twitter or Farcaster

Leonardo Zizzamia

Sneh Koul

Alvaro Raminelli

Wesley Pickett

Renan Machado

Chris Nascone

Rose Kuan

Rob Polak

License

This project is licensed under the MIT License - see the LICENSE.md file for details