This is an example repo of cNFT minting Farcaster Frame on Solana using Underdog Protocol and Onchainkit. The boilerplate includes a detailed implementation of creating the basic mint frame and validating user engagement on the cast.
You must have a Solana wallet address to interact with this frame. Check out how to create a Phantom wallet from here.
Follow the instructions for the local environment: The user must have Node.js and pnpm to run this platform. Just download Node.js from here.
Create an account at Underdog Protocol and get your API Key
from the developer dashboard.
-
Generate an API key and paste it into the env file. [devnet] [mainnet]
-
You can generate your cNFTs through their API playground by providing projectId, API KEY, and metadata.
Create an account at Upstash and get your Redis URL and token from the dashboard.
-
Create a database in your preferred region and cloud provider.
-
Get your
REDIS_REST_URL
andREDIS_REST_TOKEN
from the REST API section of your created database dashboard.
Clone the repo via CLI:
git clone https://github.com/neel-ds/cNFT-Frame-Boilerplate.git
cd cNFT-Frame-Boilerplate
Install the required packages:
pnpm install
Add required environment variables mentioned in .env.example
file
touch .env.local #Paste env variables in this file and your values
In the project directory, you can run:
pnpm dev
- Open http://localhost:3000 to view it in the browser.
In the terminal, you can run: [OPTIONAL]
Install ngrok in your system and do the needful config to run your app locally and test in Frames Validator.
ngrok http http://localhost:3000
Check out Ngrok docs for more details.
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.