diff --git a/docs/quick-start.md b/docs/quick-start.md deleted file mode 100644 index 8f0096e..0000000 --- a/docs/quick-start.md +++ /dev/null @@ -1,55 +0,0 @@ ---- -sidebar_position: 2 ---- - -# 🚀 QuickStart - -### Requirements - -Before you begin, you need to install the following tools: - -- [Node (v18 LTS)](https://nodejs.org/en/download/) -- Yarn ([v1](https://classic.yarnpkg.com/en/docs/install/) or [v2+](https://yarnpkg.com/getting-started/install)) -- [Git](https://git-scm.com/downloads) - -## Setup - -To get started with Scaffold-ETH 2, follow the steps below: - -1. Clone this repo & install dependencies - -``` -git clone https://github.com/scaffold-eth/scaffold-eth-2.git -cd scaffold-eth-2 -yarn install -``` - -2. Run a local network in the first terminal: - -``` -yarn chain -``` - -This command starts a local Ethereum network using Hardhat. The network runs on your local machine and can be used for testing and development. You can customize the network configuration in `hardhat.config.ts`. - -3. On a second terminal, deploy the test contract: - -``` -yarn deploy -``` - -This command deploys a test smart contract to the local network. The contract is located in `packages/hardhat/contracts` and can be modified to suit your needs. The `yarn deploy` command uses the deploy script located in `packages/hardhat/deploy` to deploy the contract to the network. You can also customize the deploy script. - -4. On a third terminal, start your NextJS app: - -``` -yarn start -``` - -Visit your app on: `http://localhost:3000`. You can interact with your smart contract using the contract component or the example ui in the frontend. You can tweak the app config in `packages/nextjs/scaffold.config.ts`. - -Run smart contract test with `yarn hardhat:test` - -- Edit your smart contract `YourContract.sol` in `packages/hardhat/contracts` -- Edit your frontend in `packages/nextjs/pages` -- Edit your deployment scripts in `packages/hardhat/deploy` \ No newline at end of file diff --git a/docs/quick-start/_category_.json b/docs/quick-start/_category_.json new file mode 100644 index 0000000..c5afc5b --- /dev/null +++ b/docs/quick-start/_category_.json @@ -0,0 +1,9 @@ +{ + "label": "🚀 QuickStart", + "position": 2, + "link": { + "type": "generated-index", + "title": "🚀 QuickStart", + "slug": "quick-start" + } +} diff --git a/docs/quick-start/environment.mdx b/docs/quick-start/environment.mdx new file mode 100644 index 0000000..2c155a0 --- /dev/null +++ b/docs/quick-start/environment.mdx @@ -0,0 +1,46 @@ +--- +sidebar_position: 2 +description: How to set up your development environment for Scaffold ETH-2. +--- + +# Environment + +Now that our installation is complete, let's configure the development environment for Scaffold ETH-2. + +### 1. **Initialize a Local Blockchain**: + +In the first terminal, run a local network: + +``` +yarn chain +``` + +This command starts a local Ethereum network using Hardhat. The network runs on your local machine and can be used for testing and development. You can customize the network configuration in `hardhat.config.ts`. + +### 2. **Deploy Your Smart Contract**: + +In the second terminal, deploy the test contract: + +``` +yarn deploy +``` + +This command deploys a test smart contract to the local network. The contract is located in `packages/hardhat/contracts` and can be modified to suit your needs. The `yarn deploy` command uses the deploy script located in `packages/hardhat/deploy` to deploy the contract to the network. You can also customize the deploy script. + +### 3. **Launch your NextJS Application**: + +In the third terminal, start your NextJS app: + +``` +yarn start +``` + +Visit your app on `http://localhost:3000`. You can interact with your smart contract using the contract component or the example ui in the frontend. + +## What's Next: + +- Edit your smart contract `YourContract.sol` in `packages/hardhat/contracts` +- Edit your deployment scripts in `packages/hardhat/deploy` +- Edit your frontend in `packages/nextjs/pages` +- Edit the app config in `packages/nextjs/scaffold.config.ts` +- Run smart contract test with `yarn hardhat:test` diff --git a/docs/quick-start/installation.mdx b/docs/quick-start/installation.mdx new file mode 100644 index 0000000..5857726 --- /dev/null +++ b/docs/quick-start/installation.mdx @@ -0,0 +1,53 @@ +--- +sidebar_position: 1 +description: Requirements and installation methods to get started with Scaffold ETH-2. +--- + +# Installation + +## Requirements + +Before you begin, you need to install the following tools: + +- [Node (v18 LTS)](https://nodejs.org/en/download/) +- Yarn ([v1](https://classic.yarnpkg.com/en/docs/install/) or [v2+](https://yarnpkg.com/getting-started/install)) +- [Git](https://git-scm.com/downloads) + +## Setup + +To get started with Scaffold-ETH 2, you have two options: + +1. Use git clone to clone the repository. +2. **[Beta]** Use the npx command: `npx create-eth@latest` to bootstrap the project directly. + +### Option 1: Setup using `git clone` + +Clone this repo & install dependencies: + +``` +git clone https://github.com/scaffold-eth/scaffold-eth-2.git +cd scaffold-eth-2 +yarn install +``` + +### Option 2: [Beta] Setup using `npx create-eth@latest` + +For a simplified setup, Scaffold-ETH 2 offers a beta npx method that guides you interactively through the setup. + +Bootstrap the project: + +``` +npx create-eth@latest +``` + +You will be presented with a series of prompts: + +- **Project Name:** Input your project name: Enter a name for your project, e.g., my-dapp-example. +- **Solidity Framework** What solidity framework do you want to use?: Choose your preferred solidity framework (Hardhat, Foundry) +- **Install packages?:** Press `Enter` for `yes` (default option) or type `n` and press `Enter` for no + +Once the setup is complete, navigate to the project directory: + +``` +cd project-name +```