An immutable, decentralized application (dApp) engineered to eliminate credential and certificate fraud. ChainCert anchors digital credentials securely to the blockchain. By leveraging client-side cryptographic hashing, the protocol guarantees absolute data privacy while offering instant, single-click verification without centralized intermediaries.
π Live Production Demo: Launch ChainCert App
- Zero-Knowledge Privacy Alignment: The application calculates a unique SHA-256 fingerprint of the document locally within the browser engine via the Web Crypto API. Raw files or personal identity attributes are never broadcasted or exposed to centralized servers.
- Immutable Cryptographic Ledger: Validated document signatures are anchored to a Solidity smart contract registry deployed on a public decentralized network, creating an unalterable proof of authority.
- Tamper Detection: If even a single character, pixel, or byte of data within an issued certificate is manipulated post-issuance, the generated runtime hash changes drastically, triggering an immediate validation failure on-chain.
- Smart Contracts: Solidity
^0.8.20(Gas-optimized registries using explicitbytes32mappings over intensive strings). - Frontend Interface: React.js framework compiled through Vite, optimized with custom glassmorphic styling paradigms.
- Web3 State Machinery: Ethers.js (v6) protocol providers interacting natively with browser wallet engines (e.g., MetaMask).
- Development Sandbox: Remix IDE for runtime ledger compilation and isolated contract deployment pipelines.
- Node.js (v18.x or higher suggested)
- An active Web3 browser extension interface (e.g., MetaMask) provisioned with test funds from an Ethereum Sepolia Testnet Faucet.
git clone https://github.com/Md-nexus/chaincert.git
cd chaincertnpm install- Open the raw contract file found at
contracts/ChainCert.solwithin Remix IDE. - Compile using a target version of
0.8.20or higher. - Switch your deployment network tab to Injected Provider - MetaMask (Ensure your wallet extension is explicitly set to the Sepolia Test Network).
- Deploy the contract and duplicate the resulting deployed hash string.
- Configure your environment: Duplicate the
.env.examplefile and rename it to.env, then patch your live contract address:
VITE_CONTRACT_ADDRESS="YOUR_DEPLOYED_CONTRACT_ADDRESS_HERE"
npm run devOpen your local loopback address at http://localhost:3000 to interact with your execution environment.
Follow these step-by-step instructions to configure your development workspace, bypass testnet restrictions, deploy the smart contract, and launch the frontend application.
MetaMask hides test networks by default. You must unhide them to access the deployment pipeline:
- Open your MetaMask extension.
- Click the Network Dropdown menu in the top-left corner (defaults to "Ethereum Mainnet").
- Toggle "Show test networks" to ON. If you do not see the toggle, go to Settings β‘οΈ Advanced β‘οΈ Show test networks.
- Select Sepolia from the dropdown menu.
- Network Name: Sepolia Test Network
- RPC URL:
https://rpc.sepolia.org - Chain ID:
11155111 - Currency Symbol:
ETH - Block Explorer URL:
https://sepolia.etherscan.io
Standard faucets (like Alchemy or QuickNode) enforce an "Anti-Sybil" check requiring a mainnet balance of real ETH to mitigate bot scripts. To acquire testnet gas 100% free without a mainnet balance, use one of these developer bypasses:
- Bypass A: Proof-of-Work Mining Faucet (Recommended): Navigate to
sepolia-faucet.pk910.de. Paste your wallet address and click Start Mining. Your computer will perform light CPU-based calculations. After 2β5 minutes, click Stop Mining & Claim Rewards to receive your Sepolia ETH. - Bypass B: GitHub Authentication Faucet: Navigate to
learnweb3.io/faucets/sepolia. Authenticate with a free GitHub account to bypass the mainnet balance verification and receive your testnet drip instantly.
- Open your browser and navigate to remix.ethereum.org.
- In the left-hand File Explorer, create a new file named
ChainCert.sol. - Copy the Solidity code located within the
/contractsdirectory of this repo and paste it into the Remix editor window. - Select the Solidity Compiler tab (3rd icon down on the sidebar) and click Compile ChainCert.sol (Ensure compiler version is set to match
^0.8.20). - Select the Deploy & Run Transactions tab (4th icon down on the sidebar).
- Change the Environment dropdown from Remix VM to Injected Provider - MetaMask. Approve the incoming connection request from MetaMask.
- Verify that the Account field displays your Sepolia wallet address, then click the orange Deploy button.
- Confirm the gas transaction inside your MetaMask popup wallet.
This is a false positive. Your assets are completely secure. To authorize your contract deployment and function interactions, choose one of these routes:
- The Quick Bypass: On the warning banner, click "See details" β‘οΈ "Proceed anyway" or "Continue at your own risk". This unlocks the standard verification screen, allowing you to click Confirm.
- The Permanent Developer Tweak: If you are actively modifying code and want to suppress recurrent alerts: Open MetaMask β‘οΈ Settings β‘οΈ Security & Privacy β‘οΈ Scroll down and switch the "Security Alerts" (Powered by Blockaid) toggle to OFF. (Remember to turn this back on when interacting with untrusted, live web environments).
To connect your frontend to your newly deployed smart contract, follow this configuration procedure:
- Initialize your local environment file: In the root directory of your project, locate the file named
.env.example. - Create your private .env: Duplicate
.env.exampleand rename the copy to exactly.env. (This file is already ignored by git to keep your address private). - Apply your contract address: Open your new
.envfile and paste your live deployed contract address:VITE_CONTRACT_ADDRESS=0xYourActualDeployedContractAddressHere - Save and Synchronize: Your application is pre-configured to detect this address automatically upon startup.
Once the address is set, synchronize local workspace project dependencies and execute the development server:
npm install
npm run devOpen your local web engine link at http://localhost:3000.
π ## Production Hosting & Build Operations (Netlify) To deploy your working build to a live public server using Netlify Drop without Git automation, avoid stale builds and credential locks by following this procedure:
- Compile the Distribution Bundle
Whenever you modify your frontend code or change your
CONTRACT_ADDRESSvariable, you must re-generate your static build. If you skip this step, your deployed site will use a stale snapshot containing old placeholder values.
npm run buildThis generates a newly updated, production-ready directory titled /dist in your root workspace.
- Resolving Password Prompts & Account Rules If your hosted Netlify site prompts visitors for a site-wide password, or locks anonymous uploads behind an unverified access barrier, apply these configuration remedies:
- Remedy A: Eliminate Anonymous Drops: Anonymous uploads via Netlify Drop often expire or require authorization checks. Go to app.netlify.com, create a free account, log in, navigate to your team dashboard, click Add New Site, and drag your
/distfolder into the secure upload drop zone. This guarantees a clean, public link with no password requirement. - Remedy B: Purge Inherited Auth Configuration Boilerplates: Check your repository's root folder and
/publicfolder for an inherited file named_headers. If this file contains a line definingBasic-Auth: user:password, it will force a password challenge on production builds. Delete the_headersfile, executenpm run buildagain, and re-upload your distribution assets.
-
Configure Environment Variables in Netlify Since your public GitHub repository does not contain the contract address in the source code, you must provide it to Netlify via their dashboard so it is available during the build process:
-
Go to your Netlify Dashboard and click on your project.
-
Navigate to Project configuration β‘οΈ Environment variables.
-
Click Add a variable β‘οΈ Add a single variable.
-
Set the Key as
VITE_CONTRACT_ADDRESSand paste your live contract address as the Value. -
Trigger a new deploy (if using Git) or execute
npm run buildlocally and re-drop the/distfolder.
chaincert/
βββ contracts/
β βββ ChainCert.sol # Immutable Ledger Validation Logic
βββ src/
β βββ utils/
β β βββ crypto.js # In-Browser SHA-256 State Calculation Engine
β βββ App.jsx # Main Web3 Dashboard UI Flow Matrix
β βββ abi.json # Contract Application Binary Interface
β βββ main.jsx # App Mount Entry Point
β βββ index.css # Custom Premium Production Styling Definitions
βββ package.json # Modular Dependency Architecture
βββ vite.config.js # Compilation Asset Engine Definitions
The backend implementation relies on high-efficiency mapping keys to execute reading routines in constant computational time, minimizing network resource consumption.
issueCertificate(bytes32 _certHash, string _recipientName, string _courseName, string _issuingAuthority): Restricted explicitly to the deploying administrative node (onlyOwner). Seals validation data directly to the ledger structure.verifyCertificate(bytes32 _certHash): Open read method accessible globally. Accepts a local client file calculation and securely evaluates validity, returning matching registration properties if validated.
This repository is strictly protected under a Custom Non-Commercial & Mandatory Attribution License. Commercial exploitation, unauthorized sales, or uncredited redistribution of this software or its derivative architectural elements are strictly prohibited. See the LICENSE file for exact legal specifications.