Skip to content

Adarsh290406/docauth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DocAuth | Decentralized Document Authentication

A high-performance Web 3.0 document authentication system built for the BGI Hackathon 2026. This platform enables users to establish immutable proof of existence for any document using the Ethereum blockchain.

🚀 Vision

In an era of deepfakes and document forgery, DocAuth provides a "Source of Truth" by anchoring cryptographic hashes of official documents into the Ethereum Sepolia testnet.

✨ Features

  • Immutable Registration: Anchor document hashes securely on-chain.
  • Instant Verification: Drag-and-drop any file to check its authenticity against the blockchain ledger.
  • Batch Verification: Validate up to 20 documents in a single transaction-free query.
  • Authenticity Certificates: Download premium PDF certificates with embedded verification QR codes.
  • QR Code Integration: Generate and share QR codes for instant mobile verification.
  • User Dashboard: Manage your portfolio of secured documents in a beautiful glassmorphism interface.

🛠 Tech Stack

  • Smart Contracts: Solidity 0.8.20, Hardhat
  • Frontend: React 18, Vite, Tailwind CSS v4
  • Web3: Ethers.js v6, MetaMask integration
  • Utilities: Crypto-JS (Hashing), QRCode (QR Generation), jsPDF (Certificate Generation)
  • Deployment: Sepolia Testnet (Public RPC)

📦 Project Structure

  • /blockchain: Hardhat workspace for smart contracts and tests.
  • /frontend: Unified Vite + React DApp with integrated premium landing page and Tailwind v4.

🏁 Getting Started

Prerequisites

  • Node.js (v18+)
  • MetaMask extension with Sepolia testnet ETH

1. Smart Contract Setup

cd blockchain
npm install
npx hardhat test
# To deploy:
npx hardhat run scripts/deploy.js --network sepolia

2. Frontend Setup

cd frontend
npm install
# Update CONTRACT_ADDRESS in src/utils/constants.js with your deployed address
npm run dev

📜 Smart Contract Functions

  • registerDocument: Register a single hash.
  • registerBatch: Register multiple hashes (Gas optimized).
  • verifyDocument: Query single hash status.
  • verifyBatch: Query multiple hashes in one call.
  • revokeDocument: Document owner can revoke a record.
  • getMyDocuments: Fetch all records for the connected wallet.

🏆 Hackathon Note

This project was designed for the BGI Hackathon with a focus on premium UI aesthetics (Dark Glassmorphism) and enterprise-grade features like batch processing and downloadable certificates.

About

Blockchain document authentication on Polygon | MetaMask + Firebase

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages