How bfer0523/dapp-subasta works
Project type and purpose
• This is a decentralized web application (a React-based front‐end “dApp”) that uses Hardhat to compile/deploy Ethereum smart contracts.
• The “contracts” and “scripts/deploy.js” folders suggest the business logic lives on-chain (Solidity), while the React app in “src/” provides the user interface.
File structure
• Top‐level directories:
• contracts/ – Solidity contracts (likely Auction.sol or similar)
• scripts/ – Hardhat deploy scripts
• public/ – static HTML + manifest for CRA
• src/ – React application code, styles, tests
• src/utils/ – JSON ABI, constants (network addresses, chain IDs)
• Config files:
• hardhat.config.js – blockchain network, compiler settings
• tailwind.config.js – styling framework
• package.json – dependencies: React, Web3/ethers, Hardhat, Tailwind
README for additional insights
a. Main components
• React front‐end (src/)
• Smart contract layer (contracts/) deployed via Hardhat (scripts/)
• Ethereum network (could be local Hardhat node or test/mainnet)
• Wallet/Provider (e.g. MetaMask)
• Optional backend service or IPFS (if used for off‐chain storage) – none present here
b. Relationships and interactions
• User interacts with React UI → React calls Web3/ethers provider
• Provider routes transactions/queries to Ethereum network
• Smart contract instance lives on chain and responds to calls, emits events
• Deployment script (scripts/deploy.js) → Hardhat → Ethereum network
• ABIs in src/utils enable React to instantiate contract objects
c. Architectural patterns and design principles
• Separation of concerns: on‐chain logic (contracts) vs. off‐chain UI (React)
• Single‐page application served from public/index.html
• Infrastructure as code: Hardhat config + deploy scripts
• Tailwind CSS for utility‐first styling
d. Key technologies/frameworks
• React (CRA)
• Hardhat (Solidity compiler, local node, tasks)
• Ethers.js or Web3.js (implied by ABI usage)
• Tailwind CSS