{"id":13604975,"url":"https://github.com/adrianmcli/truffle-next","last_synced_at":"2025-08-25T01:33:22.311Z","repository":{"id":46010561,"uuid":"108213240","full_name":"adrianmcli/truffle-next","owner":"adrianmcli","description":"🛰️ A boilerplate Truffle Box project with Next.js for rapid Ethereum Dapp development","archived":false,"fork":false,"pushed_at":"2021-11-20T16:09:58.000Z","size":267,"stargazers_count":191,"open_issues_count":4,"forks_count":44,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-06-15T18:02:20.547Z","etag":null,"topics":["ethereum","ethereum-contract","nextjs","reactjs","solidity","truffle","truffle-framework"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adrianmcli.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-25T03:09:02.000Z","updated_at":"2025-05-26T11:07:07.000Z","dependencies_parsed_at":"2022-08-28T10:23:16.295Z","dependency_job_id":null,"html_url":"https://github.com/adrianmcli/truffle-next","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/adrianmcli/truffle-next","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrianmcli%2Ftruffle-next","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrianmcli%2Ftruffle-next/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrianmcli%2Ftruffle-next/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrianmcli%2Ftruffle-next/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adrianmcli","download_url":"https://codeload.github.com/adrianmcli/truffle-next/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrianmcli%2Ftruffle-next/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271991175,"owners_count":24854724,"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","status":"online","status_checked_at":"2025-08-24T02:00:11.135Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["ethereum","ethereum-contract","nextjs","reactjs","solidity","truffle","truffle-framework"],"created_at":"2024-08-01T19:00:53.259Z","updated_at":"2025-08-25T01:33:22.282Z","avatar_url":"https://github.com/adrianmcli.png","language":"JavaScript","readme":"\u003ch1 align=\"center\"\u003eTruffle and Next.js\u003c/h1\u003e \u003cbr\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"comet\" src=\"https://user-images.githubusercontent.com/943555/33169670-574322ee-cffa-11e7-9150-7b720ee0ee24.png\" width=\"120\"\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003eRapid Ethereum Dapp Development\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"made for ethereum\" src=\"https://img.shields.io/badge/made_for-ethereum-771ea5.svg\"\u003e\n  \u003cimg alt=\"to the moon\" src=\"https://img.shields.io/badge/to_the-moon-fab127.svg\"\u003e\n  \u003cimg alt=\"MIT license\" src=\"https://img.shields.io/badge/license-MIT-blue.svg\"\u003e\n\u003c/p\u003e\n\n---\n\n# A Minimal Smart Contract Development Boilerplate\n\n[Truffle](https://github.com/trufflesuite/truffle) is great for developing Solidity smart contracts, but building a React frontend for a smart contract is often a chore. [Next.js](https://github.com/zeit/next.js) is one of the easiest ways to build such a frontend and the integration between Truffle and Next.js is what this boilerplate is trying to demonstrate.\n\nThere are two major features:\n\n- A plain `truffle init` project is used as the base (along with a SimpleStorage example contract).\n\n- A Next.js project resides in the `client` directory with a symlink to the output folder of the contract ABI definitions. The Next.js app also provides a simple skeleton for connecting to and interacting with the smart contract on a network.\n\nFor more information on how the frontend works, go read the [README.md](https://github.com/adrianmcli/truffle-next/blob/master/client/README.md) located in the `client` directory.\n\n## Installation\n\n1. Install Truffle globally.\n    ```bash\n    npm install -g truffle\n    ```\n\n2. Download the box. This also takes care of installing the necessary dependencies.\n    ```bash\n    truffle unbox adrianmcli/truffle-next\n    ```\n\n3. Run the development console.\n    ```bash\n    truffle develop\n    ```\n\n4. Compile and migrate the smart contracts. Note inside the development console we don't preface commands with `truffle`.\n    ```bash\n    compile\n    migrate\n    ```\n\n5. Run the next.js server for the front-end. Smart contract changes must be manually recompiled and migrated.\n    ```bash\n    // Change directory to the front-end folder\n    cd client\n    // Serves the front-end on http://localhost:3000\n    npm run dev\n    ```\n\n6. Truffle can run tests written in Solidity or JavaScript against your smart contracts. Note the command varies slightly if you're in or outside of the development console.\n    ```bash\n    // If inside the development console.\n    test\n\n    // If outside the development console..\n    truffle test\n    ```\n\n## Running with MetaMask\n\nSince `truffle develop` exposes the blockchain onto port `9545`, you'll need to add a Custom RPC network of `http://localhost:9545` in your MetaMask to make it work.\n\n## Running with TestRPC\n\nWe highly recommend using `truffle develop` over `testrpc`, but if you want to use `testrpc`, there are a couple things you need to do:\n\n- Change Line 6 of `client/lib/getWeb3.js` to use `localhost:8545` instead of `localhost:9545` so we refer to `testrpc` instead of `truffle develop`.\n- Run your `testrpc` with the following command (because [reasons](https://github.com/trufflesuite/truffle/issues/660#issuecomment-343066784)):\n\n   ```\n   testrpc --gasLimit 6721975 --gasPrice 100000000000\n   ```\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadrianmcli%2Ftruffle-next","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadrianmcli%2Ftruffle-next","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadrianmcli%2Ftruffle-next/lists"}