| Component | Status |
|---|---|
| Core Platform (Phase 1) | ✅ Live — demo |
| Blockchain Integration (Phase 2) | ✅ Live on Polygon Amoy testnet |
| IPFS Storage (Phase 2) | ✅ Live via Pinata |
| Forensic Lab (Phase 3) | 🔶 In development — foundation shipped |
| 3D Evidence Viewer (Phase 3) | 🔶 Viewer live (STL asset shipped), advanced controls planned |
| AI-Assisted Analysis (Phase 3) | 🔬 Research phase |
| Mainnet Deployment (Phase 4) | 🔴 Planned — currently Amoy only |
Important
All blockchain records are on the Polygon Amoy testnet. Production/mainnet anchoring is the Phase 4 target, not yet available.
- Broken chain of custody in traditional evidence room handling
- No public auditability — evidence integrity only checkable by the court
- Missing multi-hash verification (MD5, SHA-1, SHA-256)
- No immutability — files can be silently modified
- 8-role RBAC + ABAC enforcement applies to every action
- Blockchain anchoring on Polygon Amoy — write the evidence hash, immutably
- IPFS pinning via Pinata — full file, permanent storage
- Forensic Lab — generates multiple hashes per evidence, highlights tamper
- 3D evidence model — an STL digital twin of the evidence document
- 8 roles: Admin, Officer, Investigator, Analyst, Evidence Manager, Reviewer, Judge, Public
- Evidence create → register → store → transfer → verify lifecycle
- Audit logging of all custody events
- Real-time dashboard via Socket.IO
- Subordinate re-upload anti-tamper via multi-hash comparison
EVID-DGC.sol—anchorEvidence,verifyEvidence,getEvidenceHistory- Won the chain (deployed address in Deployment section)
- Files pinned to Pinata IPFS, hash recorded on-chain
- Forensic analyzer: MD5 / SHA-1 / SHA-256, entropy, file-type detection
- 3D Evidence Viewer — STL model rendered in-app (asset:
assets/evidence-cube.stl) - Forensic report generator — planned
- AI-based evidence triage — research
| Area | Maturity |
|---|---|
| Frontend / Backend | ✅ ✅ Mature — full page toolkit |
| Blockchain + IPFS | ✅ Operational — Amoy testnet |
| 3D evidence & AI | 🟡 Prototype / roadmap |
| Mainnet | ❌ Not deployed |
flowchart TD
subgraph Client
A[Browser] --> B[Dashboard / Public Pages]
end
subgraph Server
C[Express API] --> D[(PostgreSQL / Supabase)]
C --> E[Pinata IPFS]
C --> F[Polygon Amoy node]
end
subgraph Contract
F --> G[EVID-DGC contract]
end
B -->|REST + Socket.IO| C
B -->|3D viewer| H[THREE.js/STL]
| Role | Permissions |
|---|---|
| Admin | Full system control, user/role management |
| Officer | Capture & register new evidence, upload files |
| Investigator | Access case data, annotate evidence |
| Analyst | Run forensic analysis on evidence |
| Evidence Manager | Manage evidence lifecycle & retention |
| Reviewer | Verify chain of custody, approve evidence |
| Judge | Review finalized reports, certify for trial |
| Public | Verify evidence integrity (public dashboard) |
ABAC rules enforce context: only the owning investigator/team may transfer evidence; Public role is restricted to verification endpoints.
// contracts/EVID_DGC.sol (simplified)
contract EVID_DGC {
mapping(bytes32 => EvidenceRecord) public records;
function anchorEvidence(
string memory evidenceId,
bytes32 evidenceHash,
address officer
) external returns (bytes32) {
record.evidenceHash = evidenceHash; // SHA-256 of file
emit EvidenceAnchored(evidenceId, evidenceHash, block.timestamp);
return recordHash;
}
}Deployed Address (Polygon Amoy):
EVID-DGC: 0x39453ED8CF79Fe56150fe1E8348e75894e3dD9e3
Explorer : https://amoy.polygonscan.com/address/0x39453ED8CF79Fe56150fe1E8348e75894e3dD9e3
Caution
This is a testnet contract. Do not use for production evidence until Phase 4 mainnet deploy.
sequenceDiagram
autonumber
participant O as Officer
participant S as Server
participant C as EVID-DGC (Amoy)
participant I as Pinata IPFS
O->>S: Upload file + metadata
S->>I: Pin file → CID
S->>C: anchorEvidence(evidenceId, keccak(file))
C-->>S: emit EvidenceAnchored { block }
S-->>O: Evidence ID + tx hash
- Files pinned on Pinata IPFS at upload time — permanent & deduplicated
- CID stored in PostgreSQL, hash stored on-chain
- Public-dashboard verification compares stored file hash vs. on-chain hash
erDiagram
USERS ||--o{ EVIDENCE : submits
USERS ||--o{ AUDIT_LOG : performs
EVIDENCE {
uuid id PK
string case_number
string description
string file_hash "SHA-256"
string ipfs_cid
string onchain_tx
string custody_actor
}
AUDIT_LOG {
uuid id PK
uuid evidence_id FK
uuid actor_id FK
string action
timestamp time
}
Full schema: complete-database-setup-fixed.sql (repo root).
flowchart LR
C[Evidence Capture] --> R[Registration]
R --> L[Lab Analysis]
L --> A[Anchoring on Amoy]
A --> V[Verification by Reviewer]
V --> T[Transfer / Trial]
T --> D[Disposal or Archive]
| Step | Actor | Output |
|---|---|---|
| Capture | Officer | File + metadata |
| Register | Evidence Manager | Evidence ID |
| Analyze | Analyst | Forensic report |
| Anchor | System | Hash 0x + txid |
| Verify | Reviewer / Public | Certified copy |
A genuine 3D model asset is included: assets/evidence-cube.stl.
The interactive viewer (view-evidence3d.html) renders it with notes/rotation;
miniature interactive application elements (e.g., adjustable lighting) are planned.
npm test # unit + integration
npm run test:e2e # Playwright E2E (planned configuration in progress)- Evidence CRUD multi-hash detection
- Auth + RBAC role gating
- IPFS & chain mocks
- Node.js 18+, npm
- Supabase project (or
docker run postgres) - (Optional) Pinata account + JWT
git clone https://github.com/Gooichand/blockchain-evidence.git
cd blockchain-evidence
npm installcp .env.example .env| Variable | Example |
|---|---|
SUPABASE_URL |
https://xyz.supabase.co |
SUPABASE_ANON_KEY |
eyJ... |
JWT_SECRET |
any (use pwgen) |
POLYGON_RPC_URL |
https://rpc-amoy.polygon.technology |
PRIVATE_KEY |
wallet key (Amoy test faucet) |
CONTRACT_ADDRESS |
0x39453ED8CF79Fe56150fe1E8348e75894e3dD9e3 |
PINATA_JWT |
your Pinata JWT |
npm run dev
# http://localhost:3000Seed the DB first with complete-database-setup-fixed.sql (creates 8 roles &
demo users).
Anyone can enter an Evidence ID, SHA-256 hash, or on-chain tx hash on the Public Dashboard and receive VERIFIED ✅ / TAMPERED ❌ instantly — cross-checked against PostgreSQL, the Amoy ledger, and IPFS.
docs/API.md– REST endpointsdocs/DEPLOYMENT.md– Render + PostgreSQL setupdocs/SECURITY.md– security model & checklistPHASES.md– phases, roadmap, statusCONTRIBUTING.md– how to contribute
render.yaml provisions the web service + managed PostgreSQL.
See CONTRIBUTING.md — issues welcomed, PRs reviewed.
Help wanted tags: 3d-viewer, ai-analysis, mainnet.
MIT — see LICENSE. © 2025-2026 EVID-DGC.
- Pinata for IPFS pinning
- Polygon Amoy testnet
- Render hosting
- Supabase PostgreSQL + Auth
- GitHub Actions for CI status badge