A decentralized land registration system built on Ethereum blockchain that ensures transparent, secure, and immutable property ownership records.
- Features
- Technology Stack
- System Architecture
- Prerequisites
- Installation
- Configuration
- Usage
- Smart Contracts
- API Endpoints
- Contributing
- License
- π Secure Property Registration: Blockchain-based immutable property records
- π₯ Multi-Role System: Separate interfaces for users and revenue officers
- π Document Management: Upload and store property documents using GridFS
- π° Property Trading: Built-in marketplace for property buying/selling
- π Ownership Verification: Transparent ownership history and verification
- β‘ Real-time Updates: Live transaction status and property state changes
- π‘οΈ Smart Contract Security: Automated ownership transfer with built-in validations
- HTML5/CSS3/JavaScript: User interface
- Bootstrap: Responsive design framework
- Web3.js: Blockchain interaction
- Python Flask: Web application framework
- MongoDB: Database for off-chain data storage
- GridFS: File storage system for documents
- Solidity: Smart contract development
- Truffle: Development framework
- Ganache: Local blockchain for testing
- Web3.py: Python blockchain integration
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Users Portal β β Revenue Portal β β Blockchain β
β (Port 5000) β β (Port 5001) β β (Port 8545) β
βββββββββββ¬ββββββββ βββββββββββ¬ββββββββ βββββββββββ¬ββββββββ
β β β
ββββββββββββββββββββββββΌβββββββββββββββββββββββ
β
βββββββββββββββ΄ββββββββββββ
β MongoDB β
β (Port 27017) β
βββββββββββββββββββββββββββ
Before running this project, make sure you have the following installed:
- Node.js (v14.0.0 or higher)
- Python (v3.8 or higher)
- MongoDB (v4.4 or higher)
- Git
- MetaMask browser extension
git clone https://github.com/deeksha006/Land-Registration-System-with-Blockchain.git
cd Land-Registration-System-with-Blockchainpip install -r python_package_requirements.txtnpm install -g truffle ganache-cli
cd Smart_contracts
npm install- Download and install MongoDB from official website
- Start MongoDB service on
localhost:27017
Option A: Ganache GUI (Recommended)
- Download from Truffle Suite
- Install and create a new workspace
Option B: Ganache CLI
npm install -g ganache-cli- Network ID: 1337
- RPC Server: http://127.0.0.1:8545
- Accounts: 10 accounts with 100 ETH each
The system is pre-configured for local development. Key configuration files:
Revenue/config.json: Revenue department settingsSmart_contracts/truffle-config.js: Blockchain network configuration
- Install MetaMask browser extension
- Add custom network:
- Network Name: Ganache Local
- RPC URL: http://127.0.0.1:8545
- Chain ID: 1337
- Currency Symbol: ETH
Ensure MongoDB is running on localhost:27017
Using Ganache GUI:
- Open Ganache and start your workspace
Using Ganache CLI:
ganache-cli -p 8545 -dcd Smart_contracts
truffle migrate --resetUsers Portal:
python Users/app.pyAccess at: http://localhost:5000
Revenue Portal:
python Revenue/app.pyAccess at: http://localhost:5001
| Contract | Purpose | Address |
|---|---|---|
| Users | User registration and management | Auto-deployed |
| Property | Property details and state management | Auto-deployed |
| LandRegistry | Land ownership mapping | Auto-deployed |
| TransferOwnerShip | Property transfer and sales | Auto-deployed |
registerUser(): Register new usersaddProperty(): Add property to blockchainverifyProperty(): Revenue officer verificationmakePropertyAvailable(): List property for salerequestToBuy(): Initiate purchase requesttransferOwnership(): Complete ownership transfer
GET /: Home pageGET /register: User registration pageGET /dashboard: User dashboardPOST /uploadPropertyDocs: Upload property documentsGET /availableToBuy: View properties for sale
GET /: Revenue officer loginGET /dashboard: Revenue dashboardPOST /verifyProperty: Verify property detailsGET /allProperties: View all registered properties
- User Registration: Users register on the platform
- Property Submission: Users submit property details and documents
- Revenue Verification: Revenue officers verify property authenticity
- Blockchain Recording: Verified properties are recorded on blockchain
- Marketplace Listing: Approved properties can be listed for sale
- Ownership Transfer: Secure transfer of ownership through smart contracts
- Property Owners: Register and manage their properties
- Buyers: Browse and purchase available properties
- Revenue Officers: Verify and approve property registrations
cd Smart_contracts
truffle test- Register a new user
- Add a property with documents
- Verify property as revenue officer
- List property for sale
- Complete a property purchase transaction
Land-Registration-System-with-Blockchain/
βββ Users/ # User portal application
β βββ app.py # Flask application
β βββ web/ # Frontend files
β β βββ templates/ # HTML templates
β β βββ static/ # CSS, JS, images
β βββ Property_Docs/ # Uploaded documents
βββ Revenue/ # Revenue department portal
β βββ app.py # Flask application
β βββ config.json # Configuration file
β βββ templates/ # HTML templates
β βββ static/ # Static files
β βββ utility/ # Helper functions
βββ Smart_contracts/ # Blockchain contracts
β βββ contracts/ # Solidity contracts
β β βββ Users.sol # User management
β β βββ Properties.sol # Property management
β β βββ LandRegistry.sol # Land registry
β β βββ TransferOfOwnership.sol # Ownership transfer
β βββ migrations/ # Deployment scripts
β βββ build/ # Compiled contracts
β βββ truffle-config.js # Truffle configuration
βββ python_package_requirements.txt # Python dependencies
βββ deploy_contracts.bat # Contract deployment script
βββ README.md # Project documentation
- Bootstrap Integrity Errors - Removed incorrect SHA-384 hashes
- Contract Details 500 Errors - Fixed file paths for Smart_contracts
- JavaScript JSON Parsing - Added comprehensive error handling
- Python 3.9 Compatibility - Created
app_simple.pyversions without web3 conflicts - Missing Login Endpoints - Added proper FormData handling for Revenue portal
- File Upload Issues - Enhanced document upload functionality
If you encounter TypeError: unhashable type: 'list' errors with web3/aiohttp:
- Use
Users/app_simple.pyinstead ofUsers/app.py - Use
Revenue/app_simple.pyinstead ofRevenue/app.py - These simplified versions avoid the typing module conflicts
- Users Portal:
python app_simple.py(Port 5001) - Revenue Portal:
python app_simple.py(Port 5002) - MongoDB: localhost:27017
- Ganache: localhost:8545 (Chain ID: 1337)
1. Port Already in Use
# Kill process using port
netstat -ano | findstr :8545
taskkill /PID <PID> /F2. Contract Deployment Failed
- Ensure Ganache is running
- Check network configuration in truffle-config.js
- Verify sufficient ETH in deployment account
3. MongoDB Connection Error
- Start MongoDB service
- Check connection string in application files
4. MetaMask Connection Issues
- Verify custom network settings
- Import Ganache account using private key
- Reset MetaMask account if needed
- 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
This project is licensed under the MIT License - see the LICENSE file for details.
- Ethereum Foundation for blockchain technology
- Truffle Suite for development tools
- MongoDB for database solutions
- Flask community for web framework
For support and questions:
- Create an issue in the GitHub repository
- Contact: [your-email@example.com]
β If you found this project helpful, please give it a star!