Skip to content

Decentralized virtual land registry built on Internet Computer Protocol (ICP) with Rust backend and React frontend. Features secure land registration, marketplace trading, and portfolio management for virtual real estate.

Notifications You must be signed in to change notification settings

namanalex/VirtualLandRegistry

Repository files navigation

🏗️ Virtual Land Registry

A decentralized platform for registering and trading virtual land assets on the Internet Computer Protocol (ICP) blockchain, facilitating secure, transparent, and efficient transactions in virtual and augmented reality environments.

🚀 Features

  • Land Registration: Register virtual land parcels with coordinates, dimensions, and comprehensive metadata
  • Marketplace: Buy and sell virtual land assets with real-time pricing
  • Portfolio Management: View and manage your owned lands with detailed analytics
  • Advanced Search & Filtering: Filter lands by type, area, features, and location
  • Analytics Dashboard: Comprehensive market trends and statistics visualization
  • Decentralized Identity: Internet Identity integration for secure authentication
  • Real-time Updates: Live blockchain data integration and notifications
  • Responsive Design: Optimized for desktop, tablet, and mobile devices

🛠️ Technology Stack

Backend

  • Rust: Core blockchain logic and smart contract implementation
  • Internet Computer Protocol (ICP): Decentralized blockchain platform
  • Candid: Interface description language for type-safe API communication

Frontend

  • React: Modern user interface framework with hooks
  • JavaScript/ES6+: Dynamic frontend programming
  • CSS3: Advanced styling with responsive design patterns
  • @dfinity/agent: ICP JavaScript SDK for blockchain interaction
  • @dfinity/auth-client: Secure authentication with Internet Identity

📁 Project Structure

virtual_land_registry/
├── virtual_land_registry_backend/           # Rust Backend
│   ├── .dfx/                               # DFX build artifacts
│   ├── src/
│   │   └── lib.rs                          # Core blockchain logic
│   ├── target/                             # Rust build output
│   ├── .gitignore                          # Backend git ignore rules
│   ├── Cargo.lock                          # Rust dependency lock
│   ├── Cargo.toml                          # Rust project configuration
│   ├── deploy-ic.sh                        # IC mainnet deployment script
│   ├── deploy.sh                           # Local deployment script
│   ├── dfx.json                            # DFX backend configuration
│   └── virtual_land_registry_backend.did   # Candid interface definition
│
├── virtual_land_registry_frontend/          # React Frontend
│   ├── public/
│   │   ├── favicon.ico                     # Application icon
│   │   ├── index.html                      # HTML entry point
│   │   └── manifest.json                   # PWA manifest
│   ├── src/
│   │   ├── components/
│   │   │   ├── Analytics.js                # Market analytics dashboard
│   │   │   ├── ErrorState.js               # Error handling component
│   │   │   ├── LandCard.js                 # Individual land display card
│   │   │   ├── LandDetails.js              # Detailed land information view
│   │   │   ├── LandForm.js                 # Land registration form
│   │   │   ├── LandRegistry.js             # Main land registration interface
│   │   │   ├── Lands.js                    # Land listing component
│   │   │   ├── Loader.js                   # Loading state component
│   │   │   ├── Marketplace.js              # Trading marketplace interface
│   │   │   ├── Modal.js                    # Reusable modal component
│   │   │   ├── MyLands.js                  # User portfolio management
│   │   │   ├── ThemeToggle.js              # Dark/light theme switcher
│   │   │   └── Toast.js                    # Notification system
│   │   ├── declarations/virtual_land_registry_backend/
│   │   │   ├── index.js                    # Generated canister declarations
│   │   │   └── virtual_land_registry_backend.did.js
│   │   ├── styles/
│   │   │   ├── App.css                     # Main application styles
│   │   │   ├── components.css              # Component-specific styles
│   │   │   └── index.css                   # Global styles and variables
│   │   ├── utils/
│   │   │   ├── api.js                      # API utility functions
│   │   │   └── helpers.js                  # Helper and utility functions
│   │   ├── App.js                          # Main React application component
│   │   └── index.js                        # React application entry point
│   ├── .babelrc                            # Babel transpiler configuration
│   ├── .env                                # Environment variables (not in git)
│   ├── package.json                        # Node.js dependencies and scripts
│   ├── package-lock.json                   # Dependency version lock file
│   └── webpack.config.js                   # Webpack build configuration
│
├── .gitignore                               # Global git ignore rules
├── dfx.json                                # DFX project configuration
├── install.sh                              # Automated installation script
└── README.md                               # Project documentation

🔧 Installation & Setup

Prerequisites

  • Node.js (v16 or higher)
  • npm or yarn package manager
  • DFX SDK (Internet Computer development kit)
  • Rust (latest stable version)

