1111 Python
1111 Python
Table of contents
2
Introduction
3
Objectives
4
Software requirements
5
Scope of the Project
The " land registry system " project aims to achieve the following objectives:
6
Approach Used
7
FLOWCHART OF HTML CODE USED:
Start
User interacts
with form fields
Receive Response
8
Display
Responessage
Receive Response
9
Send Data to Server
(POST /transfer_property)
Receive Response
Read Property ID
10
Receive Property Details
End
11
Explanation:
12
FLOWCHART OF CSS CODE USED :
Start
body
font-family: Arial,
sans-serif;
background-color: #f4f4f4
margin: 0;
padding: 20px;
.container
max-width: 800px;
margin: auto;
background: #fff;
padding: 20px;
border-radius: 8px;
box-shadow: 0 0 10px
rgba(0, 0, 0, 0.1);
13
h1, h2
color: #333;
.form-group
margin-bottom: 15px;
.form-group label
display: block;
margin-bottom: 5px;
.form-group input,
.form-group textarea
width: 100%;
padding: 10px;
box-sizing: border-box;
border: 1px solid #ddd;
border-radius: 4px;
14
button
padding: 10px 15px;
background: #5cb85c;
color: #fff;
border: none;
border-radius: 4px;
cursor: pointer;
button:hover
background: #4cae4c;
pre
background: #f9f9f9;
padding: 10px;
border-radius: 4px;
End
15
FLOWCHART OF CODE OF BLOCKCHAIN USED:
Start
Class Block
index
previous_hash
timestamp
data
hash
Class Blockchain
chain
16
create_genesis_block()
genesis_block
index: 0
previous_hash: "0"
timestamp: current time
data: {"property_id": "0",
"owner": "Genesis",
"details": "Initial block"}
hash: hash_block("Genesis Block")
add_block(data)
last_block = self.chain[-1]
index = len(self.chain)
timestamp = current time
hash = hash_block(data)
new_block index
previous_hash
timestamp
data
hash
self.chain.append(new_block)
return new_block
17
hash_block(data)
block_string = json.dumps(data,sort_keys=True).
encode()
return hashlib.sha256(
block_string).hexdigest()
is_chain_valid()
for i = 1 to len(self.chain)
current_block
previous_block
if current_block.hash !=
hash_block(current_block.data)
return False
if current_block.previous_hash
!= previous_block.hash
return False
return True
18
get_property(property_id)
if block.data.get('property_id') == property_id:
return block.data
return None
End
OUTPUT SCREENSHOOTS:
19
`
Fig 1
Fig 2
20
Fig 3
Fig 4
21
Fig 5
Fig 6
22
Fig 7
Fig 8
23
TEST CASE
Process Test Case Step Description Expected Actual Comments
Output Output
Add Malformed 1 Enter valid data in all Server error Unhandled This tests if
Property JSON sent fields but modify the message error or the system
to server developer console to indicating a unexpected can handle
change the fetch parsing issue behavior unexpected
request body to send data
malformed JSON formats sent
(e.g., missing a from the
comma or quotation client-side.
mark).
Add Valid Input 1 Enter a unique Success Success Pass
Property property ID, owner message: message
name, and property "Property displayed
details in the added
respective fields. successfully!"
Add Empty 1 Leave the property ID Error Error Pass
Property Property ID field blank and enter message: message
data in other fields. "Please enter displayed
a property
ID."
Add Empty 1 Leave the owner Error Error Pass
Property Owner name field blank and message: message
Name enter data in other "Please enter displayed
fields. the owner
name."
Add Empty 1 Leave the property Error Error Pass
Property Details details field blank and message: message
enter data in other "Please enter displayed
fields. property
details."
Transfer Valid 1 Enter a valid property Success Success Pass
Property Transfer ID and new owner message: message
name in the "Property displayed
respective fields. transferred
(Assuming property successfully!"
already exists)
Transfer Invalid 1 Enter an invalid Error Error Pass
Property Property ID property ID and new message: message
owner name. "Property not displayed
found."
Get Valid 1 Enter a valid property Formatted Formatted Pass
Property Property ID ID of an existing JSON JSON
Details property. containing displayed
property
details
Get Invalid 1 Enter an invalid Error Error Pass
Property Property ID property ID. message: message
Details "Property not displayed
found."
Add Valid Input 1 Enter a unique Success Success Pass
Property property ID, owner message: message:
name, and property "Property "Property
24
details in the transferred transferred
respective fields. successfully!" successfully!"
Add Empty 1 Leave the property ID Error Error Pass
Property Property ID field blank and enter message: message:
data in other fields. "Please enter "Please enter
a property a property
ID." ID."
Add Empty 1 Leave the owner Error Error Pass
Property Owner name field blank and message: message:
Name enter data in other "Please enter "Please enter
fields. a property a property
ID." ID."
Add Empty 1 Leave the property Error Error Pass
Property Details details field blank and message: message:
enter data in other "Please enter "Please enter
fields. a property a property
ID." ID."
Transfer Valid 1 Enter a valid property Success Success Pass
Property Property ID ID and new owner message: message:
name in the "Property "Property
respective fields. transferred transferred
(Assuming property successfully!" successfully!"
already exists)
Transfer Invalid 1 Enter an invalid Error Error Pass
Property Property ID property ID and new message: message:
owner name. "Property not "Property not
found." found."
Get Valid 1 Enter a valid property Formatted Formatted Pass
Property Property ID ID of an existing JSON JSON
Details property. containing containing
property property
details details
Get Invalid 1 Enter an invalid Error Error Pass
Property Property ID property ID. message: message:
Details "Property not "Property not
found." found."
25
CONCLUSION
The objective of this project is to apply blockchain technology to a real-
world problem and design a system that revolutionizes the land registry
process. The primary goal is to enhance the security, transparency, and
efficiency of land transactions by leveraging the decentralized and
immutable nature of blockchain. This project aims to develop a
comprehensive digital registry that records land ownership, verifies and
validates transactions through smart contracts, and ensures
accessibility and accuracy of land records. By doing so, we address
common issues such as fraud, disputes, and administrative
inefficiencies, thereby creating a robust and trustworthy land registry
system.
26
REFERENCES USED :-
1.Python Documentation: Official Python Documentation. Python Software
Foundation. [Python.org](https://docs.python.org/3/)
27
28