MonFund adalah platform crowdfunding berbasis blockchain yang dirancang khusus untuk mendukung program-program kampus dan inisiatif mahasiswa. Platform ini menggunakan teknologi Web3 untuk memastikan transparansi, keamanan, dan desentralisasi dalam proses penggalangan dana.
- Crowdfunding Terdesentralisasi: Menggunakan smart contract Ethereum untuk transparansi penuh
- Manajemen Program: Admin dapat membuat dan mengelola program crowdfunding
- Kontribusi Aman: Sistem kontribusi yang aman menggunakan ETH
- Penarikan Terkontrol: Dana hanya dapat ditarik setelah program berakhir
- Riwayat Transparan: Semua transaksi tercatat di blockchain
- UI Modern: Interface yang responsif dan user-friendly
- Frontend: React 18 + TypeScript + Vite
- Styling: Tailwind CSS + shadcn/ui components
- Web3: Wagmi + RainbowKit + Viem
- Blockchain: Ethereum/Foundry (Anvil untuk development)
- State Management: TanStack Query
- Routing: React Router DOM
Sebelum menjalankan project, pastikan Anda memiliki:
- Node.js (versi 18 atau lebih baru)
- npm atau bun
- MetaMask atau wallet Web3 lainnya
- Foundry (untuk menjalankan local blockchain)
git clone https://github.com/Web3-Warriors/MonFund_DApps.git
cd MonFund
npm install
# atau jika menggunakan bun
bun install
# Install Foundry jika belum ada
curl -L https://foundry.paradigm.xyz | bash
foundryup
# Jalankan Anvil (local blockchain)
anvil
Smart contract untuk project ini tersedia di: https://github.com/Web3-Warriors/SmartContract
# Clone smart contract repository terlebih dahulu
git clone https://github.com/Web3-Warriors/SmartContract.git
# Deploy contract ke local blockchain
# (Sesuaikan dengan setup smart contract dari repository)
forge create --rpc-url http://127.0.0.1:8545 --private-key <PRIVATE_KEY> src/CrowdFundingContract.sol:CrowdFundingContract
Update alamat contract di src/config/contract.ts
:
export const CROWDFUNDING_CONTRACT_ADDRESS = "0x..."; // Alamat contract yang baru di-deploy
npm run dev
# atau
bun dev
Server akan berjalan di http://localhost:8080
(atau port lain jika sudah digunakan).
Buat file .env
di root project (opsional):
VITE_CHAIN_ID=31337
VITE_RPC_URL=http://127.0.0.1:8545
File src/config/contract.ts
berisi:
- Alamat smart contract
- ABI (Application Binary Interface)
- Type definitions untuk Program dan status
- Dapat membuat program crowdfunding baru
- Mengelola program yang sudah ada (edit, hapus, update status)
- Mengawasi seluruh aktivitas platform
- Membatalkan program & melakukan refound dana donasi
- Bertanggung jawab atas program tertentu
- Dapat menarik dana setelah program berakhir
- Mengelola dan memantau progress program yang ditugaskan
- Melihat semua program yang tersedia
- Berkontribusi pada program aktif
- Melihat riwayat kontribusi mereka
βββ public/ # Static assets
β βββ favicon.ico
β βββ logo-long.png
β βββ placeholder.svg
β βββ robots.txt
βββ src/
β βββ assets/ # Image assets
β β βββ contrib-img.webp
β β βββ hero-img.webp
β β βββ program-img.webp
β βββ components/ # Reusable UI components
β β βββ animations/ # Animation components
β β β βββ AnimatedCard.tsx
β β β βββ AnimatedSection.tsx
β β β βββ HoverAnimation.tsx
β β β βββ index.ts
β β β βββ PageTransition.tsx
β β βββ ui/ # shadcn/ui components
β β β βββ button.tsx
β β β βββ card.tsx
β β β βββ input.tsx
β β β βββ FeatureCard.tsx
β β β βββ NavigationButton.tsx
β β β βββ StatusBadge.tsx
β β β βββ ... (other UI components)
β β βββ Footer.tsx # Footer component
β β βββ Header.tsx # Navigation header
β β βββ ProgramCard.tsx # Program display card
β βββ config/ # Configuration files
β β βββ contract.ts # Smart contract config
β βββ hooks/ # Custom React hooks
β β βββ use-mobile.tsx # Mobile detection hook
β β βββ use-toast.ts # Toast notifications
β β βββ useIsOwner.ts # Check if user is contract owner
β βββ lib/ # Utility functions
β β βββ utils.ts # General utilities
β βββ pages/ # Application pages
β β βββ CreateProgram.tsx # Create new program
β β βββ Index.tsx # Landing page
β β βββ MyContributions.tsx # User contributions
β β βββ NotFound.tsx # 404 page
β β βββ ProgramDetail.tsx # Program details
β β βββ Programs.tsx # Program listing
β βββ providers/ # Context providers
β β βββ Web3Provider.tsx # Web3 configuration
β βββ App.css # App-specific styles
β βββ App.tsx # Main App component
β βββ index.css # Global styles
β βββ main.tsx # App entry point
β βββ vite-env.d.ts # Vite environment types
βββ components.json # shadcn/ui configuration
βββ eslint.config.js # ESLint configuration
βββ index.html # HTML template
βββ package.json # Project dependencies
βββ postcss.config.js # PostCSS configuration
βββ tailwind.config.ts # Tailwind CSS configuration
βββ tsconfig.json # TypeScript configuration
βββ tsconfig.app.json # App-specific TypeScript config
βββ tsconfig.node.json # Node-specific TypeScript config
βββ vite.config.ts # Vite configuration
npm run build
# Build project
npm run build
# Deploy folder dist/ ke platform pilihan Anda
# Run tests (jika ada)
npm test
# Lint code
npm run lint
- Fork repository
- Buat feature branch (
git checkout -b feature/amazing-feature
) - Commit changes (
git commit -m 'Add amazing feature'
) - Push ke branch (
git push origin feature/amazing-feature
) - Buat Pull Request
Project ini menggunakan MIT License.
Jika mengalami masalah atau memiliki pertanyaan:
- Buka issue di GitHub repository
- Hubungi tim development
MonFund - Membangun masa depan kampus melalui crowdfunding yang transparan dan aman. πβ¨