Quick Start

  1. Clone the Repository

    git clone https://github.com/177-711/VirtualLandRegistry.git
    cd VirtualLandRegistry
  2. Run Automated Installation

    chmod +x install.sh
    ./install.sh
  3. Manual Installation (Alternative)

    # Install DFX SDK
    sh -ci "$(curl -fsSL https://sdk.dfinity.org/install.sh)"
    
    # Install frontend dependencies
    cd virtual_land_registry_frontend
    npm install
    cd ..

Development Environment Setup

  1. Start Local ICP Replica

    dfx start --background
  2. Deploy Backend Canisters

    dfx deploy
  3. Start Frontend Development Server

    cd virtual_land_registry_frontend
    npm start
  4. Access the Application

🌐 Deployment

Local Development

dfx deploy --network local

Internet Computer Mainnet

dfx deploy --network ic --with-cycles 1000000000000

📖 Usage Guide

1. Authentication

  • Click "Connect Wallet" to authenticate with Internet Identity
  • Create a new Internet Identity if you don't have one
  • Secure, passwordless authentication using WebAuthn

2. Land Registration

  • Navigate to the "Land Registry" section
  • Fill in land coordinates, dimensions, and descriptive metadata
  • Set land type, features, and pricing information
  • Submit registration transaction to the blockchain

3. Marketplace Operations

  • Browse available lands in the marketplace
  • Use advanced filters (type, size, location, price range)
  • Purchase lands directly through secure smart contract execution
  • View detailed land information before purchase

4. Portfolio Management

  • Access "My Lands" to view your complete land portfolio
  • List your lands for sale with custom pricing
  • Track land value appreciation and market performance
  • Transfer land ownership to other users

🏗️ Smart Contract API

Core Functions

register_land(LandRegistration) -> Result<nat64, Text>
get_land_by_id(nat64) -> opt LandInfo
get_all_lands() -> vec LandInfo
list_land_for_sale(nat64, opt nat64) -> Result<bool, Text>
buy_land(nat64) -> Result<bool, Text>
transfer_land(nat64, principal) -> Result<bool, Text>
search_lands(SearchFilters) -> vec LandInfo

Query Functions

get_land_by_id(nat64) -> opt LandInfo
get_lands_by_owner(principal) -> vec LandInfo
get_marketplace_lands() -> vec LandInfo
get_user_stats(principal) -> UserStats

🧪 Testing

Backend Testing

cd virtual_land_registry_backend
cargo test

Frontend Testing

cd virtual_land_registry_frontend
npm test
npm run test:coverage

📊 Implementation Highlights

✅ Completed Features

  • Decentralized Land Registration: Complete blockchain-based property registry
  • Secure Authentication: Internet Identity integration with WebAuthn
  • Marketplace Functionality: Peer-to-peer land trading system
  • Portfolio Management: Comprehensive asset tracking and management
  • Advanced Search Engine: Multi-parameter land discovery system
  • Real-time Analytics: Market statistics and trend visualization
  • Responsive UI/UX: Mobile-first design with dark/light theme support
  • Error Handling: Comprehensive error states and user feedback
  • Performance Optimization: Efficient state management and data loading

🔧 Technical Implementation

  • Smart Contract Architecture: Modular Rust canisters for scalable blockchain operations
  • Frontend Architecture: Component-based React application with reusable modules
  • State Management: Efficient data flow with React hooks and context
  • API Integration: Type-safe communication between frontend and blockchain
  • Security: Input validation, access control, and secure transaction handling

🚧 Future Enhancements

  • 3D Land Visualization: Interactive 3D mapping and land exploration
  • NFT Integration: Enhanced digital asset representation
  • Auction System: Time-based bidding for premium land parcels
  • Land Development Tools: In-platform design and development features
  • Mobile Application: Native iOS and Android applications
  • Multi-chain Support: Cross-blockchain compatibility and bridging

🎯 Project Objectives & Learning Outcomes

This project demonstrates proficiency in:

  • Blockchain Development: Smart contract design and implementation on ICP
  • Full-Stack Development: End-to-end application architecture
  • Modern Web Technologies: React, ES6+, and responsive design
  • Decentralized Applications: Web3 principles and blockchain integration
  • User Experience Design: Intuitive interfaces for complex blockchain operations
  • Project Management: Complete SDLC from conception to deployment

🏆 Internship Project Context

Developed as part of internship program focusing on blockchain technology and decentralized applications. This project showcases:

  • Real-world blockchain application development
  • Industry-standard development practices and tools
  • Comprehensive documentation and testing
  • Scalable architecture and clean code principles

🙏 Acknowledgments

  • Internet Computer Protocol team for blockchain infrastructure
  • DFINITY Foundation for development tools and comprehensive documentation
  • React Community for frontend framework and ecosystem
  • BlockseBlock for project guidance in association with QuadBTech

📞 Contact Information

About

Decentralized virtual land registry built on Internet Computer Protocol (ICP) with Rust backend and React frontend. Features secure land registration, marketplace trading, and portfolio management for virtual real estate.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published