# pratikshakalbhor/dataproof architecture

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

- Interactive diagram: https://gitdiagram.com/pratikshakalbhor/dataproof
- Repository: https://github.com/pratikshakalbhor/dataproof

## Overview

DataProof/ChainLock is a browser-based forensic file vault. Users connect a wallet, upload files for hashing, encryption, storage and blockchain sealing, then verify files, inspect tampering evidence and restore originals. The graph preserves dashboard, archive/recovery, notifications, audit history and certificate capabilities documented in the README. Backend internals are grouped by domain because their call-level relationships were not excerpted; those links use documented system-level evidence.

Main entry points: [`frontend/src/utils/api.js`](https://github.com/pratikshakalbhor/dataproof/blob/main/frontend/src/utils/api.js) (API client), [`frontend/src/App.jsx`](https://github.com/pratikshakalbhor/dataproof/blob/main/frontend/src/App.jsx) (App routing), [`go-backend/routes/routes.go`](https://github.com/pratikshakalbhor/dataproof/blob/main/go-backend/routes/routes.go) (REST routes), [`frontend/src/pages/Verify.jsx`](https://github.com/pratikshakalbhor/dataproof/blob/main/frontend/src/pages/Verify.jsx) (File verification)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_app["App routing<br/>[App.jsx]"]
  node_dashboard["Dashboard<br/>[Dashboard.jsx]"]
  node_myfiles["My files and archive<br/>[MyFiles.jsx]"]
  node_blocklog["Blockchain log<br/>[BlockchainLog.jsx]"]
  node_profile["Profile and insights<br/>[Profile.jsx]"]
  node_publicverify["Public verification<br/>[PublicVerify.jsx]"]
  node_certificateui["Certificate download"]
  node_notificationsui["Notification dropdown"]
end

subgraph group_vault["Vault operations"]
  node_upload["File upload<br/>[Upload.jsx]"]
  node_chainclient["Blockchain client<br/>[blockchain.js]"]
end

subgraph group_forensics["Forensics and recovery"]
  node_verify["File verification<br/>[Verify.jsx]"]
  node_forensicmodal["Forensic report<br/>[ForensicModal.jsx]"]
  node_recovery["Recovery hub<br/>[RecoveryHub.jsx]"]
end

subgraph group_backend["API and persistence"]
  node_api["API client<br/>[api.js]"]
  node_backendroutes["REST routes<br/>[routes.go]"]
  node_uploadhandler["Upload handler<br/>[upload.go]"]
  node_verifyhandler["Verify handler<br/>[verify.go]"]
  node_forensichandler["Forensic comparison"]
  node_filehandler["File management<br/>[files.go]"]
  node_audit["Audit history<br/>[audit.go]"]
  node_notifications["Security notifications<br/>[notifications.go]"]
  node_certificates["Proof certificate<br/>[certificate.go]"]
end

node_user(("User"))
node_wallet["MetaMask wallet"]
node_ethereum["Ethereum Sepolia"]
node_database[("MongoDB")]
node_ipfs["Pinata IPFS"]
node_backup[("Local backups")]

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_upload
node_app -->|"routes to"| node_verify
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_myfiles
node_app -->|"routes to"| node_blocklog
node_app -->|"routes to"| node_profile
node_app -->|"routes to"| node_publicverify
node_upload -.->|"submits file"| node_api
node_upload -->|"seals hash"| node_chainclient
node_chainclient -->|"requests signing"| node_wallet
node_chainclient -->|"reads and writes"| node_ethereum
node_verify -.->|"requests verification"| node_api
node_verify -->|"checks chain"| node_chainclient
node_verify -->|"opens report"| node_forensicmodal
node_recovery -->|"renders report"| node_forensicmodal
node_recovery -.->|"requests recovery"| node_api
node_api -->|"calls REST API"| node_backendroutes
node_backendroutes -.->|"routes upload"| node_uploadhandler
node_backendroutes -.->|"routes verification"| node_verifyhandler
node_backendroutes -.->|"routes comparison"| node_forensichandler
node_backendroutes -.->|"routes file actions"| node_filehandler
node_backendroutes -.->|"routes audit"| node_audit
node_backendroutes -.->|"routes alerts"| node_notifications
node_backendroutes -.->|"routes certificates"| node_certificates
node_uploadhandler -->|"stores metadata"| node_database
node_uploadhandler -->|"uploads encrypted file"| node_ipfs
node_uploadhandler -->|"keeps original"| node_backup
node_verifyhandler -->|"reads records"| node_database
node_forensichandler -->|"compares versions"| node_backup
node_filehandler -->|"manages metadata"| node_database
node_notifications -->|"stores notifications"| node_database
node_dashboard -.->|"loads overview"| node_api
node_myfiles -.->|"loads files"| node_api
node_blocklog -->|"loads history"| node_api
node_profile -->|"loads insights"| node_api
node_publicverify -.->|"checks public proof"| node_api
node_notificationsui -->|"loads alerts"| node_api
node_certificateui -.->|"downloads PDF"| node_user
node_forensichandler -.->|"restores original"| node_backup

click node_app "https://github.com/pratikshakalbhor/dataproof/blob/main/frontend/src/App.jsx"
click node_upload "https://github.com/pratikshakalbhor/dataproof/blob/main/frontend/src/pages/Upload.jsx"
click node_chainclient "https://github.com/pratikshakalbhor/dataproof/blob/main/frontend/src/utils/blockchain.js"
click node_verify "https://github.com/pratikshakalbhor/dataproof/blob/main/frontend/src/pages/Verify.jsx"
click node_forensicmodal "https://github.com/pratikshakalbhor/dataproof/blob/main/frontend/src/components/ForensicModal.jsx"
click node_recovery "https://github.com/pratikshakalbhor/dataproof/blob/main/frontend/src/pages/RecoveryHub.jsx"
click node_api "https://github.com/pratikshakalbhor/dataproof/blob/main/frontend/src/utils/api.js"
click node_backendroutes "https://github.com/pratikshakalbhor/dataproof/blob/main/go-backend/routes/routes.go"
click node_uploadhandler "https://github.com/pratikshakalbhor/dataproof/blob/main/go-backend/handlers/upload.go"
click node_verifyhandler "https://github.com/pratikshakalbhor/dataproof/blob/main/go-backend/handlers/verify.go"
click node_forensichandler "https://github.com/pratikshakalbhor/dataproof/blob/main/go-backend/handlers/forensic_compare.go"
click node_filehandler "https://github.com/pratikshakalbhor/dataproof/blob/main/go-backend/handlers/files.go"
click node_audit "https://github.com/pratikshakalbhor/dataproof/blob/main/go-backend/handlers/audit.go"
click node_notifications "https://github.com/pratikshakalbhor/dataproof/blob/main/go-backend/handlers/notifications.go"
click node_certificates "https://github.com/pratikshakalbhor/dataproof/blob/main/go-backend/handlers/certificate.go"
click node_dashboard "https://github.com/pratikshakalbhor/dataproof/blob/main/frontend/src/pages/Dashboard.jsx"
click node_myfiles "https://github.com/pratikshakalbhor/dataproof/blob/main/frontend/src/pages/MyFiles.jsx"
click node_blocklog "https://github.com/pratikshakalbhor/dataproof/blob/main/frontend/src/pages/BlockchainLog.jsx"
click node_profile "https://github.com/pratikshakalbhor/dataproof/blob/main/frontend/src/pages/Profile.jsx"
click node_publicverify "https://github.com/pratikshakalbhor/dataproof/blob/main/frontend/src/pages/PublicVerify.jsx"
click node_certificateui "https://github.com/pratikshakalbhor/dataproof/blob/main/frontend/src/utils/generateCertificate.js"
click node_notificationsui "https://github.com/pratikshakalbhor/dataproof/blob/main/frontend/src/components/NotificationDropdown.jsx"

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_app,node_dashboard,node_myfiles,node_blocklog,node_profile,node_publicverify,node_certificateui,node_notificationsui,node_user toneBlue
class node_upload,node_chainclient,node_database,node_backup toneAmber
class node_verify,node_forensicmodal,node_recovery toneMint
class node_api,node_backendroutes,node_uploadhandler,node_verifyhandler,node_forensichandler,node_filehandler,node_audit,node_notifications,node_certificates toneRose
class node_wallet,node_ethereum,node_ipfs toneIndigo
```

## Components

### Web client

- [App routing](https://github.com/pratikshakalbhor/dataproof/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Dashboard](https://github.com/pratikshakalbhor/dataproof/blob/main/frontend/src/pages/Dashboard.jsx): `frontend/src/pages/Dashboard.jsx`
- [My files and archive](https://github.com/pratikshakalbhor/dataproof/blob/main/frontend/src/pages/MyFiles.jsx): `frontend/src/pages/MyFiles.jsx`
- [Blockchain log](https://github.com/pratikshakalbhor/dataproof/blob/main/frontend/src/pages/BlockchainLog.jsx): `frontend/src/pages/BlockchainLog.jsx`
- [Profile and insights](https://github.com/pratikshakalbhor/dataproof/blob/main/frontend/src/pages/Profile.jsx): `frontend/src/pages/Profile.jsx`
- [Public verification](https://github.com/pratikshakalbhor/dataproof/blob/main/frontend/src/pages/PublicVerify.jsx): `frontend/src/pages/PublicVerify.jsx`
- [Certificate download](https://github.com/pratikshakalbhor/dataproof/blob/main/frontend/src/utils/generateCertificate.js): `frontend/src/utils/generateCertificate.js`
- [Notification dropdown](https://github.com/pratikshakalbhor/dataproof/blob/main/frontend/src/components/NotificationDropdown.jsx): `frontend/src/components/NotificationDropdown.jsx`

### Vault operations

- [File upload](https://github.com/pratikshakalbhor/dataproof/blob/main/frontend/src/pages/Upload.jsx): `frontend/src/pages/Upload.jsx`
- [Blockchain client](https://github.com/pratikshakalbhor/dataproof/blob/main/frontend/src/utils/blockchain.js): `frontend/src/utils/blockchain.js`

### Forensics and recovery

- [File verification](https://github.com/pratikshakalbhor/dataproof/blob/main/frontend/src/pages/Verify.jsx): `frontend/src/pages/Verify.jsx`
- [Forensic report](https://github.com/pratikshakalbhor/dataproof/blob/main/frontend/src/components/ForensicModal.jsx): `frontend/src/components/ForensicModal.jsx`
- [Recovery hub](https://github.com/pratikshakalbhor/dataproof/blob/main/frontend/src/pages/RecoveryHub.jsx): `frontend/src/pages/RecoveryHub.jsx`

### API and persistence

- [API client](https://github.com/pratikshakalbhor/dataproof/blob/main/frontend/src/utils/api.js): `frontend/src/utils/api.js`
- [REST routes](https://github.com/pratikshakalbhor/dataproof/blob/main/go-backend/routes/routes.go): `go-backend/routes/routes.go`
- [Upload handler](https://github.com/pratikshakalbhor/dataproof/blob/main/go-backend/handlers/upload.go): `go-backend/handlers/upload.go`
- [Verify handler](https://github.com/pratikshakalbhor/dataproof/blob/main/go-backend/handlers/verify.go): `go-backend/handlers/verify.go`
- [Forensic comparison](https://github.com/pratikshakalbhor/dataproof/blob/main/go-backend/handlers/forensic_compare.go): `go-backend/handlers/forensic_compare.go`
- [File management](https://github.com/pratikshakalbhor/dataproof/blob/main/go-backend/handlers/files.go): `go-backend/handlers/files.go`
- [Audit history](https://github.com/pratikshakalbhor/dataproof/blob/main/go-backend/handlers/audit.go): `go-backend/handlers/audit.go`
- [Security notifications](https://github.com/pratikshakalbhor/dataproof/blob/main/go-backend/handlers/notifications.go): `go-backend/handlers/notifications.go`
- [Proof certificate](https://github.com/pratikshakalbhor/dataproof/blob/main/go-backend/handlers/certificate.go): `go-backend/handlers/certificate.go`

### Other components

- **User**
- **MetaMask wallet**
- **Ethereum Sepolia**
- **MongoDB**
- **Pinata IPFS**
- **Local backups**

## Connections

- User → App routing: uses (evidence: `frontend/src/App.jsx`)
- App routing → File upload: routes to (evidence: `frontend/src/App.jsx`)
- App routing → File verification: routes to (evidence: `frontend/src/App.jsx`)
- App routing → Dashboard: routes to (evidence: `frontend/src/App.jsx`)
- App routing → My files and archive: routes to (evidence: `frontend/src/App.jsx`)
- App routing → Blockchain log: routes to (evidence: `frontend/src/App.jsx`)
- App routing → Profile and insights: routes to (evidence: `frontend/src/App.jsx`)
- App routing → Public verification: routes to (evidence: `frontend/src/App.jsx`)
- File upload → API client: submits file
- File upload → Blockchain client: seals hash (evidence: `frontend/src/pages/Upload.jsx`)
- Blockchain client → MetaMask wallet: requests signing (evidence: `frontend/src/utils/blockchain.js`)
- Blockchain client → Ethereum Sepolia: reads and writes (evidence: `frontend/src/utils/blockchain.js`)
- File verification → API client: requests verification
- File verification → Blockchain client: checks chain (evidence: `frontend/src/pages/Verify.jsx`)
- File verification → Forensic report: opens report (evidence: `frontend/src/pages/Verify.jsx`)
- Recovery hub → Forensic report: renders report (evidence: `frontend/src/pages/RecoveryHub.jsx`)
- Recovery hub → API client: requests recovery (evidence: `frontend/src/pages/RecoveryHub.jsx`)
- API client → REST routes: calls REST API (evidence: `README.md`)
- REST routes → Upload handler: routes upload
- REST routes → Verify handler: routes verification
- REST routes → Forensic comparison: routes comparison
- REST routes → File management: routes file actions
- REST routes → Audit history: routes audit
- REST routes → Security notifications: routes alerts
- REST routes → Proof certificate: routes certificates
- Upload handler → MongoDB: stores metadata (evidence: `README.md`)
- Upload handler → Pinata IPFS: uploads encrypted file (evidence: `README.md`)
- Upload handler → Local backups: keeps original (evidence: `README.md`)
- Verify handler → MongoDB: reads records (evidence: `README.md`)
- Forensic comparison → Local backups: compares versions (evidence: `README.md`)
- File management → MongoDB: manages metadata (evidence: `README.md`)
- Security notifications → MongoDB: stores notifications (evidence: `README.md`)
- Dashboard → API client: loads overview (evidence: `frontend/src/pages/Dashboard.jsx`)
- My files and archive → API client: loads files (evidence: `frontend/src/pages/MyFiles.jsx`)
- Blockchain log → API client: loads history (evidence: `frontend/src/pages/BlockchainLog.jsx`)
- Profile and insights → API client: loads insights (evidence: `frontend/src/pages/Profile.jsx`)
- Public verification → API client: checks public proof
- Notification dropdown → API client: loads alerts (evidence: `frontend/src/components/NotificationDropdown.jsx`)
- Certificate download → User: downloads PDF
- Forensic comparison → Local backups: restores original
