Skip to content

ChinmayBhattt/CryptoCause-ICP-Web3

Repository files navigation

Cryptocause - Web3 Charity dApp on ICP

A decentralized crypto-charity donation platform built on the Internet Computer Protocol (ICP) using ckUSDT tokens for transparent, secure, and efficient charitable giving. It enables users to create and manage charity campaigns, make transparent donations using ckUSDT stablecoin, and receive unique NFT receipts as proof of their contributions, all managed securely on-chain.

Visual Overview

flowchart TD
    A0["Canister Backend
"]
    A1["Wallet & Identity Management
"]
    A2["Campaign Management System
"]
    A3["ckUSDT Token Service
"]
    A4["NFT Receipt System
"]
    A5["Frontend User Interface
"]
    A6["Deployment and Build Process
"]
    A5 -- "Authenticates users via" --> A1
    A5 -- "Interacts with" --> A0
    A0 -- "Implements logic for" --> A2
    A0 -- "Performs token operations via" --> A3
    A0 -- "Mints NFTs via" --> A4
    A5 -- "Queries balance from" --> A3
    A5 -- "Displays NFTs from" --> A4
    A6 -- "Deploys" --> A0
    A6 -- "Builds & deploys" --> A5
Loading

🌟 Features

  • πŸ’° ckUSDT Donations: Stable token donations with low fees
  • πŸ”— Blockchain Transparency: All donations recorded on-chain
  • 🎯 Campaign Management: Create and manage charity campaigns
  • πŸ† NFT Receipts: Unique NFT proof of donation
  • πŸ”’ Secure Escrow: Milestone-based fund release
  • πŸ“Š Real-time Dashboard: Track donations and impact
  • 🌐 Web3 Wallet Integration: Internet Identity, Plug, Stoic support

πŸ—οΈ Architecture

Backend (Motoko Canisters)

  • Donation Canister: Core donation logic and campaign management
  • NFT Canister: ICRC-721 compliant donation receipt NFTs
  • ckUSDT Integration: ICRC-1 token standard support

Frontend (React + TypeScript)

  • Modern UI: Tailwind CSS with responsive design
  • Wallet Integration: Multiple wallet provider support
  • Real-time Updates: Live donation tracking
  • Campaign Discovery: Browse and search campaigns

πŸš€ Quick Start

Prerequisites

Installation

  1. Clone the repository

    git clone <repository-url>
    cd charity-dapp-icp
  2. Install dependencies

    npm install
  3. Start the local Internet Computer replica

    dfx start --background
  4. Deploy canisters locally

    dfx deploy
  5. Start the frontend development server

    npm run serve
  6. Open your browser Navigate to http://localhost:3000

πŸ“ Project Structure

charity-dapp-icp/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ donation_canister/          # Main donation logic
β”‚   β”‚   └── main.mo
β”‚   β”œβ”€β”€ nft_canister/               # NFT receipt system
β”‚   β”‚   └── main.mo
β”‚   └── charity_frontend/           # React frontend
β”‚       β”œβ”€β”€ src/
β”‚       β”‚   β”œβ”€β”€ components/         # Reusable UI components
β”‚       β”‚   β”œβ”€β”€ contexts/           # React contexts
β”‚       β”‚   β”œβ”€β”€ pages/              # Page components
β”‚       β”‚   β”œβ”€β”€ services/           # API services
β”‚       β”‚   └── types/              # TypeScript types
β”‚       └── public/
β”œβ”€β”€ dfx.json                        # DFX configuration
β”œβ”€β”€ package.json                    # Node.js dependencies
└── README.md

πŸ”§ Development Commands

Command Description
npm run build Build the frontend
npm run dev Deploy and start development server
npm run serve Start frontend development server
dfx deploy --network local Deploy to local network
dfx deploy --network ic Deploy to IC mainnet

πŸ›οΈ Smart Contract Functions

Donation Canister

  • createCampaign() - Create a new charity campaign
  • donate() - Make a donation to a campaign
  • getDonations() - Get donations for a campaign
  • withdraw() - Withdraw funds (campaign owner only)
  • getTotalStats() - Get platform statistics

NFT Canister

  • mintDonationNFT() - Mint NFT receipt for donation
  • tokenMetadata() - Get NFT metadata
  • tokensOf() - Get NFTs owned by user
  • transfer() - Transfer NFT ownership

πŸ’° ckUSDT Integration

This dApp uses ckUSDT (Chain-key USDT) for donations:

  • Stability: Pegged to USD value
  • Low Fees: Minimal transaction costs on ICP
  • Fast Transactions: Near-instant settlement
  • Cross-chain: Bridged from Ethereum USDT

πŸ” Security Features

  • Identity Verification: Internet Identity integration
  • On-chain Validation: All transactions verified on blockchain
  • Escrow System: Funds held until milestones met
  • Audit Trail: Complete transaction history
  • Access Control: Role-based permissions

🎨 UI/UX Features

  • Responsive Design: Mobile-first approach
  • Dark/Light Mode: User preference support
  • Real-time Updates: Live donation tracking
  • Accessibility: WCAG 2.1 compliance
  • Performance: Optimized loading and caching

🌐 Deployment

Local Development

# Start local replica
dfx start --background

# Deploy canisters
dfx deploy

# Start frontend
npm run serve

Testnet Deployment

# Deploy to IC testnet
dfx deploy --network ic --wallet $(dfx identity get-wallet)

Mainnet Deployment

# Deploy to IC mainnet
dfx deploy --network ic --with-cycles 1000000000000

πŸ“Š Monitoring & Analytics

  • Transaction Tracking: Monitor all donations
  • Campaign Analytics: Track campaign performance
  • User Metrics: Understand user behavior
  • Financial Reporting: Generate donation reports

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ†˜ Support

πŸ™ Acknowledgments

  • Internet Computer Protocol: For the decentralized infrastructure
  • DFINITY Foundation: For the development tools and support
  • ckUSDT: For stable token infrastructure
  • React Community: For the amazing frontend framework

Built with ❀️ on the Internet Computer

About

A decentralized crypto-charity platform on ICP using ckUSDT tokens for transparent, secure donations. Users can launch and manage charity campaigns, donate with ckUSDT, and receive NFT receipts as on-chain proof of contribution.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors