{"id":13776339,"url":"https://github.com/coinbase/build-onchain-apps","last_synced_at":"2025-04-08T08:11:18.305Z","repository":{"id":206458087,"uuid":"713221268","full_name":"coinbase/build-onchain-apps","owner":"coinbase","description":"Accelerate your web3 creativity with the Build Onchain Apps Template. ⛵️","archived":false,"fork":false,"pushed_at":"2024-05-28T22:51:36.000Z","size":37578,"stargazers_count":649,"open_issues_count":20,"forks_count":85,"subscribers_count":20,"default_branch":"main","last_synced_at":"2024-05-29T06:46:14.669Z","etag":null,"topics":["base","boilerplate","dapp","nextjs","onchain","tailwindcss","toolkit","web3"],"latest_commit_sha":null,"homepage":"https://buildonchainapps.xyz","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coinbase.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-02T04:34:47.000Z","updated_at":"2024-05-31T20:50:03.711Z","dependencies_parsed_at":"2023-11-10T05:34:02.307Z","dependency_job_id":"52eb3ad3-9144-4173-a95e-555eff151e38","html_url":"https://github.com/coinbase/build-onchain-apps","commit_stats":null,"previous_names":["base-org/build-onchain-apps","coinbase/build-onchain-apps"],"tags_count":45,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coinbase%2Fbuild-onchain-apps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coinbase%2Fbuild-onchain-apps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coinbase%2Fbuild-onchain-apps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coinbase%2Fbuild-onchain-apps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coinbase","download_url":"https://codeload.github.com/coinbase/build-onchain-apps/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247801155,"owners_count":20998338,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["base","boilerplate","dapp","nextjs","onchain","tailwindcss","toolkit","web3"],"created_at":"2024-08-03T18:00:23.327Z","updated_at":"2025-04-08T08:11:18.283Z","avatar_url":"https://github.com/coinbase.png","language":"TypeScript","funding_links":[],"categories":["Useful Tools \u0026 Libraries"],"sub_categories":["Developer libraries for building frames"],"readme":"\u003cimg src='./docs/logo-v-0-17.png' width='800' alt='Build Onchain Apps Template'\u003e\n\n# [Build Onchain Apps Template (⛵️)](https://github.com/coinbase/build-onchain-apps/)\n\n\u003e Accelerate your onchain creativity with the Build Onchain Apps Template. ☕️\n\n[![GitHub contributors](https://img.shields.io/github/contributors/coinbase/build-onchain-apps?color=3498DB)](https://github.com/coinbase/build-onchain-apps/graphs/contributors) [![GitHub Stars](https://img.shields.io/github/stars/coinbase/build-onchain-apps.svg?color=3498DB)](https://github.com/coinbase/build-onchain-apps/stargazers) [![GitHub](https://img.shields.io/github/license/coinbase/build-onchain-apps?color=3498DB)](https://github.com/coinbase/build-onchain-apps/blob/main/LICENSE)\n\n\u003cbr /\u003e\n\n**Build Onchain Apps Template** (aka BOAT ⛵️) will help you save weeks of initial app setup and the hassle of integrating onchain components with web2 infrastructure. 🌊\n\nWe do this by taking an opinionated approach to streamlining early decisions you must make when building an onchain app.\n\nWhether you're a hackathon participant or an ambitious entrepreneur looking to build the next big thing, this template is designed with you in mind. 💙\n\n**Out of the box** 🧰 🧙 ✨\n\n- Progressive Web App support using [Next.js](https://nextjs.org/) 🏗️\n- Ethereum L2 support through [Base](https://base.org/) 🔵\n- Easy account creation with [Smart Wallet](https://www.smartwallet.dev/why)\n- Live examples and documentation for Minting and Payments experiences with [wagmi](https://wagmi.sh/) and [Viem](https://viem.sh/) 🚀\n- Latest styling best practices with [Tailwind CSS](https://tailwindcss.com/) 💅\n- Easy maintenance with linting, formatting, and tests ✅\n- Insights into Web Vitals performance metrics with Perfume.js 📈\n- Smart contract deployment with Foundry ☁️\n- Support for a local testnet node for testing smart contracts using [Anvil](https://book.getfoundry.sh/reference/anvil/). 🧪\n\n\u003cbr \u003e\n\n## Getting Started\n\n#### Step 1: Setup Environment Variables\n\n- Obtain a Base RPC URL from [Coinbase Developer Platform](https://www.coinbase.com/developer-platform/products/base-node?utm_source=boat) and assign to the `.env.local` file\n\n```bash\nNEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID=ADD_WALLET_CONNECT_PROJECT_ID_HERE\nNEXT_PRIVATE_RPC_URL=ADD_RPC_URL_HERE\n```\n\n#### Step 2: Install and Run your onchain app\n\n```bash\n# Install\nyarn\n\n# Run\nyarn dev\n```\n\n## Develop\n\nTo format and lint the package locally use these quick steps.\n\n```bash\n# Format fix\nyarn format\n\n# Lint fix\nyarn lint\n```\n\n## Updating ABI\n\nAfter you create a project using BOAT, these are the folders and files you are interested in when updating a smart contract:\n_Using BuyMeACoffee smart contract as an example below_\n\n```bash\n\u003cproject-name\u003e\n├── contracts\n│   ├── src\n│   │   └── BuyMeACoffee.sol          ← smart contract code\n│   └──out/BuyMeACoffee.sol\n│       └── BuyMeACoffee.json         ← output from \"forge build\" which contains the updated ABI\n│\n└── web/app/buy-me-coffee\n    └── _contracts\n        ├── BuyMeACoffeeABI.ts             ← copy of ABI from contracts/out/BuyMeACoffee.json\n        └── useBuyMeACoffeeContract.ts     ← deploy address\n```\n\n### Importing updated ABI to frontend code\n\nAfter updating your smart contract code, run `forge build` in the `contracts` folder. This will create a json in the `contracts/out` directory.\n\nThe output json contains additional information. We only need the `abi` property from that json object. Let's use `jq` to extract just the `abi` property\n\n```bash\n# from the \"contract\" folder\n\njq .abi out/BuyMeACoffee/BuyMeACoffee.json\n```\n\nTake the output of `jq` and update `web/app/buy-me-coffee/_contracts/BuyMeACoffeeABI.ts`\n\nDone with first step!\n\n### Deploying your smart contract and updating frontend code\n\nMake sure you got all the environment variables squared away in `contracts/.env` and get some base sepolia eth from a faucet!\n\nTo deploy your smart contract,\n\n```bash\n# from the \"contract\" folder\n\nsource .env \u0026\u0026 forge script script/LocalContract.s.sol:LocalContractScript  --broadcast --rpc-url https://sepolia.base.org\n```\n\nIn the long output, find the value for `Contract Address`.\n\nCopy that value and update `web/app/buy-me-coffee/_contracts/useBuyMeACoffeeContract.ts` with the new address.\n\n## Outro\n\nThis is one of the more error prone steps. Take it step by step.\n\nIf you are new smart contract deployment, just try deploying the existing `BuyMeACoffee` contract and replace the contract address. After, try updating `BuyMeACoffee.sol` and get the new ABI in your frontend code.\n\nWe are thinking of ways to make this step easier in the future! Happy hacking!\n\n## Do you need gas for Base Sepolia? 🔵\n\nLearn how you can obtain free testnet funds here: https://docs.base.org/tools/network-faucets/.\n\n## Community ☁️ 🌁 ☁️\n\nCheck out the following places for more BOAT-related content:\n\n- Follow @zizzamia ([X](https://twitter.com/zizzamia), [Farcaster](https://warpcast.com/zizzamia)) for project updates\n- Join the discussions on our [OnchainKit warpcast channel](https://warpcast.com/~/channel/onchainkit)\n\n## Authors\n\n- [@zizzamia](https://github.com/zizzamia) ([X](https://twitter.com/Zizzamia))\n- [@Sneh1999](https://github.com/Sneh1999) ([X](https://twitter.com/snoopies_eth))\n- [@wespickett](https://github.com/wespickett) ([X](https://twitter.com/wespickett))\n- [@mochikuan](https://github.com/mochikuan) ([X](https://twitter.com/mochikuan))\n- [@renanmav](https://github.com/renanmav) ([X](https://twitter.com/renanmav))\n- [@robpolak](https://github.com/robpolak) ([X](https://twitter.com/0xr0b_eth))\n- [@kyhyco](https://github.com/kyhyco)\n- [@cnasc](https://github.com/cnasc) ([warpcast](https://warpcast.com/cnasc))\n- [@arsood](https://github.com/arsood) ([X](https://twitter.com/arsood))\n- [@eragon512](https://github.com/eragon512) ([X](https://twitter.com/eragon5121))\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoinbase%2Fbuild-onchain-apps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoinbase%2Fbuild-onchain-apps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoinbase%2Fbuild-onchain-apps/lists"}