Skip to content

Commit 5e8341e

Browse files
committed
Add + remove content developement comments in 5.mdx file. No code is changed
1 parent fe16723 commit 5e8341e

File tree

1 file changed

+28
-42
lines changed
  • pages/lessons/projects

1 file changed

+28
-42
lines changed

pages/lessons/projects/5.mdx

Lines changed: 28 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ import { LessonHeader } from '../../../components/mdx/LessonHeader'
2020

2121
Welcome to this final tutorial in a series on smart contract development of the ERC721 standard, a.k.a. NFTs. Throughout the previous lessons we learnt how to write smart contracts, use token standards, and utilise test driven development as well. But to create a full stack decentralised application, we also need a UI, or frontend for users to interact with. In this lesson that is exactly what we're going to create.
2222

23-
You can expect our familiar checkpoint questions throughout the tutorial for testing your previous knowledge, how well you’re picking up the new material, and even some on predicting upcoming steps in the lesson. They all help with critical thinking and active engagement. You'll find the updated code in side-drawers too as you progress, handy for identifying any pesky syntax errors you might come across. And of course, there is a final quiz waiting for you on completion.
23+
{/* We may as well comment out the following paragraph for this first PR of July/August 2023, since without any quizzes, it's not yet relevant: */}
24+
{/* You can expect our familiar checkpoint questions throughout the tutorial for testing your previous knowledge, how well you’re picking up the new material, and even some on predicting upcoming steps in the lesson. They all help with critical thinking and active engagement. You'll find the updated code in side-drawers too as you progress, handy for identifying any pesky syntax errors you might come across. And of course, there is a final quiz waiting for you on completion. */}
2425

2526
Expect somewhere from one to six hours to complete the lesson, depending on your prior experience and the need to grasp new concepts. To help you maintain a steady pace and encourage breaks for rejuvenation, you'll find our pomodoro timer ⌛ in the menu header. It'll remind you to "go touch grass" and appreciate nature's role in enhancing our well-being. 🌱 Relish your journey in development in a good state of mind and body.
2627

@@ -40,12 +41,8 @@ wallet management (i.e. Handling wallet connections to our application).
4041
functions from our smart contract through the frontend using the provided *hooks*. */}
4142

4243

43-
{/* the following are headers from previous 4 lessons */}
44-
{/* ## What are we going to do?
45-
**By the end of this lesson we'll have learned a lot.**
46-
### Lesson breakdown
47-
### Quick breakdown of lesson steps */}
48-
## Lesson steps
44+
{/* We could do with a oneliner for each to describe what index.js and app.js are for */}
45+
## Let's breakdown the lesson
4946
- Set up our development environment with TierNFT project
5047
- initialise a nextJS app
5148
- Install RainbowKit, WAGMI and Ethers to create main application
@@ -54,27 +51,24 @@ functions from our smart contract through the frontend using the provided *hooks
5451
- Create NFT cards
5552
- Enable minting of NFTs in the application.
5653

54+
<br/>
5755

