6.6 KiB
6.6 KiB
๐ Publish PollCelo on Farcaster
โ How to Launch as a Mini App
๐ Prerequisites
- Deployed App - Your app must be live on a public URL
- Farcaster Account - You need a Farcaster account
- Frame Metadata - Add Frame tags to your app
๐ฏ Step 1: Add Frame Metadata
Update app/layout.tsx
export const metadata: Metadata = {
title: 'PollCelo',
description: 'Daily prediction market on Farcaster',
metadataBase: new URL(process.env.NEXT_PUBLIC_APP_URL!),
openGraph: {
title: 'PollCelo - Daily Prediction Market',
description: 'Vote with cUSD, win daily rewards',
images: ['/og-image.png'],
},
other: {
'fc:frame': 'vNext',
'fc:frame:image': `${process.env.NEXT_PUBLIC_APP_URL}/og-image.png`,
'fc:frame:button:1': 'Vote Now',
'fc:frame:button:1:action': 'link',
'fc:frame:button:1:target': process.env.NEXT_PUBLIC_APP_URL!,
},
}
๐ผ๏ธ Step 2: Create Images
Icon (512x512)
Create public/icon.png:
- Square image
- 512x512 pixels
- PollCelo logo
- Transparent background
Splash Screen (1200x630)
Create public/splash.png:
- 1200x630 pixels
- PollCelo branding
- Solid background (#35D07F)
OG Image (1200x630)
Create public/og-image.png:
- 1200x630 pixels
- Shows today's poll
- Eye-catching design
๐ฑ Step 3: Create Farcaster Manifest
app/.well-known/farcaster.json/route.ts
import { NextResponse } from 'next/server'
export async function GET() {
return NextResponse.json({
accountAssociation: {
header: "eyJmaWQiOjEyMzQ1..." // Your signature
},
frame: {
version: "1",
name: "PollCelo",
iconUrl: `${process.env.NEXT_PUBLIC_APP_URL}/icon.png`,
splashImageUrl: `${process.env.NEXT_PUBLIC_APP_URL}/splash.png`,
splashBackgroundColor: "#35D07F",
homeUrl: process.env.NEXT_PUBLIC_APP_URL,
}
})
}
๐ Step 4: Generate Account Association
Install Farcaster Auth Kit
npm install @farcaster/auth-kit
Generate Signature
import { createAppClient, viemConnector } from '@farcaster/auth-kit'
const appClient = createAppClient({
ethereum: viemConnector(),
})
// Sign with your custody address
const signature = await appClient.createAccountAssociation({
fid: YOUR_FID,
custody: YOUR_CUSTODY_ADDRESS,
})
console.log(signature) // Use this in manifest
๐ Step 5: Deploy
1. Deploy to Vercel
vercel --prod
2. Verify Manifest
curl https://your-app.vercel.app/.well-known/farcaster.json
Should return:
{
"accountAssociation": {...},
"frame": {...}
}
3. Test Frame Metadata
curl -I https://your-app.vercel.app
Should include:
fc:frame: vNext
fc:frame:image: https://...
๐ข Step 6: Share on Warpcast
Option A: Cast with Link
- Open Warpcast
- Create new cast
- Paste your URL:
https://your-app.vercel.app - Warpcast will show Frame preview
- Cast it!
Option B: Submit to Frame Directory
- Go to Warpcast Frames
- Click "Submit Frame"
- Enter your URL
- Fill out details
- Submit for review
๐ฏ Step 7: Optimize for Discovery
Add to Cast
๐ฏ PollCelo is live!
Vote on today's poll with cUSD
Win daily rewards ๐ฐ
Try it now ๐
https://your-app.vercel.app
Use Hashtags
#Farcaster #Celo #Predictions #DeFi #MiniApp
Tag Relevant Accounts
@celo @farcaster
๐ Frame Validator
Test Your Frame
- Go to Frame Validator
- Enter your URL
- Check for errors
- Fix any issues
- Re-test
Common Issues
- โ Missing
fc:frametag - โ Invalid image URL
- โ Missing manifest
- โ CORS errors
๐จ Frame Preview
What Users See
- In Feed - OG image with "Vote Now" button
- Click Button - Opens your app in Warpcast
- In App - Full PollCelo experience
- Vote - Uses their Farcaster account
๐ง Advanced: Dynamic Frames
Show Different Polls
// app/poll/[id]/page.tsx
export async function generateMetadata({ params }: { params: { id: string } }) {
const poll = await getPoll(params.id)
return {
other: {
'fc:frame': 'vNext',
'fc:frame:image': `${process.env.NEXT_PUBLIC_APP_URL}/api/og?pollId=${params.id}`,
'fc:frame:button:1': `Vote: ${poll.question}`,
'fc:frame:button:1:action': 'link',
'fc:frame:button:1:target': `${process.env.NEXT_PUBLIC_APP_URL}/poll/${params.id}`,
}
}
}
๐ Track Performance
Analytics to Monitor
- Frame impressions
- Button clicks
- App opens
- Votes cast
- Share rate
Add to Vercel Analytics
import { Analytics } from '@vercel/analytics/react'
export default function RootLayout({ children }) {
return (
<html>
<body>
{children}
<Analytics />
</body>
</html>
)
}
โ Launch Checklist
Pre-Launch
- App deployed to production
- Frame metadata added
- Images created (icon, splash, OG)
- Manifest endpoint working
- Frame validator passes
- Tested in Warpcast
Launch Day
- Cast announcement
- Share in channels
- Tag relevant accounts
- Submit to Frame directory
- Monitor analytics
Post-Launch
- Respond to feedback
- Fix any issues
- Share user testimonials
- Create more casts
- Iterate based on data
๐ฏ Growth Tips
1. Daily Casts
Share today's poll every day:
๐ณ๏ธ Today's Poll: Will BTC hit $120K?
Vote now and win cUSD! ๐ฐ
https://your-app.vercel.app
2. Share Results
Post yesterday's results:
๐ Yesterday's Results:
โ
67% predicted correctly
๐ฐ Winners earned 0.15 cUSD each
Today's poll is live ๐
3. User Testimonials
Recast user wins:
๐ @alice just won 0.25 cUSD!
Your turn to predict and win ๐
4. Collaborate
Partner with other Frames:
๐ค PollCelo x OtherFrame
Special poll today!
Vote and win double rewards ๐ฐ
๐ Resources
๐ Summary
To Publish PollCelo:
- โ Add Frame metadata
- โ Create images
- โ Add manifest endpoint
- โ Deploy to production
- โ Cast your URL on Warpcast
- โ Submit to Frame directory
Time to Launch: 30 minutes Cost: $0 Reach: All Farcaster users
Ready to go viral! ๐