A high-speed endless racing game set inside a digital warp tunnel โ powered by Farcaster and Base Builder Codes.
Warp Racer turns the Farcaster feed into a blazing digital tunnel. Race through neon warp zones, dodge obstacles, collect power-ups, and compete for the top spot on weekly leaderboards.
- ๐ Endless Runner - High-speed tunnel racing with increasing difficulty
- ๐ Vaporwave Aesthetics - Neon purple/pink Farcaster-themed visuals
- ๐ฏ Collectibles - Likes (โค๏ธ) and Recasts (๐) for points and speed boosts
- โก Power-ups - Shields, boosts, time slow, and magnets
- ๐ Leaderboards - Weekly competitions with score sharing
- ๐ฑ Mobile Optimized - Touch controls for on-the-go racing
- ๐จ Desktop Controls - Keyboard controls with visual hints
Warp Racer is fully integrated with Base Builder Codes (ERC-8021) for onchain attribution and reward qualification.
{
builderCode: "warpracer",
codes: ["warpracer", "farcaster", "basebuilder"],
payoutAddress: "0x29536D0bc1004ab274c4F0F59734Ad74D4559b7B"
}- ๐ Base Builder Integration Guide - Complete setup and usage
- ๐ ERC-8021 Reference - Technical implementation details
- Next.js 15.3.6 - React framework (with security patches)
- React 19.1.0 - UI library
- TypeScript 5.8.3 - Type safety
- Tailwind CSS - Styling
- Shadcn/ui - UI components
- Ox 0.2.2 - Base Builder Codes utilities
- Wagmi 2.19.5 - Wallet integration
- Viem 2.41.2 - Ethereum utilities
- ERC-8021 - Transaction attribution standard
- @farcaster/miniapp-sdk 0.2.1 - Mini app integration
- @farcaster/quick-auth 0.0.8 - Authentication
Desktop:
- Arrow Keys / A,D - Move left/right
- Space - Pause game
- ESC - Toggle controls hint
Mobile:
- Touch buttons - Left/Right movement
- Auto-pause on tab switch
| Item | Points | Effect |
|---|---|---|
| โค๏ธ Like | +100 | Score boost |
| ๐ Recast | +200 | Speed burst + score |
| Power-up | Duration | Effect |
|---|---|---|
| ๐ก๏ธ Shield | 5s | One-hit protection |
| ๐ Warp Boost | 5s | Double speed + invincibility |
| โก Time Slow | 5s | Slow-motion mode |
| ๐ซ Magnet | 5s | Auto-collect nearby items |
- ๐ด Data Blocks - Static red barriers
- ๐ Spam Bots - Moving orange threats
- ๐ฃ Firewall Barriers - Purple walls
Final Score = (Distance ร Combo Multiplier) + Collectibles + Power-ups
- Node.js 18+
- pnpm (recommended) or npm
# Clone the repository
git clone <your-repo-url>
cd warp-racer
# Install dependencies
pnpm install
# Create environment file
cp .env.local.example .env.local
# Edit .env.local with your values:
# NEXT_PUBLIC_BASE_BUILDER_CODE=warpracer
# NEXT_PUBLIC_PAYOUT_ADDRESS=0x29536D0bc1004ab274c4F0F59734Ad74D4559b7B# Development mode
pnpm dev
# Production build
pnpm build
pnpm start
# Linting
pnpm lint# Required
NEXT_PUBLIC_BASE_BUILDER_CODE=warpracer
NEXT_PUBLIC_PAYOUT_ADDRESS=0x29536D0bc1004ab274c4F0F59734Ad74D4559b7B
# Optional (auto-injected by Farcaster)
NEXT_PUBLIC_FARCASTER_FRAME_ID=...warp-racer/
โโโ src/
โ โโโ app/ # Next.js app router
โ โ โโโ page.tsx # Main game page
โ โ โโโ layout.tsx # Root layout with Farcaster SDK
โ โ โโโ api/ # API routes
โ โ โโโ submit-score/ # Score submission endpoint
โ โโโ components/ # React components
โ โ โโโ WarpRacer.tsx # Main game component
โ โ โโโ GameCanvas.tsx # Canvas rendering
โ โ โโโ GameOver.tsx # Game over screen
โ โ โโโ Leaderboard.tsx # Score display
โ โ โโโ ui/ # Shadcn UI components
โ โโโ hooks/ # React hooks
โ โ โโโ useBaseBuilderAttribution.ts # Base Builder integration
โ โ โโโ useTransactionAttribution.ts # ERC-8021 utilities
โ โ โโโ ... # Farcaster hooks
โ โโโ lib/ # Utilities
โ โ โโโ erc8021.ts # ERC-8021 core implementation
โ โ โโโ erc8021-tests.ts # Test suite
โ โ โโโ gameEngine.ts # Game logic
โ โ โโโ gameTypes.ts # Type definitions
โ โ โโโ codeRegistry.ts # Attribution registry
โ โโโ utils/ # Helper functions
โโโ public/
โ โโโ .well-known/
โ โโโ farcaster.json # Farcaster manifest
โโโ BASE-BUILDER-INTEGRATION.md # Builder codes guide
โโโ ERC8021-README.md # ERC-8021 documentation
โโโ package.json # Dependencies
- Status: โ FIXED
- Version: Next.js 15.3.6
- CVSS: 10.0 (Critical RCE)
- Action: All dependencies updated
- โ Input validation
- โ Length checks (prevent buffer overflow)
- โ Format verification
- โ Graceful error handling
- โ No PII in attribution codes
- Neon Cyberpunk - Glowing tunnels and particle effects
- Vaporwave Palette - Purple (#7c3aed) and pink (#ec4899)
- Farcaster Branding - Purple identity throughout
- Synthwave Aesthetic - Light trails and holographic UI
- 30-90 second sessions - Quick, replayable runs
- One-tap sharing - Instant Farcaster casts
- Progressive difficulty - Smooth learning curve
- Mobile-first - Touch-optimized controls
# Install Vercel CLI
npm i -g vercel
# Deploy
vercel
# Environment variables will be prompted
# Or set via Vercel dashboard# Build production bundle
pnpm build
# Start production server
pnpm start- โ Register on https://base.dev/
- โ Get your official builder code
- โ
Update
NEXT_PUBLIC_BASE_BUILDER_CODE - โ Redeploy with new code
- โ Monitor analytics on Base.dev dashboard
// Run all ERC-8021 tests
window.erc8021Tests()
// Run attribution examples
window.erc8021Examples.all()
// Check current attribution
const { codes } = useWarpRacerAttribution()
console.log('Attribution codes:', codes)- Game starts without errors
- Mobile controls work
- Desktop keyboard controls work
- Collectibles spawn and can be collected
- Power-ups activate correctly
- Collision detection works
- Score calculates properly
- Game over screen displays
- Share to Farcaster works
- Attribution suffix formats correctly
Contributions are welcome! Please follow these guidelines:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open a Pull Request
- TypeScript strict mode
- ESLint + Prettier
- Conventional commits
- Test coverage for new features
- Base Builder Codes: https://docs.base.org/builder-codes
- ERC-8021 Standard: https://eips.ethereum.org/EIPS/eip-8021
- Farcaster Frames: https://docs.farcaster.xyz/
- Next.js: https://nextjs.org/docs
- Wagmi: https://wagmi.sh/
- Base Discord: https://base.org/discord
- Farcaster: https://warpcast.com/
- GitHub Issues: [Report bugs or request features]
MIT License - see LICENSE file for details
- โ Core endless runner mechanics
- โ Base Builder Codes integration
- โ Farcaster mini-app support
- โ Leaderboard system
- โ Mobile controls
- ๐ Real-time multiplayer races
- ๐ NFT reward badges for top players
- ๐ Custom ship skins
- ๐ Seasonal events and themes
- ๐ Music sync gameplay
- ๐ฎ Tournament mode
- ๐ฎ Clan competitions
- ๐ฎ Ship upgrades and progression
- ๐ฎ Dynamic tunnels based on Farcaster trends
- ๐ฎ Replay GIF exports
Questions or issues?
- Open a [GitHub Issue]
- Join [Base Discord]
- Cast on [Farcaster]
Built with ๐ for the Farcaster and Base communities
Warp Racer - Race through the digital feed! ๐