A secure portal for police authorities to manage crime records, ensuring transparency and preventing unauthorized modifications or deletions.
✅ Add, view, and manage detailed crime records.
🔒 Immutable crime records to prevent tampering or deletion.
🕵️♂️ Detailed suspect profiles and case descriptions.
🔎 Search, filter, and sort crime records for efficient management.
🎨 Frontend: React.js
⚙️ Backend: Node.js (Express.js)
🗄 Database: MongoDB
⛓ Blockchain/Smart Contract: Solidity
🌍 Testnet: Ethereum Sepolia
The Criminal Report Management System consists of four main components:
1️⃣ Criminal Report Creation
2️⃣ Review by Senior Officer
3️⃣ Blockchain Integration
4️⃣ Validation
The following diagram illustrates the entire process from report creation to validation:
graph TD
A[📝 Start] --> B[👮 Operational Officer Creates Report]
B --> C[💾 Save Report to MongoDB]
C --> D[🔍 Senior Officer Reviews Report]
D --> E{✅ Approved?}
E -->|Yes| I[🔗 Start Adding to Blockchain]
E -->|No| G[🔄 Report will be reuploaded by Operational body]
G --> H[🏁 End]
I --> K[🔑 Hash Report Data]
K --> M[🛡 Add Hash and MongoDB ID to Ethereum Blockchain]
M --> H
N[🔎 Validation Request] --> O[📂 Fetch Report from MongoDB]
O --> P[🔢 Generate Hash of Fetched Data]
P --> Q[🔗 Retrieve Blockchain Hash]
Q --> R{⚖ Hashes Match?}
R -->|Yes| S[✔ Data Validated]
R -->|No| T[❌ Data Not Validated]
S --> U[🏁 End]
T --> U
- Node.js (v16+)
- npm or yarn
- Metamask browser extension
- Ethereum wallet
- Go to Alchemy
- Create a free account
- Create a new app
- Select "Ethereum" and "Sepolia" network
- Copy the HTTP RPC URL
- Install Metamask browser extension
- Create a new wallet
- Switch to Sepolia Testnet
- Click network dropdown
- Select "Add Network"
- Choose "Ethereum Sepolia"
- In Metamask:
- Click account menu
- Select "Account Details"
- Click "Export Private Key"
- Enter wallet password
- Copy private key
- Use Sepolia Faucets
- Connect Metamask wallet
- Request test ETH
- Confirm transaction in Metamask
# Clone repository
git clone [your-repo-url]
cd [project-directory]
# Install dependencies
npm install
# Create .env file
touch .env
# Add to .env
RPC_URL=your_alchemy_rpc_url
PRIVATE_KEY=your_metamask_private_keycd smart_contract
# Compile contracts
npx hardhat compile
# Deploy to Sepolia
npx hardhat run scripts/deploy.js --network sepolia- Never share private key
- Use testnet for development
- Store .env in .gitignore
- copy the contract adress in the console
- view from sepolia blockchain explorer
- Get the mongo_uri from cloud
- Open the .env.example of server and fill the data by creating .env file
- Do "npm run dev" in both frontend and backend






