View live demo on Telegram: https://t.me/KittyKombatLiteBot/app/
- Create accounts and gather credentials:
- Vercel account for deployment
- Magic.link dashboard account
- Flow Wallet mainnet account
- Create a
.env
file in your project root:
NEXT_PUBLIC_MAGIC_API_KEY=your_magic_publishable_key
- Set up Flow credentials:
- Create
mainnet-account.pkey
file with your Flow private key
- Create
- View your private key by navigating to: Flow Wallet chrome extension > settings > account list > [account] > private key
- Update
flow.json
with your mainnet account address
{
"accounts": {
"mainnet-account": {
"address": "<YOUR_FLOW_ADDRESS>",
"key": {
"type": "file",
"location": "mainnet-account.pkey"
}
}
}
}
- Install Flow CLI:
sh -ci "$(curl -fsSL https://raw.githubusercontent.com/onflow/flow-cli/master/install.sh)"
- Deploy contract to mainnet:
flow project deploy --network mainnet
- Install dependencies:
npm install
- Build the project:
npm run build
- Deploy to Vercel:
vercel --prod
-
Keep your
mainnet-account.pkey
secure and never commit it to version control -
Your Magic.link publishable key
NEXT_PUBLIC_MAGIC_API_KEY
is safe to commit -
Add
.env
to your.gitignore
file if it's not already there