58-
<br/><br/>
59-
{/* **lesson 1 has no separate header. 'Tooling' incoorporated in breakdown**
60-
**To achieve this, we'll need diverse developer tools.**
61-
### Developer tooling
62-
### Developer tools and libraries we'll be using */}
6356
## Tools to get the job done
6457
- [nextJS](https://nextjs.org/) - a React framework for building a full-stack app
6558
- [RainbowKit](https://www.rainbowkit.com/docs/introduction) is a React library for out-of-the-box
6659
wallet management
60+
{/* ethers will be getting ejected and viem will get added, I guess: */}
61+
{/* - [viem](https://viem.sh/docs/getting-started.html) */}
6762
- [ethers](https://docs.ethers.org/v6/) is a compact JavaScript library for interacting with the Ethereum eco-system
6863
- [WAGMI](https://wagmi.sh/) is a collection of React hooks that allows us to work effectively with Ethereum
6964
- [Alchemy](https://dashboard.alchemy.com/) is an RPC provider that lets our app connect to the blockchain
70-
-
71-
-
65+
7266
**always make sure you access up-to-date release notes and documentation*
7367

7468
Let's dive in!
75-
<br/><br/>
69+
<br/>
7670

77-
---
71+
{/* --- */}
7872

7973
## Getting started
8074

@@ -98,11 +92,10 @@ npx create-next-app frontend --use-npm
9892
# careful, this is the default for yarn
9993
npx create-next-app frontend
10094
```
101-
{/* I'm assuming the following default steps are correct: */}
102-
Choose 'No' to all the options to create a default JavaScript project:
95+
{/* I'm assuming the following default steps are correct. Can you check that @wolovim?: */}
96+
Choose 'No' to *TypeScript*, because we want to create a *JavaScript* project, but choose 'Yes' to all the other options:
10397

10498
```bash
105-
paul@pcpiablo:~/D_D/d_d_academy/tierNFT$ npx create-next-app frontend --use-npm
10699
Need to install the following packages:
107100
108101
Ok to proceed? (y) y
@@ -112,28 +105,7 @@ Ok to proceed? (y) y
112105
✔ Would you like to use `src/` directory? … No / Yes
113106
✔ Would you like to use App Router? (recommended) … No / Yes
114107
✔ Would you like to customize the default import alias? … No / Yes
115-
Creating a new Next.js app in /home/paul/D_D/d_d_academy/tierNFT/frontend.
116-
117-
Using npm.
118-
119-
Initializing project with template: default
120-
121-
122-
Installing dependencies:
123-
- react
124-
- react-dom
125-
- next
126-
127-
128-
added 24 packages, and audited 25 packages in 12s
129-
130-
4 packages are looking for funding
131-
run `npm fund` for details
132-
133-
found 0 vulnerabilities
134-
Initialized a git repository.
135-
136-
Success! Created frontend at /home/paul/D_D/d_d_academy/tierNFT/frontend
108+
Creating a new Next.js app in ../../d_d_academy/tierNFT/frontend.
137109
```
138110

139111
Once the setup is complete, we open the `frontend` directory and get cracking.
@@ -147,6 +119,10 @@ cd frontend
147119

148120
## The Frontend
149121

122+
{/* We need more of an intro than the following 'The Main Application' as to what
123+
app.js is and subsequently we should do the same for index.js (when we get to that
124+
section). A little hint of what index.js is here would help - we could use a
125+
prediction question to aid with/actually perform this task before this section: */}
150126
For users to easily interact with our smart contract and mint the NFTs we must
151127
provide an interface. A simple process that is easily accessible. Let's start by creating a way to handle wallet connections.
152128

@@ -160,6 +136,8 @@ libraries for interoperability between various chains and wallet providers and
160136
thus needs some configurations.
161137

162138
But first we need to install the necessary dependencies.
139+
{/* @wolovim should we define version numbers of libraries/dependencies to ensure no breaking
140+
changes from future and to give better learner experience */}
163141

164142
```bash
165143
npm install @rainbow-me/rainbowkit wagmi ethers
@@ -268,7 +246,7 @@ API_KEY='YOUR-API-KEY-FROM-PROVIDER'
268246
```
269247

270248
Now we can wrap our application in the `RainbowKitProvider` and `WagmiConfig`
271-
so that have access to their features throughout our application. Our code should
249+
so that it can have access to their features throughout our application. Our code should
272250
look like this:
273251

274252
```jsx
@@ -294,6 +272,11 @@ Now that we have our application setup, we can edit the Index Page.
294272

295273
### The Index Page
296274

275+
{/* We need an explanation on what 'the Index Page' is about and it's relation to the stack,
276+
or as I mentioned preceeding 'The Main Application' section,
277+
we could use a prediction question to introduce this. LOng story short, the
278+
following 'intro' is not an intro: */}
279+
297280
The `index.js` page in the `/frontend/pages` directory should look like this
298281
after deleting all the *children* within the `<main>` element and completely
299282
deleting the `<footer>`.
@@ -565,6 +548,9 @@ later. For example, the `data` returned is called `mintData`.
565548
Even though we have this function, we need to pass in custom `message values`
566549
i.e. an amount in **ETH**, as defined in our contract. For this we create our
567550
own `mintToken` function that calls the `mint` function from WAGMI within it.
551+
552+
{/* should be: // 'return statement for rendering...'
553+
and not: // function Home() code... */}
568554

569555
```jsx
570556
// WAGMI useContractWrite hook...

0 commit comments

Comments
 (0)