celo-poll/QUICK_START.md
2025-12-08 16:31:30 +03:00

2.7 KiB

โšก Quick Start - Deploy in 7 Minutes

๐ŸŽฏ Your App is Ready!

All code is implemented. Just configure and deploy.


Step 1: Get Your Admin FID (1 min)

  1. Open Warpcast app
  2. Go to Settings
  3. Find your Farcaster ID (FID)
  4. Copy it (e.g., 12345)

Step 2: Setup Environment (2 min)

Copy .env.local.example to .env.local:

cp .env.local.example .env.local

Edit .env.local and add:

# Your admin FID from Step 1
ADMIN_FIDS=12345

# Your wallet to receive fees
PROTOCOL_WALLET_ADDRESS=0xYourWalletAddress

# Upstash Redis (free tier: https://upstash.com)
UPSTASH_REDIS_REST_URL=https://your-url.upstash.io
UPSTASH_REDIS_REST_TOKEN=your_token

# App URL (update after deployment)
NEXT_PUBLIC_APP_URL=http://localhost:3000

Step 3: Test Locally (2 min)

npm install
npm run dev

Open http://localhost:3000

Test:

  • โœ… Vote on a poll
  • โœ… View history
  • โœ… Check leaderboard

Step 4: Deploy to Vercel (2 min)

# Install Vercel CLI
npm i -g vercel

# Deploy
vercel --prod

Add environment variables in Vercel dashboard:

  1. Go to Project Settings
  2. Environment Variables
  3. Add all from .env.local
  4. Update NEXT_PUBLIC_APP_URL to your Vercel URL

Step 5: Test in Warpcast (1 min)

  1. Open Warpcast app
  2. Visit your Vercel URL
  3. Vote on a poll
  4. Share as Frame

โœ… You're Live!

Your app now has:

  • โœ… 44 working API routes
  • โœ… 15 pages
  • โœ… Full social features
  • โœ… Admin dashboard
  • โœ… Leaderboard
  • โœ… Notifications
  • โœ… Search & discovery

๐ŸŽฏ What to Do Next

Immediate

  1. Create your first poll at /create
  2. Share it on Warpcast
  3. Watch votes come in!

First Week

  1. Monitor Vercel logs
  2. Check Redis cache hit rate
  3. Track user engagement
  4. Adjust poll questions based on feedback

Growth

  1. Add more poll categories
  2. Promote on Farcaster
  3. Engage with voters
  4. Build community

๐Ÿ“Š Admin Dashboard

Access at: https://your-app.vercel.app/admin

Features:

  • Platform metrics
  • Poll management
  • Moderation queue
  • User analytics
  • Ban/unban users

๐Ÿ†˜ Troubleshooting

Can't access admin dashboard?

  • Check ADMIN_FIDS environment variable
  • Verify your FID is correct
  • Redeploy after changing env vars

Votes not recording?

  • Check PROTOCOL_WALLET_ADDRESS is set
  • Verify user has cUSD + CELO for gas
  • Check Vercel logs for errors

Redis errors?

  • App works without Redis (uses memory)
  • Verify Upstash credentials
  • Check Upstash dashboard

๐ŸŽ‰ That's It!

You now have a fully functional prediction market on Farcaster.

Time spent: 7 minutes Features: Everything Status: Production-ready

Go ship it! ๐Ÿš€