Tap. Earn. Own. — Un juego gamificado donde tapeas para ganar NFTs en Base.
Construido para el Hackathon Synthesis 🏆
TapChain es una PWA mobile-first donde los usuarios:
- Se registran con su email → se crea una wallet automáticamente (sin seed phrases)
- Tapean la pantalla → acumulan puntos registrados on-chain en Base
- Completan retos → 100, 500 y 1000 taps
- Mintean NFTs únicos → trofeos permanentes en Base Testnet
Usuario → Email Login → Wallet Automática (Privy)
↓
Tap Tap Tap → Puntos acumulados
↓
Reto completado → Backend Node.js relayer
↓
Mint NFT ERC-721 → Base Testnet
↓
NFT en Galería + BaseScan
┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐
│ FRONTEND │ │ BACKEND │ │ SMART CONTRACT │
│ React + Vite │───▶│ Node.js Express │───▶│ ERC-721 Solidity│
│ Privy Auth │ │ ethers.js v6 │ │ Base Sepolia │
│ Tailwind CSS │ │ Relayer (gas) │ │ TapChainNFT │
└─────────────────┘ └──────────────────┘ └─────────────────┘
cd contract
npm install
cp .env.example .env
# Agrega tu PRIVATE_KEY en .env
npx hardhat compile
npx hardhat run scripts/deploy.js --network base-sepolia
# Copia la dirección del contrato → CONTRACT_ADDRESSNecesitas ETH en Base Sepolia: https://docs.base.org/docs/tools/network-faucets
cd backend
npm install
cp .env.example .env
# Configura: PRIVATE_KEY, CONTRACT_ADDRESS, RPC_URL
npm run dev
# Corre en http://localhost:3001cd frontend
npm install
cp .env.example .env
# Configura: VITE_PRIVY_APP_ID (consigue uno en https://privy.io)
# VITE_BACKEND_URL=http://localhost:3001
npm run dev
# Abre http://localhost:5173| Variable | Descripción |
|---|---|
PRIVATE_KEY |
Clave privada del minter (backend wallet) |
CONTRACT_ADDRESS |
Dirección del contrato desplegado |
RPC_URL |
https://sepolia.base.org |
FRONTEND_URL |
URL del frontend (para CORS) |
| Variable | Descripción |
|---|---|
VITE_PRIVY_APP_ID |
App ID de Privy (https://privy.io) |
VITE_BACKEND_URL |
URL del backend |
| Reto | Taps Requeridos | Nombre | Rareza |
|---|---|---|---|
| 🥉 | 100 taps | Tapper Novato | Común |
| 🥈 | 500 taps | Tapper Pro | Raro |
| 🥇 | 1,000 taps | Tap Legend | Épico |
- Blockchain: Base Sepolia Testnet
- Chain ID: 84532
- Explorer: https://sepolia.basescan.org
- Faucet: https://docs.base.org/docs/tools/network-faucets
- Frontend: React 18 + Vite + Tailwind CSS
- Auth/Wallets: Privy (email → embedded wallet)
- Backend: Node.js + Express + ethers.js v6
- Smart Contract: Solidity 0.8.20 + OpenZeppelin ERC-721
- Blockchain: Base (Coinbase L2)
- Deploy: Vercel (frontend) + Railway/Render (backend)
function recordTaps(address player, uint256 taps) external
function mintNFT(address player, uint8 challengeLevel, string tokenURI) external returns (uint256)
function getChallengeStatus(address player) external view returns (bool, bool, bool)
function tapCount(address player) external view returns (uint256)Construido con ❤️ para Synthesis Hackathon