Hexagon is a decentralized product-authentication platform built for the Hedera Africa Hackathon.
Manufacturers mint tamper-proof batches on the Hedera network, while distributors and customers verify any individual item by scanning a generated QR code. The goal is to curb counterfeit pharmaceuticals across the continent by pairing an intuitive web experience with verifiable, on-chain provenance.
contract/— Hardhat project containing theHexagon.solsmart contract (Solidity 0.8.28) plus deployment utilities written in TypeScript. The contract is designed for the Hedera EVM network and encodes manufacturer onboarding, product lifecycle management, and single-use verification codes.frontend/— Next.js 14 (App Router) application that wraps RainbowKit, Wagmi, and Chakra UI to deliver the manufacturer dashboard, verification tools, and analytics screens.utils/— Environment configuration shared by the frontend (e.g., Hedera RPC gateway, smart-contract address).
- Hedera Hashgraph testnet via HashIO RPC
- Solidity 0.8.28, Hardhat 3, ethers.js v6
- TypeScript across smart-contract tooling and the web dApp
- Next.js 14, React 18, Chakra UI, RainbowKit, Wagmi, Viem
- Pinata IPFS gateway for storing product metadata blobs
- Node.js 18 or newer and npm 9+
- Git
- A Hedera testnet account with an EVM private key (exported as a hex string)
git clone https://github.com/Hexdee/Hexagon.git
cd Hexagoncd contract
npm installCreate a .env file in contract/:
PRIVATE_KEY=0xYourHederaEvmPrivateKey
# Optional overrides if you prefer custom RPC or a different deployer
# SEPOLIA_RPC_URL=
# SEPOLIA_PRIVATE_KEY=Then compile, test, and deploy:
npx hardhat compile
npx hardhat test
npx hardhat run scripts/deploy.ts --network hederaTestnetWhen the deployment completes, note the printed contract address and copy it into the frontend environment.
cd ../frontend
npm install
cp .env.example .envEdit .env with the addresses that match your deployment:
NEXT_PUBLIC_HEXAGON_ADDRESS=0xDeployedContractAddress
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=yourWalletConnectProjectId
NEXT_PUBLIC_GATEWAY_URL=ipfs.io
PINATA_JWT=OptionalServerSideTokenStart the development server:
npm run devVisit http://localhost:3000 to interact with the dashboard, onboard manufacturers, and verify codes.
- Manufacturer onboarding — Approved partners register on-chain and receive a dedicated workspace in the frontend.
- Product creation — Each product record stores metadata, a reference to the Pinata-hosted description, and total production volume.
- Code generation — The dashboard issues short-lived QR/alpha-numeric codes; their hashed counterparts are registered on-chain for future validation.
- Customer verification — Scanning, or manually entering, a code triggers an on-chain authenticity check and permanently marks the item as sold to prevent reuse.
Pull requests are welcome. Please fork the repo, create a feature branch, ensure npm run lint / npx hardhat test pass, and open a PR describing your change. For major features, open an issue first to discuss the approach.