Project Details
Tamper-Proof Supply Chain Management System
The primary objective is to simulate blockchain-like immutable records for supply chain tracking. By utilizing cryptographic SHA-256 hashing, the system ensures that every step of a product's journey—from manufacturing to retail—is recorded in a permanent ledger that cannot be altered without breaking the chain of trust.
Frontend
- Next.js 15 (React Framework)
- Tailwind CSS (Styling)
- ShadCN UI & Lucide Icons
Backend & Storage
- Firebase Firestore (Real-time DB)
- Firebase Auth (Secure Access)
- Web Crypto API (SHA-256 Logic)
Stack Note: This implementation leverages a high-performance serverless environment (Next.js & Firebase) to provide real-time synchronization and a responsive user interface, adhering to the blockchain simulation requirements with modern industry standards.
Manufacturer Module
Register products with metadata (ID, Name, Batch, Date). Generates unique QR code and creates the genesis block.
Distributor Module
Appends logistical data (Distributor Name, Location, Timestamp) to the chain using the previous block's hash.
Retailer Module
Logs final handover records into the retail environment, completing the verifiable journey.
Verification Module
Public-facing tool to scan/enter IDs and visualize the entire tamper-proof history in a timeline format.
Every supply chain event is stored as an immutable "block" in Firestore with the following structure:
{
index: number,
timestamp: string,
productId: string,
actor: 'Manufacturer' | 'Distributor' | 'Retailer',
action: string,
previousHash: string,
currentHash: string (SHA-256)
}The previousHash field links each record to the one before it. Any attempt to tamper with past data would result in a hash mismatch, instantly invalidating the entire subsequent chain and exposing the modification.