This project is a transparent charity application built using blockchain technology. The goal is to provide a secure and transparent platform for donations, ensuring that funds reach their intended recipients without any misappropriation.
- Introduction
- Features
- Technologies Used
- Prerequisites
- Installation
- Usage
- Project Structure
- Contributing
- License
- Contact
The Transparent Charity Application leverages blockchain technology to provide a secure and transparent method for handling donations. By using blockchain, every transaction is recorded in a public ledger, ensuring that all donations are traceable and tamper-proof. This enhances trust and accountability in the charitable sector.
- Secure Transactions: All donations are processed through blockchain, ensuring security and transparency.
- Traceability: Donors can track their donations and see exactly how their funds are being used.
- Smart Contracts: Automated smart contracts manage the distribution of funds, ensuring they are used as intended.
- User Authentication: Secure login and registration for donors and charity organizations.
- Dashboard: A user-friendly dashboard for donors to view their donation history and for charities to manage their received funds.
- Frontend: React, HTML, Tailwind CSS
- Backend: Node.js, Express.js
- Blockchain: Ethereum, Solidity
- Database: MongoDB
- Smart Contracts: Solidity
- Node.js and npm installed
- MongoDB installed and running
- Ethereum Wallet (e.g., MetaMask) for handling transactions
-
Clone the repository:
git clone https://github.com/yourusername/transparent-charity.git cd transparent-charity/backend
-
Install backend dependencies:
npm install
-
Create a
.env
file in the backend directory and add your MongoDB connection string and other environment variables:MONGODB_URI=mongodb://localhost:27017/charity JWT_SECRET=your_jwt_secret
-
Start the backend server:
npm start
-
Navigate to the
frontend
directory:cd ../frontend
-
Install frontend dependencies:
npm install
-
Start the frontend development server:
npm start
-
Navigate to the
contracts
directory:cd ../contracts
-
Install Truffle and Ganache CLI globally if not already installed:
npm install -g truffle ganache-cli
-
Compile the smart contracts:
truffle compile
-
Migrate the smart contracts to the blockchain:
truffle migrate
- Open the frontend in your web browser.
- Register or log in as a donor or charity organization.
- Donors can make donations using their Ethereum wallet.
- Track donations and view fund usage through the dashboard.
├── backend/
│ ├── controllers/ # Controllers for handling requests
│ ├── models/ # Mongoose models
│ ├── routes/ # Express routes
│ ├── middleware/ # Custom middleware
│ ├── utils/ # Utility functions
│ ├── .env # Environment variables
│ ├── server.js # Main server file
├── frontend/
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── pages/ # React pages
│ │ ├── services/ # Services for API calls
│ │ ├── App.js # Main App component
│ │ ├── index.js # Entry point
│ ├── public/ # Public assets
│ ├── tailwind.config.js # Tailwind CSS configuration
│ ├── package.json # Frontend dependencies
├── contracts/
│ ├── migrations/ # Migration scripts
│ ├── contracts/ # Solidity smart contracts
│ ├── test/ # Smart contract tests
│ ├── truffle-config.js # Truffle configuration
├── README.md # Project documentation
Contributing
Contributions are welcome! Please fork the repository and use a feature branch. Pull requests are warmly welcomed.
Fork the repository.
Create your feature branch (git checkout -b feature/AmazingFeature).
Commit your changes (git commit -m 'Add some AmazingFeature').
Push to the branch (git push origin feature/AmazingFeature).
Open a Pull Request.