A decentralized land registry and marketplace built on the Internet Computer Protocol (ICP). This application allows users to mint virtual land NFTs, manage their properties, and trade them in a peer-to-peer marketplace.
| Landing Page | My Lands | Marketplace | Mint Land |
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
- 🏗️ Land Minting: Create unique virtual land NFTs with custom coordinates, names, and images
- 🖼️ Image Storage: Upload and store land images directly on-chain as byte arrays
- 👤 Identity Management: Secure authentication using Internet Identity
- 🏠 Portfolio Management: View and manage all your minted lands in one place
- 📋 Listing System: List your lands for sale with custom pricing
- 💰 Direct Trading: Buy lands directly from other users
- 🔄 Dynamic Updates: Real-time marketplace updates and inventory management
- ❌ Listing Management: Remove listings and manage your marketplace presence
- 📱 Responsive Design: Mobile-first design with modern CSS Grid layouts
- 🌙 Modern UI: Clean, professional interface with smooth animations
- ⚡ Fast Loading: Optimized performance with efficient data fetching
- 🔔 Status Updates: Real-time feedback for all user actions
📦 Backend Canister
├── 🗄️ Land Storage (Vec<LandNFT>)
├── 🏪 Marketplace (HashMap<u64, Listing>)
├── 🔢 ID Management (Auto-incrementing)
└── 🔐 Authentication (Principal-based)
📦 Frontend Application
├── 🔐 Authentication (Internet Identity)
├── 🎨 Components (Mint, Portfolio, Marketplace)
├── 🎯 Actor Management (Candid Interface)
└── 📱 Responsive UI (SCSS Modules)
-
Clone the repository
git clone https://github.com/NamVr/Virtual-Land-Registry cd virtual-land-registry -
Start the local Internet Computer replica
dfx start --background
-
Install frontend dependencies
npm install
-
Deploy the canisters
dfx deploy
-
Start the development server (Optional)
npm start
-
Access the application (DFX will provide canister URLs)
- Development:
http://localhost:8080 - Production:
http://localhost:4943?canisterId={asset_canister_id}
- Development:
- Click "Login" to authenticate using Internet Identity
- Your Principal ID will be displayed in the navigation bar
- All land ownership is tied to your authenticated identity
- Navigate to "Mint Land" tab
- Fill in land details:
- Name: Descriptive name for your land
- Coordinates: X,Y position on the virtual map
- Size: Dimensions (e.g., "10x10 meters")
- Image: Upload a representative image
- Click "Mint Land" to create your NFT
- Visit "My Lands" to view all your minted properties
- Each land displays:
- Unique ID and name
- Coordinates and size
- Uploaded image
- Current ownership status
- Go to "Marketplace" to access trading features
- Listing: Set a price in ICP for any of your unlisted lands
- Buying: Purchase lands listed by other users
- Management: Remove your listings or update prices
// Core data structures
struct LandNFT {
id: u64,
name: String,
coordinates: Coordinates,
size: String,
image_data: Vec<u8>,
owner: Principal,
timestamp: u64,
}
struct Listing {
land_id: u64,
price: u64,
seller: Principal,
listed_at: u64,
}mint_land()- Create new land NFTsget_my_land()- Retrieve user's landslist_land_for_sale()- Create marketplace listingsbuy_land()- Execute land purchasesget_marketplace_listings()- Fetch all active listings
- React Hooks: State management with useState and useEffect
- Actor Pattern: Direct canister communication via Candid interface
- Component Architecture: Modular, reusable UI components
- Responsive Design: CSS Grid and Flexbox layouts
virtual-land-registry/
├── src/
│ ├── backend/
│ │ ├── src/lib.rs # Main canister logic
│ │ ├── Cargo.toml # Rust dependencies
│ │ └── backend.did # Candid interface
│ ├── frontend/
│ │ ├── src/
│ │ │ ├── components/ # React components
│ │ │ │ ├── MintLandForm.jsx
│ │ │ │ ├── MyLands.jsx
│ │ │ │ ├── Marketplace.jsx
│ │ │ │ └── Navbar.jsx
│ │ │ ├── App.jsx # Main application
│ │ │ ├── main.jsx # Entry point
│ │ │ ├── index.scss # Global styles
│ │ │ ├── actor.js # Canister interaction
│ │ │ └── identity.js # Authentication logic
│ │ ├── index.html # HTML template
│ │ ├── package.json # Dependencies
│ │ └── vite.config.js # Build configuration
│ └── declarations/ # Auto-generated Candid bindings
├── dfx.json # DFX configuration
└── README.md # This file
# Backend Development
dfx deploy backend # Deploy only backend canister
dfx canister call backend mint_land # Test backend functions
# Frontend Development
npm run dev # Start development server
npm run build # Build for production
npm run generate # Regenerate Candid bindings
# Full Deployment
dfx deploy # Deploy all canisters
dfx deploy --network ic # Deploy to mainnet- Authentication Test: Login/logout functionality
- Minting Test: Create lands with various data types
- Portfolio Test: Verify land display and data integrity
- Marketplace Test: List, buy, and unlist lands
- Edge Cases: Test with large images, special characters, etc.
# Test canister functions directly
dfx canister call backend get_all_land
dfx canister call backend get_marketplace_listingsdfx start --background
dfx deploy
npm startdfx deploy --network ic --with-cycles 1000000000000- Principal-based Authentication: Secure identity management
- Ownership Verification: Strict land ownership checks
- Input Validation: Comprehensive data validation
- Error Handling: Graceful error management and user feedback
- Immutable Records: Blockchain-based data integrity
- Land Categories: Different types of virtual properties
- Auction System: Time-based bidding for premium lands
- Land History: Complete ownership and transaction history
- Geographic Features: Advanced coordinate system with regions
- Mobile App: Native mobile application
- Integration: Connect with other ICP ecosystems
This project is licensed under the MIT License - see the LICENSE file for details.
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Documentation: Internet Computer Docs
- Community: DFINITY Developer Forum
- Issues: GitHub Issues
- ✅ Full-stack decentralized application
- ✅ On-chain image storage
- ✅ Real-time marketplace functionality
- ✅ Responsive modern UI/UX
- ✅ Production-ready architecture
Built with ❤️ on the Internet Computer
Empowering the future of decentralized virtual real estate



