Farcaster Mini App for Protardio Phase 1 Tier 3 whitelist registration.
- Sign in with Farcaster (SIWF) - Native Farcaster authentication
- Neynar Score Verification - Gates registration to quality users (0.5+ score)
- Follow Verification - Requires following @protardio
- Share Requirement - Prompts sharing before registration
- Supabase Backend - Real-time database for registrations
- Frontend: Next.js 14, React 18, Tailwind CSS
- Backend: Next.js API Routes, Supabase
- APIs: Farcaster Frame SDK, Neynar API v2
- Deployment: Vercel
- Retro-internet meets wartime propaganda aesthetic
- CRT scanlines and glitch effects
- Press Start 2P pixel font
- Green (#00ff00) / Magenta (#ff00ff) / Red color palette
git clone <your-repo>
cd protardio-whitelist
npm installCopy .env.example to .env.local and fill in:
# Neynar API (get from https://neynar.com)
NEYNAR_API_KEY=your_neynar_api_key
# Supabase (get from https://supabase.com)
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key
# App Config
NEXT_PUBLIC_APP_URL=https://your-domain.vercel.app
NEXT_PUBLIC_PROTARDIO_FID=12345 # Get your FID from Warpcast
NEXT_PUBLIC_MINIMUM_NEYNAR_SCORE=0.5
NEXT_PUBLIC_CURRENT_PHASE=phase1_tier3- Create a new Supabase project
- Go to SQL Editor
- Run the schema from
supabase/schema.sql
Place these files in /public:
logo.png- Protardio isometric P logoloading-bg.png- XP Bliss loading backgroundog-image.png- Open Graph image for social sharingicon.png- Mini app icon (512x512)splash.png- Splash screen image
- Generate account association at https://warpcast.com/~/developers
- Update
public/.well-known/farcaster.jsonwith your credentials
npm run dev- Push to GitHub
- Import to Vercel: https://vercel.com/new
- Set root directory (if monorepo)
- Add environment variables:
NEYNAR_API_KEYNEXT_PUBLIC_SUPABASE_URLNEXT_PUBLIC_SUPABASE_ANON_KEYSUPABASE_SERVICE_ROLE_KEYNEXT_PUBLIC_APP_URL=https://protardio.xyzNEXT_PUBLIC_PROTARDIO_FID=1118370NEXT_PUBLIC_MINIMUM_NEYNAR_SCORE=0.5NEXT_PUBLIC_CURRENT_PHASE=phase1_tier3REGISTRATION_CAP=1500
- Deploy
- In Vercel, go to Settings → Domains
- Add
protardio.xyz - Update DNS records as instructed
Upload these to /public:
icon.png- 200x200px app icon (use your isometric P logo)splash.png- 200x200px splash screenog-image.png- 1200x630px Open Graph image
Templates provided: og-template.html, splash-template.html
- Go to https://warpcast.com/~/developers/mini-apps
- Click "Create Mini App"
- Enter domain:
protardio.xyz - Copy the generated
accountAssociationvalues - Update
public/.well-known/farcaster.json:
{
"accountAssociation": {
"header": "PASTE_HEADER_HERE",
"payload": "PASTE_PAYLOAD_HERE",
"signature": "PASTE_SIGNATURE_HERE"
},
"frame": {
"version": "1",
"name": "Protardio Whitelist",
"iconUrl": "https://protardio.xyz/icon.png",
"splashImageUrl": "https://protardio.xyz/splash.png",
"splashBackgroundColor": "#0a0a0a",
"homeUrl": "https://protardio.xyz"
}
}- Paste
https://protardio.xyzin a Warpcast cast - Open the mini app and test all flows
- Submit for review in Warpcast developer portal
| Endpoint | Method | Description |
|---|---|---|
/api/verify-score |
POST | Check Neynar score for FID |
/api/verify-follow |
POST | Check if FID follows @protardio |
/api/register |
POST | Submit registration |
/api/check-registration |
GET | Check if FID is already registered |
/api/registration-status |
GET | Get current count vs cap |
See supabase/schema.sql for full schema including:
registrationstable- Indexes for performance
- RLS policies
- Export views for allowlist generation
In Supabase dashboard, run:
SELECT wallet_address FROM allowlist_export;Or use the CSV export feature on the allowlist_export view.
Set REGISTRATION_CAP in environment variables:
0= unlimited registrations1500= cap at 1500 registrations
The app will:
- Show spots remaining on landing page
- Disable registration when full
- Display "Allowlist Full" modal
Switch between phases by updating NEXT_PUBLIC_CURRENT_PHASE:
phase1_tier3- Phase 1 Tier 3 (0.5+ score)phase2_tier1- Phase 2 Tier 1 (0.7+ score)
"User not found" error
- Check Neynar API key is valid
- Verify FID exists
Follow check always fails
- Ensure @protardio FID is correct in env
- May need to wait for Neynar cache to update (30-60 seconds)
Registration fails
- Check Supabase connection
- Verify RLS policies are set up
- Check for duplicate FID/wallet
MIT