- Node.js 18+ or 20+
- pnpm package manager
- PostgreSQL database (Supabase recommended)
- Domain with SSL certificate
- Email account with SMTP access (for transactional emails)
Copy .env.example to .env.local and configure the following:
HIVE_POSTING_KEY= # Posting key for app's service account
HIVE_ACCOUNT_CREATOR= # Account name for creating new Hive accounts
HIVE_ACTIVE_KEY= # Active key for account creation
DEFAULT_HIVE_POSTING_ACCOUNT= # Default account for lite user posts
DEFAULT_HIVE_POSTING_KEY= # Posting key for default accountNEXT_PUBLIC_SUPABASE_URL= # Your Supabase project URL
NEXT_PUBLIC_SUPABASE_PUBLIC_KEY= # Anon/public key
SUPABASE_SERVICE_ROLE_KEY= # Service role key (server-side only)
DATABASE_URL= # PostgreSQL connection stringJWT_SECRET= # Generate: openssl rand -base64 64
VIP_PEPPER= # Generate: openssl rand -hex 32
USERBASE_KEY_ENCRYPTION_SECRET= # Generate: uuidgen | tr '[:upper:]' '[:lower:]'SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_SECURE=false
EMAIL_USER= # Your email address
EMAIL_PASS= # App password (for Gmail)
EMAIL_RECOVERYACC= # Recovery email addressNEXT_PUBLIC_WALLETCONNECT_PROJECT_ID= # From https://cloud.walletconnect.com
NEXT_PUBLIC_ALCHEMY_KEY= # From https://alchemy.com
NEXT_PUBLIC_ONCHAINKIT_API_KEY= # From Coinbase
NEXT_PUBLIC_ZORA_API_KEY= # From ZoraPINATA_JWT= # From https://pinata.cloud
NEXT_PUBLIC_IPFS_GATEWAY= # Your IPFS gateway domainNEYNAR_API_KEY= # From https://neynar.comNEXT_PUBLIC_BASE_URL= # Your production URL (https://skatehive.app)
NEXT_PUBLIC_THEME=skatehive
NEXT_PUBLIC_ADMIN_USERS= # Comma-separated admin usernamesGIPHY_API_KEY= # For GIF selector feature
SIGNER_URL= # For VIP signup flow
SIGNER_TOKEN= # For VIP signup authenticationEnsure all database tables are created:
userbase_usersuserbase_sessionsuserbase_identitiesuserbase_hive_keysuserbase_soft_postsuserbase_soft_votesuserbase_sponsorships
Enable RLS on all tables and configure appropriate policies in Supabase.
Ensure indexes are created for:
- Session lookups (
userbase_sessions.refresh_token_hash) - User lookups (
userbase_users.email,userbase_users.handle) - Identity lookups (
userbase_identities.user_id,userbase_identities.provider_user_id) - Soft posts/votes (
userbase_soft_posts.user_id,userbase_soft_votes.user_id)
pnpm installpnpm type-checkpnpm buildpnpm start- Connect your GitHub repository to Vercel
- Configure environment variables in Vercel dashboard
- Set build command:
pnpm build - Set start command:
pnpm start - Deploy
- Set up a server with Node.js 18+
- Clone repository
- Copy
.env.localwith production values - Run build:
pnpm build - Use PM2 or similar process manager:
pm2 start pnpm --name "skatehive" -- start - Set up nginx reverse proxy with SSL
- All environment variables are set correctly
- No secrets are committed to git
- Database has proper RLS policies
- HTTPS is enabled with valid SSL certificate
- CORS policies are configured correctly
- User registration works (email, Farcaster, wallet)
- Lite accounts can post comments and create snaps
- Sponsored accounts can post with their own username
- Voting works for all account types
- Image/video uploads work correctly
- Email delivery works (registration, key backups)
- Profile merging works correctly
- Static pages are generated correctly
- Images are optimized and cached
- API routes respond quickly (<500ms for most requests)
- Database queries are optimized with indexes
- Set up error tracking (Sentry, LogRocket, etc.)
- Monitor API endpoint response times
- Track user registration and engagement metrics
- Set up database performance monitoring
- Configure uptime monitoring
Set up the following cron jobs:
# Run every 5 minutes
*/5 * * * * curl https://your-domain.com/api/userbase/sponsorships/process# Run hourly
0 * * * * curl -X POST https://your-domain.com/api/userbase/soft-posts/retry
0 * * * * curl -X POST https://your-domain.com/api/userbase/soft-votes/retryIf you need to rollback to a previous version:
- Go to Deployments tab
- Find the previous successful deployment
- Click "Promote to Production"
- Stop the current process:
pm2 stop skatehive - Checkout previous version:
git checkout <previous-commit> - Rebuild:
pnpm build - Restart:
pm2 restart skatehive
-
User Activity
- New registrations per day
- Active users per day
- Posts/comments created per day
- Sponsorship conversion rate
-
System Health
- API response times (p50, p95, p99)
- Error rates per endpoint
- Database connection pool usage
- Memory/CPU usage
-
Business Metrics
- Lite account → sponsored account conversion rate
- Email delivery success rate
- Hive account creation success rate
- IPFS upload success rate
- Error Tracking: Sentry
- Performance: Vercel Analytics or New Relic
- Uptime: UptimeRobot or Pingdom
- Logs: Logtail or Papertrail
- Database: Supabase built-in monitoring
- Clear cache:
rm -rf .next - Reinstall dependencies:
rm -rf node_modules && pnpm install - Check TypeScript errors:
pnpm type-check
- Verify
DATABASE_URLandSUPABASE_SERVICE_ROLE_KEY - Check Supabase project status
- Verify network connectivity and firewall rules
- Verify SMTP credentials
- Check Gmail security settings (enable "Less secure app access" or use App Password)
- Test SMTP connection manually
- Verify posting keys are correct
- Check Hive node connectivity
- Ensure sufficient Resource Credits (RC) on posting accounts
- Never commit secrets - Use
.env.localand keep it out of git - Rotate keys regularly - Especially JWT_SECRET and encryption keys
- Use HTTPS - Always encrypt traffic in production
- Monitor for suspicious activity - Set up alerts for unusual patterns
- Keep dependencies updated - Run
pnpm auditregularly - Enable rate limiting - Protect API endpoints from abuse
- Backup database - Regular automated backups of PostgreSQL
For issues or questions:
- GitHub Issues: https://github.com/skatehive/skatehive3.0/issues
- Discord: [Your Discord Link]
- Email: [Your Support Email]