How percobain/pkmb works
Project type and purpose
• This is a full-stack Web3 dApp consisting of:
• A Solidity/Hardhat “contracts” backend for on-chain logic (ERC-20 token, ERC-721 NFT, and faucet contracts)
• A React/TypeScript “frontend” SPA served via Vite, integrating with MetaMask and IPFS
• Purpose: Let users claim PKMB tokens, mint NFTs with those tokens, and share NFTs on social media.
File structure
• Top-level:
• README.md, demo video
• contracts/ – Hardhat project (contracts/, scripts/, tests/, ignition/)
• frontend/ – React app (public assets, src folder with ABIs, UI components, pages, hooks, utilities, router)
• Patterns & config:
• SPA with client-side routing (frontend/src/router/routes.tsx)
• Standard React component hierarchy under src/components and src/pages
• Hardhat config for compiling, testing, and deploying contracts (hardhat.config.js)
• Deployment script (contracts/scripts/deploy.js)
• IPFS upload utilities for NFT metadata (frontend/src/utils/uploadToIpfs.ts)
• Environment config files (.env.development, .env.production)
Extract insights from the README
• Architecture described as two modules: Smart Contracts and Frontend
• Tech stack: React, TypeScript, Vite, TailwindCSS, ShadCn UI, Ethers.js, MetaMask, Solidity, Hardhat, IPFS
• Supported features: token faucet, NFT minting, social sharing integrations