Skip to content

Repository files navigation

Decentralized Product Authenticity Checker ⛓️

Midwest Block-a-thon 2025 | Built in 24 hours

A blockchain-based decentralized application (dApp) that enables tamper-proof product verification using Ethereum smart contracts. This project addresses the growing problem of counterfeit goods by providing a transparent, immutable system for tracking product authenticity.

🎯 Problem Statement

Counterfeit products cost businesses billions annually and pose serious risks to consumers. Traditional centralized verification systems are vulnerable to tampering and lack transparency. Our solution leverages blockchain technology to create an immutable record of product authenticity that anyone can verify.

✨ Features

  • Smart Contract Verification: Solidity-based contracts store product authentication data on Ethereum blockchain
  • Decentralized Storage: No single point of failure - data is distributed across the network
  • User-Friendly Interface: React-based frontend for easy product verification
  • MetaMask Integration: Secure wallet authentication for transactions
  • Real-Time Verification: Instant product authenticity checks via blockchain queries
  • Tamper-Proof Records: Immutable blockchain ensures data integrity

🛠️ Tech Stack

  • Frontend: React.js, JavaScript, HTML/CSS
  • Backend: Express.js, Node.js
  • Blockchain: Solidity, Ethereum, Hardhat
  • Web3 Integration: Ethers.js, Web3.js, MetaMask
  • Development: Hardhat (testing & deployment)

🏗️ Architecture

  1. Smart Contracts (/contracts): Solidity contracts handling product registration and verification
  2. Frontend (/frontend): React application for user interaction
  3. Backend (/backend): Express.js API connecting frontend to blockchain
  4. Testing Suite (/test): Comprehensive smart contract tests

🚀 Getting Started

Prerequisites

  • Node.js (v14+)
  • MetaMask browser extension
  • Ethereum test network (Sepolia/Goerli) access

Installation

# Clone the repository
git clone https://github.com/NeoCoder7/Bloc-athon.git
cd Bloc-athon

# Install dependencies
npm install

# Compile smart contracts
npx hardhat compile

# Run tests
npx hardhat test

# Deploy to local network
npx hardhat node
npx hardhat run scripts/deploy.js --network localhost

# Start frontend (in new terminal)
cd frontend
npm install
npm start

📝 How It Works

  1. Product Registration: Manufacturers register products on the blockchain with unique identifiers
  2. Smart Contract Storage: Product data is stored in tamper-proof smart contracts
  3. Consumer Verification: Users can verify authenticity by scanning QR codes or entering product IDs
  4. Blockchain Query: The dApp queries the blockchain for product records
  5. Instant Results: Users receive immediate verification status

🔧 Smart Contract Functions

  • registerProduct(): Add new product to blockchain
  • verifyProduct(): Check product authenticity
  • updateProduct(): Modify product details (authorized only)
  • getProductHistory(): Retrieve complete product lifecycle

🎓 Lessons Learned

  • Optimizing gas fees for blockchain transactions
  • Handling asynchronous Web3 operations
  • Integrating MetaMask authentication flows
  • Managing state between frontend and blockchain
  • Smart contract security best practices

🏆 Hackathon Achievement

Built during Midwest Block-a-thon 2025 - A 24-hour blockchain innovation challenge where we explored real-world applications of decentralized technology.

👥 Team

  • NeoCoder7 (Hameem Mohammed) - Full-stack Development, Smart Contracts
  • HarshaanChakkal - Frontend Development
  • pranavitf - Backend Integration

📄 License

This project is open source and available under the MIT License.

🔗 Links


Built with ❤️ using Ethereum & Web3 technology

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages