Build Onchain Apps Template (BOAT) is an open-source web3 boilerplate from Coinbase that scaffolds a full-stack Ethereum dapp on Base using Next.js, wagmi, Viem, and Foundry.
What is the Build Onchain Apps Template?
Build Onchain Apps Template is a starter repository that combines web2 infrastructure with onchain components, saving developers weeks of initial setup. It accepts a Base RPC URL and a WalletConnect Project ID as inputs and outputs a runnable Next.js application with smart wallet authentication, minting and payment examples, and a Foundry-based contract folder. The template targets the Base Ethereum L2 network and is maintained by Coinbase developers under the MIT License.
Key Features
- Next.js + PWA — The project is built as a Progressive Web App using Next.js, giving the dapp installability and offline behavior without a separate mobile app.
- Base L2 support — Out of the box it connects to Base via a configurable RPC URL, with Base Sepolia used for testnet contract deployments.
- Smart Wallet — Account creation is handled through Coinbase Smart Wallet, so users can sign in with an email instead of managing seed phrases.
- wagmi + Viem live examples — The repository ships working Minting and Payments experiences built on wagmi and Viem, ready to use as reference implementations.
- Tailwind CSS — Styling uses Tailwind CSS for utility-first classes and a modern look.
- Foundry + Anvil — Smart contract development uses Foundry for compiling and deploying, plus a local Anvil testnet node for testing contracts before shipping.
- Perfume.js — Web Vitals performance metrics are collected with Perfume.js, surfacing performance insights during development.
- Quality tooling — Linting, formatting, and tests are configured through
yarn formatandyarn lintcommands for easy maintenance.
Who is it for?
- Hackathon participants — spin up a complete onchain app skeleton with wallet integration and a deploy-ready contract in one command, skipping environment wiring.
- Entrepreneurs building on Base — start from a production-ready stack that includes wallet onboarding, payment flows, and performance monitoring rather than assembling dependencies manually.
- Smart contract developers — use the included Foundry project and BuyMeACoffee example to learn the full loop of deploying a contract and connecting its ABI to a Next.js frontend.
What can you do with the Build Onchain Apps Template?
- Hackathon teams: create a working dapp in minutes by setting two environment variables, running
yarn installandyarn dev, then deploying the built-in smart contract to Base Sepolia. - Dapp builders: copy the wagmi and Viem patterns for minting and payments to add the same flows to their own products.
- Learners: walk through the BuyMeACoffee example to understand the entire contract-to-frontend pipeline, including extracting an ABI with
jqand updating the deploy address in the web app.
How does the Build Onchain Apps Template work?
Set up begins with two environment variables: a WalletConnect Project ID and a Base RPC URL, both stored in .env.local. After yarn install and yarn dev, the app runs locally; smart contract work happens in the contracts folder with Foundry's forge build and forge script, then the contract address is copied into the frontend's useBuyMeACoffeeContract.ts file.
Pricing
The template is free and open source, released under the MIT License.
FAQ
What is the Build Onchain Apps Template?
It is an open-source boilerplate from Coinbase for building Ethereum dapps on Base. It bundles Next.js, wagmi, Viem, Tailwind CSS, and Foundry into a single starter project with wallet authentication, minting, payments, and smart contract deployment examples.
What tech stack does it use?
The stack includes Next.js for the frontend, Tailwind CSS for styling, wagmi and Viem for Ethereum interactions, Coinbase Smart Wallet for account creation, and Foundry with Anvil for smart contract development and local testing.
How do I deploy a smart contract with the template?
Set up a contracts/.env file, get Base Sepolia ETH from a faucet, then run forge script with the Base Sepolia RPC URL from the contracts folder. After deployment, copy the contract address into web/app/buy-me-coffee/_contracts/useBuyMeACoffeeContract.ts.
Is the Build Onchain Apps Template free?
Yes, it is licensed under the MIT License, so it is free to use, modify, and distribute for personal or commercial projects. No usage fees are mentioned anywhere in the repository.








