163 lines
2.7 KiB
Markdown
163 lines
2.7 KiB
Markdown
# โก 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`:
|
|
|
|
```bash
|
|
cp .env.local.example .env.local
|
|
```
|
|
|
|
Edit `.env.local` and add:
|
|
|
|
```env
|
|
# 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)
|
|
|
|
```bash
|
|
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)
|
|
|
|
```bash
|
|
# 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! ๐**
|