This guide will help you set up and run a full-stack NFT minting DApp on the Aptos blockchain using create-aptos-dapp.
Step 1: Prerequisites
Before getting started, ensure you have the following installed on your machine:
•Node.js (with npm ≥ 5.2.0)
Download Node
•Python (version 3.6 or higher)
Download Python
•Git (2.47.1(2))
Download Git
Step 2: Set Up Your Workspace
Open a terminal and navigate to the directory where you want to create your project.
• cd your/workspace
Step 3: Install create-aptos-dapp
Run the following command to install the create-aptos-dapp package and start creating your DApp.
• npx create-aptos-dapp@latest
Step 4: Configure Your Project
The installation process will prompt you for some information. Use the following inputs to set up your project:
1.Project Name: my-aptos-dapp(you can change the project name.)
2.Project Type: Full-stack Project
3.Template: NFT Minting DApp
4.Framework: Client-side (Vite app)
5.Network: Testnet
6.API Key:
• Go to Aptos Labs API Access.
• Signup using google account.
• Press on CREATE NEW PROJECT.
• Enter your PROJECT-NAME and NETWORK(TESTNET).
• Create your project.
• Open BACKEND KEYS.
• Copy your API KEY and paste it in your Terminal.
Example:
aptoslabs_a3kZTWf42Sb_GvFE8B3jiikLu2QvA9d1nkGrcfipvyWm7
When asked, choose No for making changes to your selections.
Step 5: Create Your Wallet And Fund Your Module Publisher Account
You need to create a wallet:
- Visit Petra Wallet.
- Add this extension to your chrome.
- Create your new wallet.
- Go to your extension section on your brouser You need to manually fund your module publisher account:
- Visit the Petra Fauset.
- Paste your WALLET ID and press MINT to add funds in your account.
- Update the following details in the .env file of your project: MODULE_PUBLISHER_ACCOUNT_PRIVATE_KEY= MODULE_PUBLISHER_ACCOUNT_ADDRESS=
Step 6: Publish the Smart Contract
Once the project is set up, navigate to the root folder of your project and publish the Move smart contract using the following command:
• npm run move:publish
Step 7: Run and Preview the App
Start the development server to preview your DApp in a browser.
• npm run dev
Open the provided localhost URL in your browser to interact with your NFT Minting DApp.
You have now successfully set up and launched a full-stack NFT Minting DApp on the Aptos blockchain. Use the development server to test and refine your application.
For more information and documentation, visit the Aptos Labs Developer Portal
Top comments (0)