# yashwanthkumar-68/impactvault architecture

> Architecture diagram of the GitHub repository yashwanthkumar-68/impactvault, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/yashwanthkumar-68/impactvault
- Repository: https://github.com/yashwanthkumar-68/impactvault

## Overview

ImpactVault is a decentralized giving and impact-verification application. Donors browse campaigns and submit MON contributions through a wallet; creators publish campaigns and impact updates; community members or auditors review evidence and attestations. The frontend coordinates these actions with the Monad contract and stores evidence off-chain while anchoring hashes on-chain. The README documents the broader product flow; source-level connections below are limited to relationships visible in the supplied excerpts or SOURCE INDEX, so the indexer and several unsampled pages are shown without speculative links.

Main entry points: [`web/src/lib/impactContext.tsx`](https://github.com/yashwanthkumar-68/impactvault/blob/main/web/src/lib/impactContext.tsx) (Wallet and transaction context), [`contracts`](https://github.com/yashwanthkumar-68/impactvault/tree/main/contracts) (ImpactVault contract), [`web/src/components/AttestationModal.tsx`](https://github.com/yashwanthkumar-68/impactvault/blob/main/web/src/components/AttestationModal.tsx) (Evidence attestation), [`web/src/lib/ipfs.ts`](https://github.com/yashwanthkumar-68/impactvault/blob/main/web/src/lib/ipfs.ts) (Evidence hashing and IPFS)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_campaigns["Campaigns"]
  node_campaign_browse["Campaign discovery<br/>[page.tsx]"]
  node_campaign_detail["Campaign details<br/>[page.tsx]"]
  node_create_campaign["Campaign creation<br/>[page.tsx]"]
  node_campaign_card["Campaign card<br/>[CampaignCard.tsx]"]
  node_progress["Dual progress"]
end

subgraph group_giving["Giving and management"]
  node_donation["Donation modal<br/>[DonateModal.tsx]"]
  node_creator_portal["Creator dashboard<br/>[page.tsx]"]
  node_creator_campaign["Campaign management<br/>[page.tsx]"]
  node_impact_update["Impact update submission<br/>[page.tsx]"]
  node_donor_dashboard["Donor credentials<br/>[page.tsx]"]
end

subgraph group_verification["Evidence and verification"]
  node_evidence["Evidence viewer<br/>[EvidenceViewer.tsx]"]
  node_ai_analysis["AI evidence analysis"]
  node_attestation["Evidence attestation"]
  node_ipfs["Evidence hashing and IPFS<br/>[ipfs.ts]"]
end

subgraph group_platform["Chain and data"]
  node_campaign_data["Campaign data<br/>[sampleData.ts]"]
  node_impact_context["Wallet and transaction context<br/>[impactContext.tsx]"]
  node_contract_abi["Contract interface<br/>[contracts.ts]"]
  node_chain_config["Monad network configuration<br/>[monadChain.ts]"]
  node_vault_contract{{"ImpactVault contract"}}
  node_indexer_handlers["Event handlers<br/>[EventHandlers.ts]"]
  node_indexer_schema["Impact data schema<br/>[schema.graphql]"]
end

node_donor(("Donor"))
node_creator(("Campaign creator"))
node_auditor(("Community or auditor"))
node_monad{{"Monad Testnet"}}
node_ipfs_service[("IPFS gateway")]
node_wallet(("MetaMask wallet"))

node_donor -->|"browses"| node_campaign_browse
node_campaign_browse -->|"opens campaign"| node_campaign_detail
node_donor -->|"contributes"| node_donation
node_donation -->|"submits donation"| node_impact_context
node_impact_context -->|"calls contract"| node_vault_contract
node_impact_context -->|"requests transactions"| node_wallet
node_vault_contract -->|"executes on"| node_monad
node_creator -->|"creates campaign"| node_create_campaign
node_create_campaign -->|"submits campaign"| node_impact_context
node_creator -->|"reports impact"| node_impact_update
node_impact_update -->|"prepares evidence"| node_ipfs
node_impact_context -->|"generates CID"| node_ipfs
node_impact_context -->|"uses interface"| node_contract_abi
node_impact_context -->|"requests network switch"| node_chain_config
node_ipfs -->|"resolves media"| node_ipfs_service
node_evidence -->|"renders analysis"| node_ai_analysis
node_evidence -->|"opens attestation"| node_attestation
node_auditor -->|"attests evidence"| node_attestation
node_attestation -->|"submits attestation"| node_impact_context
node_impact_context -->|"submits update and attestations"| node_vault_contract
node_vault_contract -->|"anchors fingerprints"| node_monad
node_campaign_card -->|"renders progress"| node_progress

click node_campaign_browse "https://github.com/yashwanthkumar-68/impactvault/blob/main/web/src/app/campaigns/page.tsx"
click node_campaign_detail "https://github.com/yashwanthkumar-68/impactvault/blob/main/web/src/app/campaign/%5Bid%5D/page.tsx"
click node_create_campaign "https://github.com/yashwanthkumar-68/impactvault/blob/main/web/src/app/create/page.tsx"
click node_campaign_card "https://github.com/yashwanthkumar-68/impactvault/blob/main/web/src/components/CampaignCard.tsx"
click node_campaign_data "https://github.com/yashwanthkumar-68/impactvault/blob/main/web/src/lib/sampleData.ts"
click node_donation "https://github.com/yashwanthkumar-68/impactvault/blob/main/web/src/components/DonateModal.tsx"
click node_creator_portal "https://github.com/yashwanthkumar-68/impactvault/blob/main/web/src/app/creator/page.tsx"
click node_creator_campaign "https://github.com/yashwanthkumar-68/impactvault/blob/main/web/src/app/creator/campaign/%5Bid%5D/page.tsx"
click node_impact_update "https://github.com/yashwanthkumar-68/impactvault/blob/main/web/src/app/creator/campaign/%5Bid%5D/update/page.tsx"
click node_donor_dashboard "https://github.com/yashwanthkumar-68/impactvault/blob/main/web/src/app/dashboard/page.tsx"
click node_progress "https://github.com/yashwanthkumar-68/impactvault/blob/main/web/src/components/DualProgressBar.tsx"
click node_evidence "https://github.com/yashwanthkumar-68/impactvault/blob/main/web/src/components/EvidenceViewer.tsx"
click node_ai_analysis "https://github.com/yashwanthkumar-68/impactvault/blob/main/web/src/components/AIEvidenceAnalyzer.tsx"
click node_attestation "https://github.com/yashwanthkumar-68/impactvault/blob/main/web/src/components/AttestationModal.tsx"
click node_ipfs "https://github.com/yashwanthkumar-68/impactvault/blob/main/web/src/lib/ipfs.ts"
click node_impact_context "https://github.com/yashwanthkumar-68/impactvault/blob/main/web/src/lib/impactContext.tsx"
click node_contract_abi "https://github.com/yashwanthkumar-68/impactvault/blob/main/web/src/lib/contracts.ts"
click node_chain_config "https://github.com/yashwanthkumar-68/impactvault/blob/main/web/src/lib/monadChain.ts"
click node_vault_contract "https://github.com/yashwanthkumar-68/impactvault/tree/main/contracts"
click node_indexer_handlers "https://github.com/yashwanthkumar-68/impactvault/blob/main/indexer/src/EventHandlers.ts"
click node_indexer_schema "https://github.com/yashwanthkumar-68/impactvault/blob/main/indexer/schema.graphql"

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_campaign_browse,node_campaign_detail,node_create_campaign,node_campaign_card,node_progress toneBlue
class node_donation,node_creator_portal,node_creator_campaign,node_impact_update,node_donor_dashboard,node_ipfs_service toneAmber
class node_evidence,node_ai_analysis,node_attestation,node_ipfs toneMint
class node_campaign_data,node_impact_context,node_contract_abi,node_chain_config,node_vault_contract,node_indexer_handlers,node_indexer_schema toneRose
class node_donor,node_creator,node_auditor,node_monad,node_wallet toneIndigo
```

## Components

### Campaigns

- [Campaign discovery](https://github.com/yashwanthkumar-68/impactvault/blob/main/web/src/app/campaigns/page.tsx): `web/src/app/campaigns/page.tsx`
- [Campaign details](https://github.com/yashwanthkumar-68/impactvault/blob/main/web/src/app/campaign/%5Bid%5D/page.tsx): `web/src/app/campaign/[id]/page.tsx`
- [Campaign creation](https://github.com/yashwanthkumar-68/impactvault/blob/main/web/src/app/create/page.tsx): `web/src/app/create/page.tsx`
- [Campaign card](https://github.com/yashwanthkumar-68/impactvault/blob/main/web/src/components/CampaignCard.tsx): `web/src/components/CampaignCard.tsx`
- [Dual progress](https://github.com/yashwanthkumar-68/impactvault/blob/main/web/src/components/DualProgressBar.tsx): `web/src/components/DualProgressBar.tsx`

### Giving and management

- [Donation modal](https://github.com/yashwanthkumar-68/impactvault/blob/main/web/src/components/DonateModal.tsx): `web/src/components/DonateModal.tsx`
- [Creator dashboard](https://github.com/yashwanthkumar-68/impactvault/blob/main/web/src/app/creator/page.tsx): `web/src/app/creator/page.tsx`
- [Campaign management](https://github.com/yashwanthkumar-68/impactvault/blob/main/web/src/app/creator/campaign/%5Bid%5D/page.tsx): `web/src/app/creator/campaign/[id]/page.tsx`
- [Impact update submission](https://github.com/yashwanthkumar-68/impactvault/blob/main/web/src/app/creator/campaign/%5Bid%5D/update/page.tsx): `web/src/app/creator/campaign/[id]/update/page.tsx`
- [Donor credentials](https://github.com/yashwanthkumar-68/impactvault/blob/main/web/src/app/dashboard/page.tsx): `web/src/app/dashboard/page.tsx`

### Evidence and verification

- [Evidence viewer](https://github.com/yashwanthkumar-68/impactvault/blob/main/web/src/components/EvidenceViewer.tsx): `web/src/components/EvidenceViewer.tsx`
- [AI evidence analysis](https://github.com/yashwanthkumar-68/impactvault/blob/main/web/src/components/AIEvidenceAnalyzer.tsx): `web/src/components/AIEvidenceAnalyzer.tsx`
- [Evidence attestation](https://github.com/yashwanthkumar-68/impactvault/blob/main/web/src/components/AttestationModal.tsx): `web/src/components/AttestationModal.tsx`
- [Evidence hashing and IPFS](https://github.com/yashwanthkumar-68/impactvault/blob/main/web/src/lib/ipfs.ts): `web/src/lib/ipfs.ts`

### Chain and data

- [Campaign data](https://github.com/yashwanthkumar-68/impactvault/blob/main/web/src/lib/sampleData.ts): `web/src/lib/sampleData.ts`
- [Wallet and transaction context](https://github.com/yashwanthkumar-68/impactvault/blob/main/web/src/lib/impactContext.tsx): `web/src/lib/impactContext.tsx`
- [Contract interface](https://github.com/yashwanthkumar-68/impactvault/blob/main/web/src/lib/contracts.ts): `web/src/lib/contracts.ts`
- [Monad network configuration](https://github.com/yashwanthkumar-68/impactvault/blob/main/web/src/lib/monadChain.ts): `web/src/lib/monadChain.ts`
- [ImpactVault contract](https://github.com/yashwanthkumar-68/impactvault/tree/main/contracts): `contracts`
- [Event handlers](https://github.com/yashwanthkumar-68/impactvault/blob/main/indexer/src/EventHandlers.ts): `indexer/src/EventHandlers.ts`
- [Impact data schema](https://github.com/yashwanthkumar-68/impactvault/blob/main/indexer/schema.graphql): `indexer/schema.graphql`

### Other components

- **Donor**
- **Campaign creator**
- **Community or auditor**
- **Monad Testnet**
- **IPFS gateway**
- **MetaMask wallet**

## Connections

- Donor → Campaign discovery: browses
- Campaign discovery → Campaign details: opens campaign
- Donor → Donation modal: contributes
- Donation modal → Wallet and transaction context: submits donation (evidence: `web/src/components/DonateModal.tsx`)
- Wallet and transaction context → ImpactVault contract: calls contract (evidence: `web/src/lib/impactContext.tsx`)
- Wallet and transaction context → MetaMask wallet: requests transactions
- ImpactVault contract → Monad Testnet: executes on
- Campaign creator → Campaign creation: creates campaign
- Campaign creation → Wallet and transaction context: submits campaign (evidence: `web/src/lib/impactContext.tsx`)
- Campaign creator → Impact update submission: reports impact
- Impact update submission → Evidence hashing and IPFS: prepares evidence
- Wallet and transaction context → Evidence hashing and IPFS: generates CID (evidence: `web/src/lib/impactContext.tsx`)
- Wallet and transaction context → Contract interface: uses interface (evidence: `web/src/lib/impactContext.tsx`)
- Wallet and transaction context → Monad network configuration: requests network switch (evidence: `web/src/lib/impactContext.tsx`)
- Evidence hashing and IPFS → IPFS gateway: resolves media (evidence: `web/src/lib/ipfs.ts`)
- Evidence viewer → AI evidence analysis: renders analysis (evidence: `web/src/components/EvidenceViewer.tsx`)
- Evidence viewer → Evidence attestation: opens attestation (evidence: `web/src/components/EvidenceViewer.tsx`)
- Community or auditor → Evidence attestation: attests evidence
- Evidence attestation → Wallet and transaction context: submits attestation (evidence: `web/src/components/AttestationModal.tsx`)
- Wallet and transaction context → ImpactVault contract: submits update and attestations (evidence: `web/src/lib/impactContext.tsx`)
- ImpactVault contract → Monad Testnet: anchors fingerprints
- Campaign card → Dual progress: renders progress (evidence: `web/src/components/CampaignCard.tsx`)
