# luckycoder07/vouch-project architecture

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

- Interactive diagram: https://gitdiagram.com/luckycoder07/vouch-project
- Repository: https://github.com/luckycoder07/vouch-project

## Overview

Vouch is a code-notarization and integrity-verification platform. Developers submit code through the dashboard, batch workflow, or VS Code extension; the backend normalizes and hashes it, records a ledger entry, and provides verification and signed certificates. Organizations also manage assignments and submission reports. The README documents Supabase storage, Polygon anchoring, and email certificates. Backend implementation excerpts were not provided, so links between its named services are limited to documented responsibilities; optional integrations are dashed.

Main entry points: [`backend/api.py`](https://github.com/luckycoder07/vouch-project/blob/main/backend/api.py) (FastAPI service), [`frontend/src/pages/OrgDashboard.jsx`](https://github.com/luckycoder07/vouch-project/blob/main/frontend/src/pages/OrgDashboard.jsx) (Organization dashboard), [`frontend/src/App.jsx`](https://github.com/luckycoder07/vouch-project/blob/main/frontend/src/App.jsx) (Vouch web app), [`frontend/src/pages/BatchUpload.jsx`](https://github.com/luckycoder07/vouch-project/blob/main/frontend/src/pages/BatchUpload.jsx) (Submission and batch)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["User interfaces"]
  node_frontend["Vouch web app<br/>[App.jsx]"]
  node_submission["Submission and batch<br/>[BatchUpload.jsx]"]
  node_verification["Verification pages<br/>[Verification.jsx]"]
  node_publicverify["Public verification<br/>[PublicVerify.jsx]"]
  node_history["History and certificates<br/>[History.jsx]"]
  node_vscore["VScore<br/>[VScore.jsx]"]
  node_extension["VS Code extension<br/>[extension.ts]"]
end

subgraph group_core["Notarization backend"]
  node_api["FastAPI service<br/>[api.py]"]
  node_hasher["Structural hashing<br/>[hasher.py]"]
  node_ledger["Ledger service<br/>[ledger.py]"]
  node_batch["Batch processor<br/>[batch_processor.py]"]
end

subgraph group_trust["Proof and delivery"]
  node_certificate["Certificate generation<br/>[certificate.py]"]
  node_signer["Certificate signing<br/>[signer.py]"]
  node_verifier["Proof verification<br/>[verifier.py]"]
  node_anchor["Blockchain anchoring<br/>[anchor.py]"]
  node_mailer["Email delivery<br/>[mailer.py]"]
end

subgraph group_org["Organization workflows"]
  node_assignments["Assignment service<br/>[assignments.py]"]
  node_organizations["Organization service<br/>[organizations.py]"]
  node_plagiarism["Plagiarism checks<br/>[plagiarism.py]"]
  node_orgui["Organization dashboard<br/>[OrgDashboard.jsx]"]
end

subgraph group_identity["Identity and data"]
  node_auth["Authentication state<br/>[AuthContext.jsx]"]
  node_supabaseclient["Supabase client<br/>[supabase.js]"]
end

node_developer(("Developer"))
node_public(("Public verifier"))
node_supabase[("Supabase")]
node_polygon{{"Polygon Amoy"}}
node_resend{{"Resend API"}}

node_developer -->|"uses"| node_frontend
node_frontend -->|"opens"| node_submission
node_submission -->|"submits code"| node_api
node_api -->|"hashes code"| node_hasher
node_api -->|"records and checks"| node_ledger
node_api -->|"processes batches"| node_batch
node_developer -.->|"uses"| node_extension
node_extension -.->|"calls API"| node_api
node_developer -->|"requests check"| node_verification
node_verification -->|"sends code"| node_api
node_public -->|"enters code"| node_publicverify
node_publicverify -->|"requests verification"| node_api
node_api -->|"verifies proof"| node_verifier
node_history -->|"requests records"| node_api
node_api -->|"generates certificate"| node_certificate
node_api -->|"signs certificate"| node_signer
node_api -->|"sends certificate"| node_mailer
node_mailer -.->|"delivers email"| node_resend
node_api -->|"anchors ledger"| node_anchor
node_anchor -.->|"writes anchor"| node_polygon
node_auth -->|"uses auth"| node_supabaseclient
node_supabaseclient -->|"auth and profile data"| node_supabase
node_ledger -->|"stores records"| node_supabase
node_orgui -->|"manages workspace"| node_api
node_api -->|"handles organizations"| node_organizations
node_api -->|"handles assignments"| node_assignments
node_api -->|"checks submissions"| node_plagiarism
node_orgui -->|"views scoring"| node_vscore

click node_frontend "https://github.com/luckycoder07/vouch-project/blob/main/frontend/src/App.jsx"
click node_submission "https://github.com/luckycoder07/vouch-project/blob/main/frontend/src/pages/BatchUpload.jsx"
click node_verification "https://github.com/luckycoder07/vouch-project/blob/main/frontend/src/pages/Verification.jsx"
click node_publicverify "https://github.com/luckycoder07/vouch-project/blob/main/frontend/src/pages/PublicVerify.jsx"
click node_history "https://github.com/luckycoder07/vouch-project/blob/main/frontend/src/pages/History.jsx"
click node_vscore "https://github.com/luckycoder07/vouch-project/blob/main/frontend/src/pages/VScore.jsx"
click node_extension "https://github.com/luckycoder07/vouch-project/blob/main/vouch-vscode-extension/src/extension.ts"
click node_api "https://github.com/luckycoder07/vouch-project/blob/main/backend/api.py"
click node_hasher "https://github.com/luckycoder07/vouch-project/blob/main/backend/hasher.py"
click node_ledger "https://github.com/luckycoder07/vouch-project/blob/main/backend/ledger.py"
click node_batch "https://github.com/luckycoder07/vouch-project/blob/main/backend/batch_processor.py"
click node_assignments "https://github.com/luckycoder07/vouch-project/blob/main/backend/assignments.py"
click node_organizations "https://github.com/luckycoder07/vouch-project/blob/main/backend/organizations.py"
click node_plagiarism "https://github.com/luckycoder07/vouch-project/blob/main/backend/plagiarism.py"
click node_certificate "https://github.com/luckycoder07/vouch-project/blob/main/backend/certificate.py"
click node_signer "https://github.com/luckycoder07/vouch-project/blob/main/backend/signer.py"
click node_verifier "https://github.com/luckycoder07/vouch-project/blob/main/backend/verifier.py"
click node_anchor "https://github.com/luckycoder07/vouch-project/blob/main/backend/anchor.py"
click node_mailer "https://github.com/luckycoder07/vouch-project/blob/main/backend/mailer.py"
click node_auth "https://github.com/luckycoder07/vouch-project/blob/main/frontend/src/context/AuthContext.jsx"
click node_supabaseclient "https://github.com/luckycoder07/vouch-project/blob/main/frontend/src/lib/supabase.js"
click node_orgui "https://github.com/luckycoder07/vouch-project/blob/main/frontend/src/pages/OrgDashboard.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_frontend,node_submission,node_verification,node_publicverify,node_history,node_vscore,node_extension toneBlue
class node_api,node_hasher,node_ledger,node_batch,node_supabase toneAmber
class node_certificate,node_signer,node_verifier,node_anchor,node_mailer,node_resend toneMint
class node_assignments,node_organizations,node_plagiarism,node_orgui toneRose
class node_auth,node_supabaseclient,node_developer,node_public,node_polygon toneIndigo
```

## Components

### User interfaces

- [Vouch web app](https://github.com/luckycoder07/vouch-project/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Submission and batch](https://github.com/luckycoder07/vouch-project/blob/main/frontend/src/pages/BatchUpload.jsx): `frontend/src/pages/BatchUpload.jsx`
- [Verification pages](https://github.com/luckycoder07/vouch-project/blob/main/frontend/src/pages/Verification.jsx): `frontend/src/pages/Verification.jsx`
- [Public verification](https://github.com/luckycoder07/vouch-project/blob/main/frontend/src/pages/PublicVerify.jsx): `frontend/src/pages/PublicVerify.jsx`
- [History and certificates](https://github.com/luckycoder07/vouch-project/blob/main/frontend/src/pages/History.jsx): `frontend/src/pages/History.jsx`
- [VScore](https://github.com/luckycoder07/vouch-project/blob/main/frontend/src/pages/VScore.jsx): `frontend/src/pages/VScore.jsx`
- [VS Code extension](https://github.com/luckycoder07/vouch-project/blob/main/vouch-vscode-extension/src/extension.ts): `vouch-vscode-extension/src/extension.ts`

### Notarization backend

- [FastAPI service](https://github.com/luckycoder07/vouch-project/blob/main/backend/api.py): `backend/api.py`
- [Structural hashing](https://github.com/luckycoder07/vouch-project/blob/main/backend/hasher.py): `backend/hasher.py`
- [Ledger service](https://github.com/luckycoder07/vouch-project/blob/main/backend/ledger.py): `backend/ledger.py`
- [Batch processor](https://github.com/luckycoder07/vouch-project/blob/main/backend/batch_processor.py): `backend/batch_processor.py`

### Proof and delivery

- [Certificate generation](https://github.com/luckycoder07/vouch-project/blob/main/backend/certificate.py): `backend/certificate.py`
- [Certificate signing](https://github.com/luckycoder07/vouch-project/blob/main/backend/signer.py): `backend/signer.py`
- [Proof verification](https://github.com/luckycoder07/vouch-project/blob/main/backend/verifier.py): `backend/verifier.py`
- [Blockchain anchoring](https://github.com/luckycoder07/vouch-project/blob/main/backend/anchor.py): `backend/anchor.py`
- [Email delivery](https://github.com/luckycoder07/vouch-project/blob/main/backend/mailer.py): `backend/mailer.py`

### Organization workflows

- [Assignment service](https://github.com/luckycoder07/vouch-project/blob/main/backend/assignments.py): `backend/assignments.py`
- [Organization service](https://github.com/luckycoder07/vouch-project/blob/main/backend/organizations.py): `backend/organizations.py`
- [Plagiarism checks](https://github.com/luckycoder07/vouch-project/blob/main/backend/plagiarism.py): `backend/plagiarism.py`
- [Organization dashboard](https://github.com/luckycoder07/vouch-project/blob/main/frontend/src/pages/OrgDashboard.jsx): `frontend/src/pages/OrgDashboard.jsx`

### Identity and data

- [Authentication state](https://github.com/luckycoder07/vouch-project/blob/main/frontend/src/context/AuthContext.jsx): `frontend/src/context/AuthContext.jsx`
- [Supabase client](https://github.com/luckycoder07/vouch-project/blob/main/frontend/src/lib/supabase.js): `frontend/src/lib/supabase.js`

### Other components

- **Developer**
- **Public verifier**
- **Supabase**
- **Polygon Amoy**
- **Resend API**

## Connections

- Developer → Vouch web app: uses
- Vouch web app → Submission and batch: opens
- Submission and batch → FastAPI service: submits code
- FastAPI service → Structural hashing: hashes code
- FastAPI service → Ledger service: records and checks
- FastAPI service → Batch processor: processes batches
- Developer → VS Code extension: uses
- VS Code extension → FastAPI service: calls API
- Developer → Verification pages: requests check
- Verification pages → FastAPI service: sends code
- Public verifier → Public verification: enters code
- Public verification → FastAPI service: requests verification
- FastAPI service → Proof verification: verifies proof
- History and certificates → FastAPI service: requests records
- FastAPI service → Certificate generation: generates certificate
- FastAPI service → Certificate signing: signs certificate
- FastAPI service → Email delivery: sends certificate
- Email delivery → Resend API: delivers email
- FastAPI service → Blockchain anchoring: anchors ledger
- Blockchain anchoring → Polygon Amoy: writes anchor
- Authentication state → Supabase client: uses auth
- Supabase client → Supabase: auth and profile data
- Ledger service → Supabase: stores records
- Organization dashboard → FastAPI service: manages workspace
- FastAPI service → Organization service: handles organizations
- FastAPI service → Assignment service: handles assignments
- FastAPI service → Plagiarism checks: checks submissions
- Organization dashboard → VScore: views scoring
