This is a Next.js project bootstrapped with create-next-app
.
A detailed walkthrough of this project can be found at https://blog.developerdao.com/.
You can use the config in here by default (Goerli, pointing to a marketplace contract I made on Thirdweb), but if you want to use your own,
you can change the targetChainId
in config/targetChain.ts
(checkout the definition of Thirdweb's ChainId to see the supported values),
and paste your contract marketplace contract address in config/contractAddresses.ts
.
You can skip this step to begin with, but you will need to set this to get the api/collection
page functional.
Navigate over to the Alchemy site and set up a free tier account (takes 5 mins).
Grab the API key in your alchemy dashboard, stick it in the .env.changeMe
file in the root directory, and rename the file to .env.local
.
Next.js is already hooked up to read variables out of .env.local
so there should be nothing more you need to do.
*** DO NOT *** commit your API key to you repository. You want to keep it private. env.local
is .gitignore'd, so it will never be committed to your repository.
Anytime you git clone
the repository you will have to fill in this file again.
First, install the dependencies:
yarn install
Next, run the development server:
npm run dev
# or
yarn dev
Open http://localhost:3000 with your browser to see the result.
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out Next.js deployment documentation for more details.
- thirdweb example used as a reference
- thirdweb sample code provided in their dashboard along with the marketplace contract TODO: insert image
- alchemy docs
- alchemy walkthrough and example repo