Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŒ Wandr - Collect World Landmarks as NFTs using SHARDEUM

Wandr Logo Next.js TypeScript

A Web3-powered digital collectibles platform for iconic world landmarks


๐Ÿ“‹ Table of Contents

  1. Project Overview
  2. Architecture
  3. Tech Stack
  4. Project Structure
  5. Core Features
  6. Data Flow
  7. Components Documentation
  8. State Management
  9. Web3 Integration
  10. Getting Started
  11. Deployment
  12. Environment Variables
  13. Future Enhancements

๐ŸŽฏ Project Overview

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.

Vision

Transform the way people experience and remember landmarks by creating a digital passport of collectible memories, bridging physical tourism with Web3 technology.

Key Value Propositions

  • 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

๐Ÿ— Architecture

High-Level Architecture Diagram

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                         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)       โ”‚                    โ”‚
โ”‚              โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Application Architecture Pattern

The application follows a Component-Driven Architecture with:

  1. Presentation Layer: React components with TailwindCSS styling
  2. Business Logic Layer: Custom hooks and context providers
  3. Data Layer: Static landmark data + localStorage persistence
  4. Integration Layer: Web3 providers for blockchain connectivity

๐Ÿ›  Tech Stack

Frontend Framework

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

Styling & UI

Technology Version Purpose
TailwindCSS 4.x Utility-first CSS framework
PostCSS - CSS processing and optimization
Poppins & DM Sans - Custom typography via Google Fonts

Mapping & Visualization

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

Web3 & Blockchain

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

Data Management

Technology Purpose
TanStack React Query Server state management and caching
React Context API Global state for NFT claims
localStorage Persistent user data storage

Development Tools

Technology Purpose
ESLint Code linting and quality
Babel React Compiler Automatic component optimization

๐Ÿ“ Project Structure

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

โœจ Core Features

1. Interactive World Map (/explore)

  • 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

2. Landmark Discovery System

  • 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.
    }

3. NFT Claiming System

  • Wallet Connection: RainbowKit modal with multiple wallet support

  • Claim Flow:

    1. User connects Web3 wallet
    2. Navigates to landmark detail page
    3. Clicks "Claim NFT" button
    4. Simulated blockchain transaction (2s delay)
    5. NFT stored in user's collection
  • Token Generation:

    tokenId: `${Date.now()}-${Math.random().toString(36).substr(2, 9)}`

4. Personal Collection Dashboard (/collection)

  • 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

5. Responsive Design

  • Mobile-First: Optimized for all screen sizes
  • Animated Navbar: Shrinks on scroll with glass-morphism effect
  • Touch-Friendly: Map interactions work on mobile devices

๐Ÿ”„ Data Flow

NFT Claim Flow Sequence

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   User   โ”‚     โ”‚  UI Layer โ”‚     โ”‚ NFT Context โ”‚     โ”‚ localStorage โ”‚
โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
     โ”‚                 โ”‚                  โ”‚                   โ”‚
     โ”‚ Click "Claim"   โ”‚                  โ”‚                   โ”‚
     โ”‚โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€>โ”‚                  โ”‚                   โ”‚
     โ”‚                 โ”‚                  โ”‚                   โ”‚
     โ”‚                 โ”‚  claimNFT(id)    โ”‚                   โ”‚
     โ”‚                 โ”‚โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€>โ”‚                   โ”‚
     โ”‚                 โ”‚                  โ”‚                   โ”‚
     โ”‚                 โ”‚                  โ”‚ Generate tokenId  โ”‚
     โ”‚                 โ”‚                  โ”‚โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”        โ”‚
     โ”‚                 โ”‚                  โ”‚          โ”‚        โ”‚
     โ”‚                 โ”‚                  โ”‚<โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜        โ”‚
     โ”‚                 โ”‚                  โ”‚                   โ”‚
     โ”‚                 โ”‚                  โ”‚ Update state      โ”‚
     โ”‚                 โ”‚                  โ”‚โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”        โ”‚
     โ”‚                 โ”‚                  โ”‚          โ”‚        โ”‚
     โ”‚                 โ”‚                  โ”‚<โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜        โ”‚
     โ”‚                 โ”‚                  โ”‚                   โ”‚
     โ”‚                 โ”‚                  โ”‚ Persist data      โ”‚
     โ”‚                 โ”‚                  โ”‚โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€>โ”‚
     โ”‚                 โ”‚                  โ”‚                   โ”‚
     โ”‚                 โ”‚  State updated   โ”‚                   โ”‚
     โ”‚                 โ”‚<โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”‚                   โ”‚
     โ”‚                 โ”‚                  โ”‚                   โ”‚
     โ”‚  UI re-renders  โ”‚                  โ”‚                   โ”‚
     โ”‚<โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”‚                  โ”‚                   โ”‚
     โ”‚                 โ”‚                  โ”‚                   โ”‚

State Persistence Strategy

  1. On Mount: Load claimed NFTs from localStorage (wallet-specific key)
  2. On Claim: Update React state โ†’ Trigger useEffect โ†’ Save to localStorage
  3. On Wallet Change: Clear state โ†’ Load new wallet's data from localStorage

๐Ÿงฉ Components Documentation

<Web3Provider>

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

<NFTProvider>

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
}

<Navbar>

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

<MapComponent>

File: src/components/MapComponent.tsx

Interactive map component featuring:

  • Custom SVG markers with claim status indication
  • Fly-to animations via MapController sub-component
  • Popup cards on marker click
  • Dynamic imports for SSR compatibility

<LandmarkCard>

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

๐Ÿ—ƒ State Management

React Context (NFTContext)

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}

Why Context Over Redux?

  1. Simplicity: Single concern (NFT claims) doesn't require complex state
  2. Performance: React 19's concurrent features optimize re-renders
  3. Bundle Size: No additional dependencies
  4. Native Integration: Works seamlessly with Next.js App Router

โ›“ Web3 Integration

Supported Wallets

Via RainbowKit + WalletConnect:

  • MetaMask
  • Coinbase Wallet
  • WalletConnect (200+ wallets)
  • Rainbow
  • Trust Wallet
  • And more...

Network Configuration

const config = getDefaultConfig({
  appName: 'Wandr',
  projectId: process.env.NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID,
  chains: [polygonAmoy],  // Polygon Amoy Testnet
  ssr: true,
});

Wagmi Hooks Used

Hook Purpose
useAccount() Get connected wallet address and status
useConnect() Handle wallet connections
useDisconnect() Handle wallet disconnections

๐Ÿš€ Getting Started

Prerequisites

  • Node.js 18.x or higher
  • npm, yarn, or pnpm
  • A Web3 wallet (MetaMask recommended)

๐Ÿ”ฎ Future Enhancements

Phase 1: Smart Contract Integration

  • Deploy NFT smart contract on Polygon
  • Implement actual minting with on-chain storage
  • Add IPFS metadata storage via Pinata

Phase 2: Social Features

  • User profiles and leaderboards
  • Achievement badges for milestones
  • Social sharing of collections

Phase 3: Enhanced Gamification

  • Geo-location verification for "real" visits
  • Rare landmark drops and limited editions
  • Trading marketplace for NFTs

Phase 4: Monetization

  • Premium landmark packs
  • Partner with tourism boards
  • NFT royalties on secondary sales

๐Ÿ™ Acknowledgments


Built with โค๏ธ for HackXIOS '25

About

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 Shardeum testnet, it combines the excitement of travel discovery with blockchain-powered ownership.

Resources

Stars

Watchers

Forks

Contributors

Languages