The Blockchain-Based Evidence Protection System is a secure and immutable platform designed to store and verify legal evidence using blockchain technology. It ensures data integrity, prevents tampering, and allows authorized personnel (lawyers, judges, law enforcement) to securely access evidence with transparency and accountability.
✅ Immutable Storage – Evidence is securely stored on the blockchain, preventing tampering.
✅ Smart Contracts – Automates evidence verification, reducing manual errors.
✅ Role-Based Access – Only authorized entities can view or verify the evidence.
✅ Transparent Audit Trail – Tracks every action on evidence in a verifiable manner.
✅ Secure File Uploads – Stores text, images, videos, and other legal documents with cryptographic hashing.
- Frontend: React.js + Tailwind CSS + Framer Motion
- Backend: Node.js + Express.js
- Blockchain: Solidity (Ethereum/Polygon) + Web3.js
- Storage: IPFS (InterPlanetary File System) for decentralized storage
- Database: PostgreSQL / Firebase (optional for metadata storage)
- Upload Evidence – Users submit evidence files, which are encrypted and stored on IPFS.
- Generate Hash – A unique cryptographic hash is created for each piece of evidence.
- Smart Contract Verification – Hash is recorded on the blockchain to ensure immutability.
- Role-Based Access Control – Only verified users can retrieve and validate the evidence.
- Tamper Detection – Any change to the original file results in a hash mismatch, indicating tampering.
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract EvidenceStorage {
struct Evidence {
string ipfsHash;
address uploader;
uint256 timestamp;
}
mapping(string => Evidence) public evidences;
function addEvidence(string memory _hash) public {
require(bytes(evidences[_hash].ipfsHash).length == 0, "Evidence already exists");
evidences[_hash] = Evidence(_hash, msg.sender, block.timestamp);
}
function verifyEvidence(string memory _hash) public view returns (address, uint256) {
require(bytes(evidences[_hash].ipfsHash).length != 0, "Evidence not found");
return (evidences[_hash].uploader, evidences[_hash].timestamp);
}
}# Clone the repository
git clone https://github.com/yourusername/blockchain-evidence-system.git
cd blockchain-evidence-system
# Install dependencies
npm install # For frontend
npm run install-backend # For backend
# Start the development server
npm start # For frontend
npm run start-backend # For backend- Deploy the smart contract on Ethereum/Polygon using Hardhat or Truffle.
- Update the contract address in the frontend
config.jsfile. - Deploy the frontend using Vercel, Netlify, or Firebase Hosting.
- AES Encryption for evidence files before uploading to IPFS.
- Role-Based Authentication for lawyers, judges, and officials.
- Blockchain Validation ensures that stored evidence remains untampered.
We welcome contributions! 🚀 Feel free to submit PRs, suggest features, or report bugs.
MIT License - Free to use and modify.
👤 Sk Mastan - GitHub | LinkedIn
🚀 Secure. Transparent. Immutable. Blockchain-Powered Evidence Protection! 🔥