How ronnie-ahmed/blockchain-based-real-estate-marketplace works
Project Type and Purpose
• BlockEstate is a full-stack decentralized application (“dApp”) that lets users list, buy, and sell real estate as ERC-721 NFTs on the Ethereum blockchain.
• Frontend: React.js + Tailwind CSS + HTML5
• Smart-contract backend: Solidity (ERC-721) via Hardhat + Ethers.js
• Off-chain asset storage: IPFS for property images and metadata
File Structure Analysis
• contracts/ – Solidity smart contracts
• scripts/deploy.js – Hardhat script to deploy contracts to a local or public network
• test/Lock.js – Mocha/Chai tests for contract behavior
• hardhat.config.js – Hardhat build & network configuration
• frontend/ – React application directory
• package.json & package-lock.json – Node dependencies
• .gitmodules – (if present) for submodule references
Architectural Patterns
• Three-tier architecture:
• Presentation layer (React + Ethers.js + MetaMask)
• Business logic on-chain (Solidity ERC-721 contracts)
• Off-chain storage (IPFS)
• Ethers.js acts as the API/communication layer between browser UI and Ethereum node.
• Hardhat local node simulates an Ethereum network for development & testing.
a. Users & Wallet
• Browser with React UI
• MetaMask (injected provider)
b. Frontend Layer
• React Components (ListProperty, BuyPage, MyListings)
• Ethers.js library
c. Blockchain Layer
• Ethereum Node (Hardhat local node or Infura/mainnet)
• Smart Contract (ERC-721 Lock or Property NFT)
d. Off-Chain Storage
• IPFS cluster for images/metadata
e. DevOps / Tooling
• Hardhat deployment scripts
• Test runner (Mocha/Chai)
Relationships & Data Flows
• User → React UI: fills property data or clicks Buy
• React UI → MetaMask prompt → User signs transaction
• MetaMask → Ethereum Node → Smart Contract
• Smart Contract ↔ IPFS: stores/returns token URI pointing to IPFS metadata
• Ethereum Node → React UI: returns transaction receipts & contract events
• Hardhat Script → Ethereum Node: deploys contract bytecode
• Test Suite → Smart Contract (via Hardhat) for unit testing