Skip to content

JainamOswal18/open-charity

Repository files navigation

Open Charity: A Decentralized Charity Donation Platform

image.png

Table of Contents

  1. Project Overview
  2. Features
  3. Technologies Used
  4. Getting Started
  5. Deployment
  6. Usage
  7. Smart Contract Overview
  8. Testing on Remix IDE
  9. Roadmap
  10. Contributing
  11. License
  12. Acknowledgements

Project Overview

Open Charity is a decentralized application (dApp) that brings transparency and trust to charitable donations by leveraging blockchain technology on the AIAchain network. Users can donate to verified charities using cryptocurrency, with real-time tracking and transparent transaction records. Built with Next.js and deployed on AIAchain, Open Charity aims to empower users to make a positive impact while ensuring full accountability.

Features

  1. Decentralized Donations: Donate directly to charities without intermediaries, ensuring the entire amount reaches the cause.
  2. Real-Time Transparency: Track donations instantly with dynamic updates and view all donation history.
  3. NFT and Crypto Donations: Supports both cryptocurrency and NFT-based donations (in development).
  4. Secure and Verified Charities: Only verified charities can register, ensuring legitimacy.
  5. Low Fees and Fast Transactions: AIAchain enables cost-efficient and quick transactions, ideal for real-time donations.

Technologies Used

  • Frontend: Next.js (React framework) for a dynamic and interactive UI.
  • Smart Contract: Solidity smart contracts for secure, on-chain charity verification and donations.
  • Blockchain: AIAchain for high-speed, low-cost transactions with EVM compatibility.
  • Wallet Integration: MetaMask or any EVM-compatible wallet for secure user connections and transactions.

Getting Started

Prerequisites

Ensure you have the following installed:

Installation

Clone the repository and install dependencies:

git clone https://github.com/JainamOswal18/open-charity.git
cd open-charity
npm install

Development Setup

To start the development server:

npm run dev

Open http://localhost:3000 to view the application in the browser.

Deployment

To deploy the project, we recommend using Vercel, as Next.js works seamlessly with it:

  1. Push your code to a GitHub repository.
  2. Import the repository into Vercel and configure the necessary environment variables.
  3. Deploy the application with a single click.

For detailed steps, refer to Next.js Deployment Documentation.

Usage

Connecting a Wallet

  1. Ensure you’re on the AIAchain network in MetaMask or any other EVM-compatible wallet.
  2. Click Connect Wallet on the homepage to initiate connection.

Making a Donation

  1. Explore the list of charities and their active campaigns.
  2. Select a charity, enter the donation amount, and (optionally) a message.
  3. Confirm the transaction in MetaMask, and view the live transaction status in the app.

Viewing Donation History

  • Access the dashboard to view a record of past donations, including transaction details, timestamps, and donation amounts.

Smart Contract Overview

The core functionality is handled by the CharityDonation smart contract, which is deployed on the AIAchain network. The contract provides:

  • registerCharity : Allows only the contract owner to register verified charities.
  • donate : Enables users to donate funds directly to a charity.
  • getTotalDonations : Fetches the total donations for a specific charity.
  • checkRegisteredCharity : Verifies if an address is registered as a charity.

The contract ensures that funds are stored securely, and only authorized withdrawals can be processed.

Testing on Remix IDE

For smart contract testing and deployment:

  1. Copy the smart contract code to Remix IDE.
  2. Compile the contract using the correct Solidity version (e.g., 0.8.x) and evm version as london (inside advanced config).
  3. Deploy on the AIAchain network by connecting Remix to MetaMask.
  4. After deployment, note the contract address and update your frontend with this address.

Roadmap

  1. NFT Donations: Expand the donation model to include NFT-based donations.
  2. Dynamic Charity Registration: Implement a system for community-backed verification of new charities.
  3. Cross-Chain Compatibility: Integrate with other EVM-compatible chains for greater reach.

Contributing

We welcome contributions! Please fork the repository, create a feature branch, and submit a pull request with your changes.

  1. Fork the repository
  2. Clone the repository (git clone https://github.com/JainamOswal18/open-charity.git)
  3. Test and develop some new features/fix bugs.
  4. Commit your changes (git commit -m "Add new feature")
  5. Open a pull request

License

This project is licensed under the MIT License.

Acknowledgements

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •