# jeevann8088/trustchain-secure-and-transparent-donation-tracking-using-blockchain architecture

> Architecture diagram of the GitHub repository jeevann8088/trustchain-secure-and-transparent-donation-tracking-using-blockchain, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jeevann8088/trustchain-secure-and-transparent-donation-tracking-using-blockchain
- Repository: https://github.com/jeevann8088/trustchain-secure-and-transparent-donation-tracking-using-blockchain

## Overview

This is a blockchain charity-donation tracking application: users enter through a single-page frontend, while donation, institution, and fund-usage records are tracked by a Solidity contract. The README documents donor, admin, and public-dashboard workflows, plus MetaMask and a local Hardhat blockchain. The HTML and contract source were not sampled, so the feature components and their links reflect documented capabilities rather than inspected call sites.

Main entry points: [`charity-donation-frontend/index.html`](https://github.com/jeevann8088/trustchain-secure-and-transparent-donation-tracking-using-blockchain/blob/main/charity-donation-frontend/index.html) (Login flow), [`contracts/charityDonation.sol`](https://github.com/jeevann8088/trustchain-secure-and-transparent-donation-tracking-using-blockchain/blob/main/contracts/charityDonation.sol) (Contract records), [`charity-donation-frontend/admin.html`](https://github.com/jeevann8088/trustchain-secure-and-transparent-donation-tracking-using-blockchain/blob/main/charity-donation-frontend/admin.html) (Institution admin), [`charity-donation-frontend/contract-config.js`](https://github.com/jeevann8088/trustchain-secure-and-transparent-donation-tracking-using-blockchain/blob/main/charity-donation-frontend/contract-config.js) (Contract config)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Web interface"]
  node_login["Login flow<br/>[index.html]"]
  node_donation_screen["Donation screen<br/>[index.html]"]
  node_admin_tools["Institution admin<br/>[admin.html]"]
  node_dashboard["Transparency dashboard<br/>[index.html]"]
  node_config["Contract config<br/>[contract-config.js]"]
end

subgraph group_contract["Charity contract"]
  node_institution_registry["Institution registry"]
  node_donation_tracking["Donation tracking"]
  node_fund_reporting["Fund usage reporting"]
  node_transparency_queries["Transparency queries"]
  node_contract_state[("Contract records")]
end

subgraph group_chain["Blockchain"]
  node_hardhat_chain[("Hardhat blockchain")]
end

node_donor(("Donor"))
node_admin(("Admin"))
node_public(("Public visitor"))
node_metamask["MetaMask"]

node_donor -->|"enters"| node_login
node_login -->|"continues as"| node_donation_screen
node_donation_screen -->|"records donations"| node_donation_tracking
node_admin -->|"enters"| node_login
node_login -->|"continues as"| node_admin_tools
node_admin_tools -->|"registers and approves"| node_institution_registry
node_admin_tools -->|"reports fund usage"| node_fund_reporting
node_public -->|"opens"| node_dashboard
node_dashboard -->|"shows totals and history"| node_transparency_queries
node_dashboard -->|"shows usage reports"| node_fund_reporting
node_login -->|"connects wallet"| node_metamask
node_donation_screen -.->|"uses contract configuration"| node_config
node_admin_tools -.->|"uses contract configuration"| node_config
node_dashboard -.->|"uses contract configuration"| node_config
node_institution_registry -.->|"tracks institutions"| node_contract_state
node_donation_tracking -.->|"tracks donations"| node_contract_state
node_fund_reporting -.->|"tracks reports"| node_contract_state
node_transparency_queries -.->|"reads records"| node_contract_state
node_contract_state -.->|"stored on"| node_hardhat_chain

click node_login "https://github.com/jeevann8088/trustchain-secure-and-transparent-donation-tracking-using-blockchain/blob/main/charity-donation-frontend/index.html"
click node_donation_screen "https://github.com/jeevann8088/trustchain-secure-and-transparent-donation-tracking-using-blockchain/blob/main/charity-donation-frontend/index.html"
click node_admin_tools "https://github.com/jeevann8088/trustchain-secure-and-transparent-donation-tracking-using-blockchain/blob/main/charity-donation-frontend/admin.html"
click node_dashboard "https://github.com/jeevann8088/trustchain-secure-and-transparent-donation-tracking-using-blockchain/blob/main/charity-donation-frontend/index.html"
click node_config "https://github.com/jeevann8088/trustchain-secure-and-transparent-donation-tracking-using-blockchain/blob/main/charity-donation-frontend/contract-config.js"
click node_institution_registry "https://github.com/jeevann8088/trustchain-secure-and-transparent-donation-tracking-using-blockchain/blob/main/contracts/charityDonation.sol"
click node_donation_tracking "https://github.com/jeevann8088/trustchain-secure-and-transparent-donation-tracking-using-blockchain/blob/main/contracts/charityDonation.sol"
click node_fund_reporting "https://github.com/jeevann8088/trustchain-secure-and-transparent-donation-tracking-using-blockchain/blob/main/contracts/charityDonation.sol"
click node_transparency_queries "https://github.com/jeevann8088/trustchain-secure-and-transparent-donation-tracking-using-blockchain/blob/main/contracts/charityDonation.sol"
click node_contract_state "https://github.com/jeevann8088/trustchain-secure-and-transparent-donation-tracking-using-blockchain/blob/main/contracts/charityDonation.sol"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_login,node_donation_screen,node_admin_tools,node_dashboard,node_config toneBlue
class node_institution_registry,node_donation_tracking,node_fund_reporting,node_transparency_queries,node_contract_state toneAmber
class node_hardhat_chain toneMint
class node_donor,node_admin,node_public,node_metamask toneIndigo
```

## Components

### Web interface

- [Login flow](https://github.com/jeevann8088/trustchain-secure-and-transparent-donation-tracking-using-blockchain/blob/main/charity-donation-frontend/index.html): `charity-donation-frontend/index.html`
- [Donation screen](https://github.com/jeevann8088/trustchain-secure-and-transparent-donation-tracking-using-blockchain/blob/main/charity-donation-frontend/index.html): `charity-donation-frontend/index.html`
- [Institution admin](https://github.com/jeevann8088/trustchain-secure-and-transparent-donation-tracking-using-blockchain/blob/main/charity-donation-frontend/admin.html): `charity-donation-frontend/admin.html`
- [Transparency dashboard](https://github.com/jeevann8088/trustchain-secure-and-transparent-donation-tracking-using-blockchain/blob/main/charity-donation-frontend/index.html): `charity-donation-frontend/index.html`
- [Contract config](https://github.com/jeevann8088/trustchain-secure-and-transparent-donation-tracking-using-blockchain/blob/main/charity-donation-frontend/contract-config.js): `charity-donation-frontend/contract-config.js`

### Charity contract

- [Institution registry](https://github.com/jeevann8088/trustchain-secure-and-transparent-donation-tracking-using-blockchain/blob/main/contracts/charityDonation.sol): `contracts/charityDonation.sol`
- [Donation tracking](https://github.com/jeevann8088/trustchain-secure-and-transparent-donation-tracking-using-blockchain/blob/main/contracts/charityDonation.sol): `contracts/charityDonation.sol`
- [Fund usage reporting](https://github.com/jeevann8088/trustchain-secure-and-transparent-donation-tracking-using-blockchain/blob/main/contracts/charityDonation.sol): `contracts/charityDonation.sol`
- [Transparency queries](https://github.com/jeevann8088/trustchain-secure-and-transparent-donation-tracking-using-blockchain/blob/main/contracts/charityDonation.sol): `contracts/charityDonation.sol`
- [Contract records](https://github.com/jeevann8088/trustchain-secure-and-transparent-donation-tracking-using-blockchain/blob/main/contracts/charityDonation.sol): `contracts/charityDonation.sol`

### Blockchain

- **Hardhat blockchain**

### Other components

- **Donor**
- **Admin**
- **Public visitor**
- **MetaMask**

## Connections

- Donor → Login flow: enters (evidence: `README.md`)
- Login flow → Donation screen: continues as (evidence: `README.md`)
- Donation screen → Donation tracking: records donations (evidence: `README.md`)
- Admin → Login flow: enters (evidence: `README.md`)
- Login flow → Institution admin: continues as (evidence: `README.md`)
- Institution admin → Institution registry: registers and approves (evidence: `README.md`)
- Institution admin → Fund usage reporting: reports fund usage (evidence: `README.md`)
- Public visitor → Transparency dashboard: opens (evidence: `README.md`)
- Transparency dashboard → Transparency queries: shows totals and history (evidence: `README.md`)
- Transparency dashboard → Fund usage reporting: shows usage reports (evidence: `README.md`)
- Login flow → MetaMask: connects wallet (evidence: `README.md`)
- Donation screen → Contract config: uses contract configuration
- Institution admin → Contract config: uses contract configuration
- Transparency dashboard → Contract config: uses contract configuration
- Institution registry → Contract records: tracks institutions
- Donation tracking → Contract records: tracks donations
- Fund usage reporting → Contract records: tracks reports
- Transparency queries → Contract records: reads records
- Contract records → Hardhat blockchain: stored on
