TerraLink is a full-stack Web3 real-estate platform that enables secure property registration, listing, rentals, and fractional ownership using Ethereum smart contracts.
Built with React, Vite, Wagmi, RainbowKit, Solidity, and Foundry, TerraLink combines modern Web3 UX with decentralized ownership and transparent on-chain transactions.
- Mint real-estate properties as NFTs
- Store metadata using IPFS
- Immutable on-chain ownership records
- List properties for sale
- Update listing prices
- Cancel listings
- Buy properties securely using smart contracts
- Open rental agreements
- Tenant rent payments
- Security deposit handling
- Rental termination workflow
- Deposit refunds and deductions
- Enable shared ownership of properties
- Contributors invest into fractional pools
- Rental income distribution to investors
- Claimable payouts for contributors
- MetaMask support
- RainbowKit wallet connection
- Wagmi + Viem integration
- Sepolia testnet deployment
- Responsive UI built with TailwindCSS
- Framer Motion animations
- React Router navigation
- Toast notifications
- Reusable component architecture
- React
- Vite
- TailwindCSS
- Framer Motion
- React Router
- Wagmi
- Viem
- RainbowKit
- Recharts
- Solidity
- Foundry
- Ethereum Sepolia Testnet
- IPFS
- Pinata
TerraLink-RealEstate-Using-Blockchain/
β
βββ frontend/ # React + Vite frontend
β βββ src/
β βββ public/
β βββ components/
β βββ pages/
β βββ package.json
β
βββ smart contracts/
β βββ src/
β β βββ PropertyNFT.sol
β β βββ Marketplace.sol
β β βββ RentalEscrow.sol
β β βββ FractionalInvestment.sol
β β βββ MockUSDT.sol
β β
β βββ script/
β β βββ Deploy.s.sol
β β
β βββ test/
β βββ Terralink.t.sol
β
βββ README.mdHandles:
- Property minting
- Ownership records
- Metadata storage
- Property registration events
Handles:
- Property listings
- Buying/selling
- Listing updates
- Listing cancellation
Handles:
- Rental agreements
- Security deposits
- Rent payment flows
- Refunds and settlement
Handles:
- Shared property investments
- Investor contribution tracking
- Rental income payouts
- Claimable rewards
Mock ERC20 token used for testing transactions.
Install the following before running the project:
- Node.js
- npm
- Foundry
- MetaMask
- Git
git clone https://github.com/Chitrangath/TerraLink-RealEstate-Using-Blockchain.git
cd TerraLink-RealEstate-Using-Blockchaincd frontend
npm installCopy .env.example into .env
cp .env.example .envUpdate the following variables:
VITE_WALLETCONNECT_PROJECT_ID=your_walletconnect_project_id
VITE_PINATA_JWT=your_pinata_jwt
VITE_SEPOLIA_RPC_URL=your_sepolia_rpc_url
VITE_DEPLOYMENT_BLOCK=deployment_block
VITE_MOCK_USDT_ADDRESS=0x...
VITE_PROPERTY_NFT_ADDRESS=0x...
VITE_MARKETPLACE_ADDRESS=0x...
VITE_RENTAL_ESCROW_ADDRESS=0x...
VITE_FRACTIONAL_ADDRESS=0x...npm run devFrontend runs on:
http://localhost:5173cd "smart contracts"
forge installforge buildforge testforge script script/Deploy.s.sol --rpc-url <RPC_URL> --private-key <PRIVATE_KEY> --broadcast- User uploads property metadata
- Metadata stored on IPFS
- Property NFT minted
- Ownership stored on-chain
- Owner lists property
- Buyer approves token allowance
- Smart contract executes purchase
- Ownership transferred automatically
- Owner opens rental listing
- Tenant accepts rental
- Deposit locked in escrow
- Monthly rent payments processed
- Deposit refunded after completion
- Owner creates investment pool
- Investors contribute funds
- Rental income deposited
- Contributors claim rewards proportionally
The frontend is configured for:
- Ethereum Sepolia Testnet
Contract writes are restricted to Sepolia deployments.
Smart contract tests are located in:
smart contracts/test/Terralink.t.solRun tests:
forge test -vvAdd screenshots here.
Example:
/screenshots/homepage.png
/screenshots/property-details.png
/screenshots/marketplace.png
/screenshots/fractional-investment.png- Smart contracts should be audited before production deployment
- Never expose private keys publicly
- Store sensitive credentials securely
- Prefer backend proxying for Pinata JWT in production
- Validate ownership before executing transactions
- Multi-chain deployment
- DAO governance for properties
- Real government land registry integration
- AI property valuation
- Mobile application
- Fiat payment gateway integration
- NFT mortgage system
Contributions are welcome.
- Fork the repository
- Create a feature branch
git checkout -b feature/new-feature- Commit changes
git commit -m "Added new feature"- Push changes
git push origin feature/new-feature- Open a Pull Request
This project is licensed under the MIT License.
GitHub Repository: https://github.com/Chitrangath/TerraLink-RealEstate-Using-Blockchain
- Ethereum
- Foundry
- Wagmi
- RainbowKit
- React
- TailwindCSS
- IPFS
- Pinata