- Project Overview
- Architecture
- Tech Stack
- Project Structure
- Core Features
- Data Flow
- Components Documentation
- State Management
- Web3 Integration
- Getting Started
- Deployment
- Environment Variables
- Future Enhancements
Wandr is an innovative NFT tourism platform that allows users to explore iconic world landmarks and collect them as unique digital collectibles. Built on the Polygon Amoy testnet, it combines the excitement of travel discovery with blockchain-powered ownership.
Transform the way people experience and remember landmarks by creating a digital passport of collectible memories, bridging physical tourism with Web3 technology.
- Gamified Exploration: Discover landmarks through an interactive global map
- Digital Ownership: Claim landmarks as NFTs stored on blockchain
- Personal Collection: Build and showcase your digital travel passport
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ CLIENT LAYER โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ
โ โ Next.js โ โ React 19 โ โ TailwindCSS โ โ Leaflet โโ
โ โ App Routerโ โ Components โ โ Styling โ โ Maps โโ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ STATE MANAGEMENT โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ NFT Context โ โ Local Storage โ โ
โ โ (React Context API) โ โ (Persistent User Data) โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ WEB3 LAYER โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ
โ โ RainbowKit โ โ Wagmi โ โ Viem โ โWalletConnectโโ
โ โ (UI) โ โ (Hooks) โ โ (Interface) โ โ (Protocol) โโ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ BLOCKCHAIN LAYER โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Polygon Amoy Testnet โ โ
โ โ (EVM-Compatible Chain) โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
The application follows a Component-Driven Architecture with:
- Presentation Layer: React components with TailwindCSS styling
- Business Logic Layer: Custom hooks and context providers
- Data Layer: Static landmark data + localStorage persistence
- Integration Layer: Web3 providers for blockchain connectivity
| Technology | Version | Purpose |
|---|---|---|
| Next.js | 16.1.1 | React framework with App Router, SSR, and optimizations |
| React | 19.2.3 | UI component library with latest concurrent features |
| TypeScript | 5.x | Type-safe development |
| Technology | Version | Purpose |
|---|---|---|
| TailwindCSS | 4.x | Utility-first CSS framework |
| PostCSS | - | CSS processing and optimization |
| Poppins & DM Sans | - | Custom typography via Google Fonts |
| Technology | Version | Purpose |
|---|---|---|
| Leaflet | 1.9.4 | Interactive map rendering |
| React-Leaflet | 5.0.0 | React bindings for Leaflet |
| CARTO Dark Tiles | - | Dark-themed map tile layer |
| Technology | Version | Purpose |
|---|---|---|
| RainbowKit | 2.2.10 | Beautiful wallet connection UI |
| Wagmi | 2.19.5 | React hooks for Ethereum |
| Viem | 2.43.3 | TypeScript interface for EVM |
| WalletConnect | - | Multi-wallet connection protocol |
| Technology | Purpose |
|---|---|
| TanStack React Query | Server state management and caching |
| React Context API | Global state for NFT claims |
| localStorage | Persistent user data storage |
| Technology | Purpose |
|---|---|
| ESLint | Code linting and quality |
| Babel React Compiler | Automatic component optimization |
wandr/
โโโ ๐ public/
โ โโโ ๐ fonts/ # Custom font files
โ
โโโ ๐ src/
โ โโโ ๐ app/ # Next.js App Router pages
โ โ โโโ ๐ layout.tsx # Root layout with providers
โ โ โโโ ๐ page.tsx # Homepage with hero section
โ โ โโโ ๐ globals.css # Global styles and animations
โ โ โ
โ โ โโโ ๐ explore/ # Landmark exploration page
โ โ โ โโโ ๐ page.tsx # Map + grid view of landmarks
โ โ โ
โ โ โโโ ๐ collection/ # User's NFT collection
โ โ โ โโโ ๐ page.tsx # Personal collection dashboard
โ โ โ
โ โ โโโ ๐ landmark/ # Dynamic landmark pages
โ โ โโโ ๐ [id]/ # Dynamic route parameter
โ โ โโโ ๐ page.tsx # Individual landmark detail
โ โ
โ โโโ ๐ components/ # Reusable UI components
โ โ โโโ ๐ index.ts # Component exports
โ โ โโโ ๐ Navbar.tsx # Navigation with wallet connect
โ โ โโโ ๐ LandmarkCard.tsx # Landmark display card
โ โ โโโ ๐ MapComponent.tsx # Interactive Leaflet map
โ โ
โ โโโ ๐ context/ # React Context providers
โ โ โโโ ๐ NFTContext.tsx # NFT claim state management
โ โ
โ โโโ ๐ data/ # Static data sources
โ โ โโโ ๐ landmarks.ts # Landmark definitions & types
โ โ
โ โโโ ๐ providers/ # Application providers
โ โโโ ๐ Web3Provider.tsx # RainbowKit + Wagmi setup
โ
โโโ ๐ next.config.ts # Next.js configuration
โโโ ๐ tailwind.config.ts # TailwindCSS configuration
โโโ ๐ tsconfig.json # TypeScript configuration
โโโ ๐ package.json # Dependencies and scripts
โโโ ๐ README.md # This file
- Technology: Leaflet with React-Leaflet wrapper
- Features:
- Dark-themed CARTO tile layer
- Custom animated markers for each landmark
- Color-coded markers (purple for claimed, violet for available)
- Smooth fly-to animations when selecting landmarks
- Popup cards with quick landmark info
- Toggle between map view and grid view
-
6 Featured Landmarks (expandable):
- Eiffel Tower (France)
- Colosseum (Italy)
- Taj Mahal (India)
- Machu Picchu (Peru)
- Great Wall of China (China)
- Statue of Liberty (USA)
-
Landmark Data Structure:
interface Landmark { id: string; name: string; description: string; coordinates: { lat: number; lng: number }; imageUrl: string; images: string[]; // Multiple images for gallery funFacts: string[]; // Educational content country: string; category: string; // Monument, Historical Site, etc. }
-
Wallet Connection: RainbowKit modal with multiple wallet support
-
Claim Flow:
- User connects Web3 wallet
- Navigates to landmark detail page
- Clicks "Claim NFT" button
- Simulated blockchain transaction (2s delay)
- NFT stored in user's collection
-
Token Generation:
tokenId: `${Date.now()}-${Math.random().toString(36).substr(2, 9)}`
- Stats Display: Total collected, remaining, completion percentage
- Progress Bar: Visual completion indicator
- NFT Cards: Display claimed landmarks with token ID and claim date
- Wallet-Specific: Collections are tied to wallet addresses
- Mobile-First: Optimized for all screen sizes
- Animated Navbar: Shrinks on scroll with glass-morphism effect
- Touch-Friendly: Map interactions work on mobile devices
โโโโโโโโโโโโ โโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ
โ User โ โ UI Layer โ โ NFT Context โ โ localStorage โ
โโโโโโฌโโโโโโ โโโโโโโฌโโโโโโ โโโโโโโโฌโโโโโโโ โโโโโโโโฌโโโโโโโโ
โ โ โ โ
โ Click "Claim" โ โ โ
โโโโโโโโโโโโโโโโโ>โ โ โ
โ โ โ โ
โ โ claimNFT(id) โ โ
โ โโโโโโโโโโโโโโโโโโ>โ โ
โ โ โ โ
โ โ โ Generate tokenId โ
โ โ โโโโโโโโโโโโ โ
โ โ โ โ โ
โ โ โ<โโโโโโโโโโ โ
โ โ โ โ
โ โ โ Update state โ
โ โ โโโโโโโโโโโโ โ
โ โ โ โ โ
โ โ โ<โโโโโโโโโโ โ
โ โ โ โ
โ โ โ Persist data โ
โ โ โโโโโโโโโโโโโโโโโโโ>โ
โ โ โ โ
โ โ State updated โ โ
โ โ<โโโโโโโโโโโโโโโโโโ โ
โ โ โ โ
โ UI re-renders โ โ โ
โ<โโโโโโโโโโโโโโโโโ โ โ
โ โ โ โ
- On Mount: Load claimed NFTs from localStorage (wallet-specific key)
- On Claim: Update React state โ Trigger useEffect โ Save to localStorage
- On Wallet Change: Clear state โ Load new wallet's data from localStorage
File: src/providers/Web3Provider.tsx
Wraps the application with Web3 capabilities.
Configuration:
- Chain: Polygon Amoy Testnet
- Theme: Dark theme with purple accent (#a855f7)
- SSR: Enabled for Next.js compatibility
File: src/context/NFTContext.tsx
Manages NFT claim state globally.
Exposed Values:
{
claimedNFTs: ClaimedNFT[]; // Array of claimed NFTs
claimNFT: (id: string) => void; // Claim function
isLandmarkClaimed: (id: string) => boolean;
totalClaimed: number; // Count of claimed NFTs
}File: src/components/Navbar.tsx
Responsive navigation with:
- Logo and brand name
- Navigation links (Home, Explore, Collection)
- RainbowKit Connect Button
- Mobile hamburger menu
- Scroll-based shrink animation
File: src/components/MapComponent.tsx
Interactive map component featuring:
- Custom SVG markers with claim status indication
- Fly-to animations via
MapControllersub-component - Popup cards on marker click
- Dynamic imports for SSR compatibility
File: src/components/LandmarkCard.tsx
Reusable card for displaying landmarks:
- Image with hover zoom effect
- Status badge (Claimed/Available)
- Category tag
- Claim button with loading state
- Link to detail page
Purpose: Manage user's claimed NFTs across the application
State Shape:
interface ClaimedNFT {
landmarkId: string;
claimedAt: Date;
tokenId: string;
}Storage Key Pattern: nft-tourism-claimed-{walletAddress}
- Simplicity: Single concern (NFT claims) doesn't require complex state
- Performance: React 19's concurrent features optimize re-renders
- Bundle Size: No additional dependencies
- Native Integration: Works seamlessly with Next.js App Router
Via RainbowKit + WalletConnect:
- MetaMask
- Coinbase Wallet
- WalletConnect (200+ wallets)
- Rainbow
- Trust Wallet
- And more...
const config = getDefaultConfig({
appName: 'Wandr',
projectId: process.env.NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID,
chains: [polygonAmoy], // Polygon Amoy Testnet
ssr: true,
});| Hook | Purpose |
|---|---|
useAccount() |
Get connected wallet address and status |
useConnect() |
Handle wallet connections |
useDisconnect() |
Handle wallet disconnections |
- Node.js 18.x or higher
- npm, yarn, or pnpm
- A Web3 wallet (MetaMask recommended)
- Deploy NFT smart contract on Polygon
- Implement actual minting with on-chain storage
- Add IPFS metadata storage via Pinata
- User profiles and leaderboards
- Achievement badges for milestones
- Social sharing of collections
- Geo-location verification for "real" visits
- Rare landmark drops and limited editions
- Trading marketplace for NFTs
- Premium landmark packs
- Partner with tourism boards
- NFT royalties on secondary sales
Built with โค๏ธ for HackXIOS '25