Your Onchain Quest Log of Adventures and Side Quests - A personal, onchain record of exploration and growth built on Base.
AdventureChain is a soulbound NFT application that allows users to mint a unique "quest" onchain each day they complete an adventure. Each quest is a small, immutable record of your journey—permanently stored on Base L2.
Try it now: Visit https://adventure-chain.vercel.app/
- Overview
- Features
- Problem Being Solved
- Layer 2 Advantages
- EVM Stack Usage
- Architecture Overview
- Prerequisites
- Setup Instructions
- Local Development
- Contract Deployment
- Environment Variables
- Deployment
- Acknowledgments
AdventureChain enables users to create a permanent, onchain record of their daily adventures and side quests. Each quest is:
- Non-transferable (soulbound) - Your adventure log is permanently yours
- Daily limit - One quest per day to encourage consistent exploration
- Rich metadata - Adventure type, timestamp, and optional notes stored onchain
- Visualized - Beautiful bracelet visualization showing your journey
- Social - Share adventures with friends, create groups, and send challenges
Built on Base L2 for low fees and fast transactions, making daily quest logging practical and seamless.
- ✅ Daily Quest Minting - Mint one quest per day when you complete an adventure
- ✅ Soulbound NFTs - Quests are non-transferable, permanently yours
- ✅ Rich Adventure Types - Categorize your adventures (Explore, Quest, Discover, Learn, Create, etc.)
- ✅ Optional Notes - Add personal reflections to each quest
- ✅ Bracelet Visualization - Beautiful visual representation of your adventure journey
- ✅ Social Features - Add friends, create groups, and send challenges
- ✅ Base L2 Integration - Low fees make daily minting practical
- ✅ Mini App Support - Works as a Base Mini App and Farcaster Mini App
- ✅ OnchainKit Integration - Seamless wallet connection and transactions
- ✅ Onchain Metadata - All quest data stored onchain with custom tokenURI
People want to grow, explore, and try new things, but:
- Life gets busy - Easy to forget daily adventures
- No permanent record - Notes apps or journals can be lost
- Lack of motivation - No satisfying visual representation of progress
- Isolated tracking - Existing apps are siloed and boring
- No social engagement - Can't share or challenge friends
AdventureChain provides:
- Immutable onchain record - Your adventure log can't disappear
- Visual satisfaction - See your bracelet grow over time
- Daily commitment - One quest per day encourages consistency
- Social engagement - Challenge friends, create groups, share adventures
- Composable data - Onchain data can power future tools and visualizations
- No vendor lock-in - Your data lives onchain, not in a proprietary database
Base L2 provides critical advantages for AdventureChain:
- Low Fees - Daily minting is economically feasible (fractions of a cent vs. dollars on L1)
- Fast Finality - Transactions confirm quickly, providing immediate feedback
- Full EVM Compatibility - Standard tooling works out of the box
- Scalability - Can handle millions of users minting daily
- Ecosystem Integration - Works seamlessly with Base app, wallets, and tools
Without L2, daily minting would cost prohibitive amounts in gas fees, making the concept impractical for regular use. Base's low fees enable users to mint quests daily without financial burden.
- Solidity 0.8.19 - Smart contract development
- OpenZeppelin Contracts - Battle-tested ERC-721 implementation
- Hardhat - Development environment and deployment
- viem/wagmi - Type-safe Ethereum interactions
- OnchainKit - Base-specific wallet and UI components
- Base SDK / MiniKit - Base Mini App framework
- Next.js 15 - React framework with API routes
- React 19 - Modern React with hooks and server components
┌─────────────────────────────────────────┐
│ Frontend (Next.js) │
│ ┌──────────────┐ ┌──────────────┐ │
│ │ Quest Form │ │ Bracelet │ │
│ │ │ │ Viewer │ │
│ └──────┬───────┘ └──────┬───────┘ │
│ │ │ │
│ ┌──────┴─────────────────┴──────┐ │
│ │ React Hooks (useCurioChain) │ │
│ └──────────────┬─────────────────┘ │
└─────────────────┼───────────────────────┘
│
┌─────────┴──────────┐
│ OnchainKit/wagmi │
└─────────┬──────────┘
│
┌─────────┴──────────┐
│ Base L2 Network │
└─────────┬──────────┘
│
┌─────────┴──────────┐
│ CurioChain.sol │
│ (ERC-721 Soulbound)│
└────────────────────┘
- User Action: User fills out quest form and clicks "Complete Adventure"
- Transaction: Frontend calls
mintBead()via wagmi hook - Smart Contract: Contract validates (daily limit check) and mints NFT
- Event Emitted:
BeadMintedevent with all metadata - Frontend Update: Query contract for updated quest list and display
-
Smart Contract (
contracts/CurioChain.sol):- Manages quest minting
- Enforces daily limits
- Prevents transfers (soulbound)
- Stores metadata onchain with custom tokenURI
-
Frontend Hooks (
lib/hooks/useCurioChain.ts):- Wrapper around wagmi hooks
- Provides easy-to-use functions for minting and querying
- Handles loading states and errors
-
UI Components:
MintBeadForm: Form for creating new questsChainVisualization: Visual display of all quests as a braceletFriendsView: Manage and view friends' adventure logsGroupsView: Create groups and view combined braceletsChallengesView: Send and manage challenges
Before getting started, ensure you have:
- Node.js 18+ and npm/yarn/pnpm
- A Base app account
- A Farcaster account (optional, for Mini App features)
- Coinbase Developer Platform account for OnchainKit API key
- A wallet with some ETH on Base Sepolia (for testing)
- Vercel account (for deployment)
git clone https://github.com/YOUR_USERNAME/adventurechain.git
cd adventurechainnpm installCopy the example environment file:
cp env.example .env.localEdit .env.local and add your configuration:
NEXT_PUBLIC_ONCHAINKIT_API_KEY=your_api_key_here
NEXT_PUBLIC_CHAIN=sepolia
PRIVATE_KEY=your_private_key_for_deployment # Keep this secret!
BASE_SEPOLIA_RPC_URL=https://sepolia.base.org
NEXT_PUBLIC_URL=http://localhost:3000Getting your OnchainKit API Key:
- Go to Coinbase Developer Platform
- Create a new project
- Copy your API key to
NEXT_PUBLIC_ONCHAINKIT_API_KEY
npm run compileThis compiles the AdventureChain smart contract using Hardhat.
npm run devOpen http://localhost:3000 in your browser.
- The app will prompt you to connect your wallet
- Make sure you're connected to Base Sepolia network
- Authenticate using Farcaster (for Mini App features)
-
Complete a Quest:
- Select an adventure type
- Add optional notes
- Click "Complete Adventure"
- Approve the transaction in your wallet
-
View Your Adventure Log:
- Click the "Adventure Log" tab
- See all your quests in chronological order as a bracelet
-
Social Features:
- Add friends by wallet address
- Create groups
- Send challenges to friends or groups
-
Get Testnet ETH:
- Visit Base Sepolia Faucet
- Request testnet ETH to your wallet
-
Update Environment Variables:
PRIVATE_KEY=your_wallet_private_key BASE_SEPOLIA_RPC_URL=https://sepolia.base.org
-
Deploy the Contract:
npm run deploy:sepolia
-
Save the Contract Address:
- Copy the deployed address from the console
- Update
lib/contract.tswith the new address:export const CURIOCHAIN_CONTRACT_ADDRESS: Record<number, Address> = { [baseSepolia.id]: "YOUR_DEPLOYED_ADDRESS_HERE" as Address, // ... };
- Or set
NEXT_PUBLIC_CONTRACT_ADDRESS_SEPOLIAin.env.local
-
Verify on BaseScan (optional):
npx hardhat verify --network baseSepolia YOUR_CONTRACT_ADDRESS
-
Update Environment Variables:
PRIVATE_KEY=your_wallet_private_key BASE_MAINNET_RPC_URL=https://mainnet.base.org NEXT_PUBLIC_CHAIN=mainnet
-
Deploy:
npm run deploy:base
-
Update Contract Address in
lib/contract.tsor environment variables
| Variable | Description | Required |
|---|---|---|
NEXT_PUBLIC_ONCHAINKIT_API_KEY |
Coinbase Developer Platform API key | Yes |
NEXT_PUBLIC_CHAIN |
Network: sepolia or mainnet |
Yes |
PRIVATE_KEY |
Wallet private key for deployment | For deployment |
BASE_SEPOLIA_RPC_URL |
Base Sepolia RPC endpoint | Optional |
BASE_MAINNET_RPC_URL |
Base Mainnet RPC endpoint | Optional |
NEXT_PUBLIC_CONTRACT_ADDRESS_SEPOLIA |
Deployed Sepolia contract address | After deployment |
NEXT_PUBLIC_CONTRACT_ADDRESS_MAINNET |
Deployed Mainnet contract address | After deployment |
NEXT_PUBLIC_URL |
App URL (for production) | For production |
AdventureChain is currently deployed and accessible at: 🌐 https://adventure-chain.vercel.app/
Anyone can visit this link to use AdventureChain directly in their browser. Connect your wallet to Base Sepolia and start completing adventures!
-
Push to GitHub (if not already):
git add . git commit -m "AdventureChain implementation" git push
-
Deploy to Vercel:
vercel --prod
-
Add Environment Variables in Vercel Dashboard:
- Go to your project settings
- Add all environment variables from
.env.local - Update
NEXT_PUBLIC_URLwith your Vercel URL (e.g.,https://adventure-chain.vercel.app)
-
Update Contract Address:
- Update the contract address in your code or environment variables
- Redeploy if needed
-
Your deployed URL:
https://adventure-chain.vercel.app -
Update
minikit.config.tswith your production URL -
Follow Base Mini App guide for account association
- Built with Base infrastructure
- Uses OnchainKit for wallet integration