How adrianhajdin/project_crowdfunding works
Project Type and Purpose
• The project is a decentralized crowdfunding platform built on Web3, where users can create and fund campaigns through blockchain-based smart contracts.
• The README highlights this as the first blockchain application experience focused on building and deploying a Web3 crowdfunding platform.
File Structure
• The project is split into two key parts:
• The “client” directory: Contains a React-based frontend application (code, pages, components, context, utilities, and configuration files like Vite and Tailwind).
• The “web3” directory: Contains blockchain-related code such as smart contract files (within “contracts”), a Hardhat configuration file (for managing and testing smart contracts), and its package configuration.
• This separation clearly indicates an architecture with a dedicated front-end application and a blockchain/smart contract backend (using Hardhat for deployment and testing).
Main Components
a. Frontend (Client Application):
• React components (pages and reusable UI components like Navbar, FormField, FundCard, etc.).
• Context and utilities used to manage state and interactions.
• Use of tools like Vite for development and Tailwind CSS for styling.
• Routing and page structure (Home, Profile, CreateCampaign, CampaignDetails).
b. Blockchain/Smart Contracts (Web3):
• Smart contracts developed within the “web3/contracts” directory.
• Interactions where the client sends transactions and calls smart contract functions.
c. Interaction and Connectivity:
• Optionally, note any external dependencies such as wallets (e.g., MetaMask) and blockchain networks (e.g., Ethereum).
Architectural Patterns and Design Principles
• Separation of concerns: A clear division between the decentralized backend (smart contracts) and the rich client-side UI.
• Modular design: The frontend is broken down into pages, components, constants, context, and utilities, simplifying maintenance and extensibility.
• Integration through standard Web3 patterns: The client interacts with smart contracts via Web3 providers, ensuring secure transactional flows.
Elements
• From the Frontend (React) to the Blockchain (via web3 calls)
• From UI events (clicks, form submissions) triggering contract interactions.
• Another for smart contract elements (e.g., circles or hexagons representing blockchain nodes or contracts)