Charity-Donation-BLOCKCHAIN-System

ChariBlock - Decentralized Blockchain Charity Platform

![License](https://img.shields.io/badge/license-MIT-blue.svg) ![Next.js](https://img.shields.io/badge/Next.js-14-black) ![Django](https://img.shields.io/badge/Django-4.2-green) ![Ethereum](https://img.shields.io/badge/Ethereum-Smart%20Contracts-purple) ![Web3](https://img.shields.io/badge/Web3-Enabled-orange) **A transparent, secure, and decentralized charity donation platform powered by blockchain technology** [Features](#-features) • [Demo](#-demo) • [Quick Start](#-quick-start) • [Documentation](#-documentation) • [Contributing](#-contributing)

Overview

ChariBlock is a blockchain-based charity platform that brings transparency, security, and trust to charitable donations. Built on Ethereum, ChariBlock ensures every donation is tracked on-chain, providing donors with complete visibility and accountability.

https://github.com/user-attachments/assets/2d368234-93d5-402b-9b3e-18068012d747

Features

For Donors

For Charity Organizations

For Platform Admins


Demo

MetaMask Wallet Connection

Metamask login

On-Chain Charity Creation

On-chain charity

Admin Verification Dashboard

Verifyonchain

Donation Interface

Donate

Blockchain Transaction Hash

Donationhash


Tech Stack

Frontend

Backend

Blockchain


Quick Start

Prerequisites

Before you begin, ensure you have the following installed:

1. Clone the Repository

git clone https://github.com/kushal2060/Charity-Donation-BLOCKCHAIN-System

2. Frontend Setup (Next.js)

# Install dependencies
npm install

# Create environment file
cp .env.example .env.local

# Configure environment variables in .env.local
# NEXT_PUBLIC_BACKEND_API=http://localhost:8000/api
# NEXT_PUBLIC_CONTRACT_ADDRESS=your_deployed_contract_address
# NEXT_PUBLIC_CHAIN_ID=11155111 # Sepolia testnet

# Run development server
npm run dev

Visit http://localhost:3000 to see the application.

3. Backend Setup (Django)

cd backend

# Create virtual environment
python -m venv venv

# Activate virtual environment
# On macOS/Linux:
source venv/bin/activate
# On Windows:
# venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

# Setup database
python manage.py migrate

# Create superuser for admin access
python manage.py createsuperuser

# Run development server
python manage.py runserver

The API will be available at http://localhost:8000

4. Smart Contract Setup (Hardhat)

cd contracts

# Install dependencies
npm install

# Create environment file
cp .env.example .env

# Configure .env with your settings:
# PRIVATE_KEY=your_wallet_private_key
# SEPOLIA_RPC_URL=your_alchemy_or_infura_url
# ETHERSCAN_API_KEY=your_etherscan_api_key

# Compile contracts
npx hardhat compile

# Run tests
npm run test

# Deploy to local network
npx hardhat node  # In separate terminal
npm run deploy:local

# Deploy to Sepolia testnet
npm run deploy:sepolia

Security Features


Environment Variables

Frontend (.env.local)

NEXT_PUBLIC_BACKEND_API=http://localhost:8000/api
NEXT_PUBLIC_CONTRACT_ADDRESS=0x...
NEXT_PUBLIC_CHAIN_ID=11155111

Backend (.env)

SECRET_KEY=your-secret-key
DEBUG=True
ALLOWED_HOSTS=localhost,127.0.0.1
CORS_ALLOWED_ORIGINS=http://localhost:3000
PINATA_API_KEY=your-pinata-api-key
PINATA_SECRET_KEY=your-pinata-secret

Contracts (.env)

PRIVATE_KEY=your-wallet-private-key
SEPOLIA_RPC_URL=https://eth-sepolia.g.alchemy.com/v2/YOUR-API-KEY
ETHERSCAN_API_KEY=your-etherscan-api-key

Contributing

We welcome contributions! Please follow these steps:

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

License

This project is licensed under the MIT License - see the LICENSE file for details.


Show Your Support

If you find this project useful, please consider giving it a star on GitHub! It helps others discover the project and motivates us to continue improving it.


Keywords

blockchain charity, decentralized donations, ethereum charity platform, web3 donations, smart contract charity, transparent donations, cryptocurrency charity, DApp charity, blockchain fundraising, ethereum donations, web3 charity, metamask donations, crypto philanthropy, decentralized fundraising, blockchain transparency, on-chain charity, IPFS storage, KYC verification, nonprofit blockchain, charity DApp