|
2 | 2 |
|
3 | 3 | A common way to learn a new framework or programming language is to build a simple todo list. In this tutorial, we will learn how to build an end-to-end todo list dapp, starting from the smart contract side through the front-end side and finally use of a wallet to interact with the two.
|
4 | 4 |
|
5 |
| -See the completed code in the [my_first_dapp](https://github.com/aptos-labs/aptos-core/tree/main/aptos-move/move-examples/my_first_dapp). |
| 5 | +See the completed code in the [source-code](https://github.com/aptos-labs/developer-docs/tree/main/apps/nextra/pages/en/build/guides/build-e2e-dapp). |
6 | 6 |
|
7 | 7 | ## Chapters
|
8 | 8 |
|
9 | 9 | After meeting the [prerequisites](#prerequisites) and [getting set up](#setup) as described below, you will follow this tutorial in this order:
|
10 | 10 |
|
11 | 11 | 1. [Create a smart contract](build-e2e-dapp/1-create-smart-contract.mdx)
|
12 |
| -2. [Set up React app](build-e2e-dapp/2-set-up-react-app.mdx) |
13 |
| -3. [Add Wallet support](build-e2e-dapp/3-add-wallet-support.mdx) |
14 |
| -4. [Fetch Data from Chain](build-e2e-dapp/4-fetch-data-from-chain.mdx) |
15 |
| -5. [Submit data to chain](build-e2e-dapp/5-submit-data-to-chain.mdx) |
16 |
| -6. [Handle Tasks](build-e2e-dapp/6-handle-tasks.mdx) |
| 12 | +2. [Set up a frontend](build-e2e-dapp/2-set-up-the-frontend.mdx) |
| 13 | +3. [Fetch Data from Chain](build-e2e-dapp/3-fetch-data-from-chain.mdx) |
| 14 | +4. [Submit data to chain](build-e2e-dapp/4-submit-data-to-chain.mdx) |
| 15 | +5. [Handle Tasks](build-e2e-dapp/5-handle-tasks.mdx) |
17 | 16 |
|
18 | 17 | ## Prerequisites
|
19 | 18 |
|
20 | 19 | You must have:
|
21 | 20 |
|
22 |
| -- [Aptos CLI](../cli.mdx) |
23 |
| -- [Aptos TypeScript SDK](../sdks/ts-sdk.mdx) |
24 |
| -- [Aptos Wallet Adapter](../sdks/wallet-adapter.mdx) |
25 |
| -- [Create React App](https://create-react-app.dev/) |
26 | 21 | - [node and npm](https://nodejs.org/en/)
|
27 | 22 |
|
28 | 23 | Although we will explain some React decisions, we are not going to deep dive into how React works; so we assume you have some previous experience with React.
|
29 | 24 |
|
30 | 25 | ## Setup
|
31 | 26 |
|
32 |
| -In this section, we will create a `my-first-dapp` directory to hold our project files, both client-side code (React based)and the Move code (our smart contract). |
| 27 | +In this section, we will create a `my-first-dapp` directory to hold our project files, both client-side code (React based) and the Move code (our smart contract). |
| 28 | + |
| 29 | +For that, we will be using [create-aptos-dapp](../create-aptos-dapp.mdx) to create the project. |
33 | 30 |
|
34 | 31 | 1. Open a terminal and navigate to the desired directory for the project (for example, the `Desktop` directory).
|
35 |
| -2. Create a new directory called `my-first-dapp`, for example: |
| 32 | +2. Run `npx create-aptos-dapp@latest` to create the project. |
36 | 33 |
|
37 | 34 | ```bash filename="Terminal"
|
38 |
| -mkdir my-first-dapp |
| 35 | +npx create-aptos-dapp@latest |
39 | 36 | ```
|
40 | 37 |
|
41 |
| -3. Navigate into that directory: |
| 38 | +3. Follow the instructions to create the project. |
| 39 | +- Choose a name for the project, for example `my-first-dapp`. |
| 40 | +- Choose the `Full-stack project` option. |
| 41 | +- Choose the `Boilerplate Template` option. |
| 42 | +- For simplicity, choose not to use Surf. |
| 43 | +- Choose the `Vite app` framework option. |
| 44 | +- Choose the `Devnet` network option. |
42 | 45 |
|
43 |
| -```bash filename="Terminal" |
44 |
| -cd my-first-dapp |
45 |
| -``` |
| 46 | +The tool will create the project in a directory with the same name as the project and install the required dependencies. |
| 47 | + |
| 48 | +Follow the `Next Steps` instructions. |
46 | 49 |
|
47 | 50 | Now let's [create a smart contract](build-e2e-dapp/1-create-smart-contract.mdx).
|
0 commit comments