# likhithym/authenticert architecture

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

- Interactive diagram: https://gitdiagram.com/likhithym/authenticert
- Repository: https://github.com/likhithym/authenticert

## Overview

AuthentiCert accepts single or bulk certificate uploads, verifies each document against extracted and fetched official data, and presents scored authenticity results with forensic indicators. The README also documents image-template similarity, role-specific workflows, history, and downloadable PDF reports. Edges reflect explicit README statements or shown imports/calls; image similarity and unsampled UI/backend wiring are represented only where documented, with unknown links omitted.

Main entry points: [`frontend/src/App.jsx`](https://github.com/likhithym/authenticert/blob/main/frontend/src/App.jsx) (Web application), [`backend/routes.py`](https://github.com/likhithym/authenticert/blob/main/backend/routes.py) (Verification endpoints), [`frontend/src/components/ResultDashboard.jsx`](https://github.com/likhithym/authenticert/blob/main/frontend/src/components/ResultDashboard.jsx) (Single result dashboard), [`frontend/src/components/BulkResultsDashboard.jsx`](https://github.com/likhithym/authenticert/blob/main/frontend/src/components/BulkResultsDashboard.jsx) (Bulk results dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Verification UI"]
  node_webapp["Web application<br/>[App.jsx]"]
  node_roles["Role selection<br/>[RoleSelector.jsx]"]
  node_upload["Certificate upload<br/>[UploadZone.jsx]"]
  node_progress["Progress tracker"]
end

subgraph group_api["API orchestration"]
  node_app["Flask application<br/>[app.py]"]
  node_verifyapi["Verification endpoints<br/>[routes.py]"]
  node_reportapi["Report endpoint<br/>[routes.py]"]
end

subgraph group_analysis["Certificate analysis"]
  node_extract["OCR and field extraction<br/>[extractor.py]"]
  node_url["Verification URL detection<br/>[extractor.py]"]
  node_scrape["Official record retrieval<br/>[scraper.py]"]
  node_compare["Field comparison<br/>[comparator.py]"]
  node_tamper["Tampering forensics<br/>[tampering.py]"]
  node_qr["QR detection<br/>[qr_detector.py]"]
  node_imagecompare["Template image similarity"]
end

subgraph group_outputs["Results and reporting"]
  node_single["Single result dashboard"]
  node_bulk["Bulk results dashboard"]
  node_mismatch["Mismatch details<br/>[MismatchDetail.jsx]"]
  node_score["Score gauge<br/>[ScoreGauge.jsx]"]
  node_history["Verification history<br/>[HistoryList.jsx]"]
  node_pdf["PDF report generation"]
end

node_user(("Student or teacher"))
node_official[("Institutional records")]

node_user -->|"starts verification"| node_webapp
node_webapp -->|"selects workflow"| node_roles
node_webapp -->|"renders upload"| node_upload
node_webapp -->|"renders progress"| node_progress
node_webapp -->|"posts files"| node_verifyapi
node_verifyapi -->|"extracts fields"| node_extract
node_extract -->|"detects URLs"| node_url
node_verifyapi -->|"fetches records"| node_scrape
node_scrape -.->|"retrieves official data"| node_official
node_verifyapi -->|"compares fields"| node_compare
node_verifyapi -->|"analyzes tampering"| node_tamper
node_official -.->|"provides record data"| node_compare
node_official -.->|"provides template"| node_imagecompare
node_verifyapi -.->|"uses QR detection"| node_qr
node_verifyapi -.->|"checks similarity"| node_imagecompare
node_verifyapi -->|"returns results"| node_webapp
node_webapp -->|"renders single results"| node_single
node_webapp -->|"renders batch results"| node_bulk
node_single -->|"renders gauge"| node_score
node_single -->|"renders details"| node_mismatch
node_bulk -->|"renders details"| node_mismatch
node_webapp -->|"renders history"| node_history
node_webapp -->|"fetches history"| node_verifyapi
node_user -->|"requests report"| node_reportapi
node_single -->|"requests PDF"| node_reportapi
node_reportapi -->|"generates report"| node_pdf
node_bulk -->|"downloads batch PDF"| node_reportapi

click node_app "https://github.com/likhithym/authenticert/blob/main/backend/app.py"
click node_webapp "https://github.com/likhithym/authenticert/blob/main/frontend/src/App.jsx"
click node_roles "https://github.com/likhithym/authenticert/blob/main/frontend/src/components/RoleSelector.jsx"
click node_upload "https://github.com/likhithym/authenticert/blob/main/frontend/src/components/UploadZone.jsx"
click node_progress "https://github.com/likhithym/authenticert/blob/main/frontend/src/components/ProgressTracker.jsx"
click node_verifyapi "https://github.com/likhithym/authenticert/blob/main/backend/routes.py"
click node_extract "https://github.com/likhithym/authenticert/blob/main/backend/extractor.py"
click node_url "https://github.com/likhithym/authenticert/blob/main/backend/extractor.py"
click node_scrape "https://github.com/likhithym/authenticert/blob/main/backend/scraper.py"
click node_compare "https://github.com/likhithym/authenticert/blob/main/backend/comparator.py"
click node_tamper "https://github.com/likhithym/authenticert/blob/main/backend/tampering.py"
click node_qr "https://github.com/likhithym/authenticert/blob/main/backend/qr_detector.py"
click node_single "https://github.com/likhithym/authenticert/blob/main/frontend/src/components/ResultDashboard.jsx"
click node_bulk "https://github.com/likhithym/authenticert/blob/main/frontend/src/components/BulkResultsDashboard.jsx"
click node_mismatch "https://github.com/likhithym/authenticert/blob/main/frontend/src/components/MismatchDetail.jsx"
click node_score "https://github.com/likhithym/authenticert/blob/main/frontend/src/components/ScoreGauge.jsx"
click node_history "https://github.com/likhithym/authenticert/blob/main/frontend/src/components/HistoryList.jsx"
click node_reportapi "https://github.com/likhithym/authenticert/blob/main/backend/routes.py"
click node_pdf "https://github.com/likhithym/authenticert/blob/main/backend/report_generator.py"

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_webapp,node_roles,node_upload,node_progress toneBlue
class node_app,node_verifyapi,node_reportapi,node_official toneAmber
class node_extract,node_url,node_scrape,node_compare,node_tamper,node_qr,node_imagecompare toneMint
class node_single,node_bulk,node_mismatch,node_score,node_history,node_pdf toneRose
class node_user toneIndigo
```

## Components

### Verification UI

- [Web application](https://github.com/likhithym/authenticert/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Role selection](https://github.com/likhithym/authenticert/blob/main/frontend/src/components/RoleSelector.jsx): `frontend/src/components/RoleSelector.jsx`
- [Certificate upload](https://github.com/likhithym/authenticert/blob/main/frontend/src/components/UploadZone.jsx): `frontend/src/components/UploadZone.jsx`
- [Progress tracker](https://github.com/likhithym/authenticert/blob/main/frontend/src/components/ProgressTracker.jsx): `frontend/src/components/ProgressTracker.jsx`

### API orchestration

- [Flask application](https://github.com/likhithym/authenticert/blob/main/backend/app.py): `backend/app.py`
- [Verification endpoints](https://github.com/likhithym/authenticert/blob/main/backend/routes.py): `backend/routes.py`
- [Report endpoint](https://github.com/likhithym/authenticert/blob/main/backend/routes.py): `backend/routes.py`

### Certificate analysis

- [OCR and field extraction](https://github.com/likhithym/authenticert/blob/main/backend/extractor.py): `backend/extractor.py`
- [Verification URL detection](https://github.com/likhithym/authenticert/blob/main/backend/extractor.py): `backend/extractor.py`
- [Official record retrieval](https://github.com/likhithym/authenticert/blob/main/backend/scraper.py): `backend/scraper.py`
- [Field comparison](https://github.com/likhithym/authenticert/blob/main/backend/comparator.py): `backend/comparator.py`
- [Tampering forensics](https://github.com/likhithym/authenticert/blob/main/backend/tampering.py): `backend/tampering.py`
- [QR detection](https://github.com/likhithym/authenticert/blob/main/backend/qr_detector.py): `backend/qr_detector.py`
- **Template image similarity**

### Results and reporting

- [Single result dashboard](https://github.com/likhithym/authenticert/blob/main/frontend/src/components/ResultDashboard.jsx): `frontend/src/components/ResultDashboard.jsx`
- [Bulk results dashboard](https://github.com/likhithym/authenticert/blob/main/frontend/src/components/BulkResultsDashboard.jsx): `frontend/src/components/BulkResultsDashboard.jsx`
- [Mismatch details](https://github.com/likhithym/authenticert/blob/main/frontend/src/components/MismatchDetail.jsx): `frontend/src/components/MismatchDetail.jsx`
- [Score gauge](https://github.com/likhithym/authenticert/blob/main/frontend/src/components/ScoreGauge.jsx): `frontend/src/components/ScoreGauge.jsx`
- [Verification history](https://github.com/likhithym/authenticert/blob/main/frontend/src/components/HistoryList.jsx): `frontend/src/components/HistoryList.jsx`
- [PDF report generation](https://github.com/likhithym/authenticert/blob/main/backend/report_generator.py): `backend/report_generator.py`

### Other components

- **Student or teacher**
- **Institutional records**

## Connections

- Student or teacher → Web application: starts verification (evidence: `README.md`)
- Web application → Role selection: selects workflow (evidence: `frontend/src/App.jsx`)
- Web application → Certificate upload: renders upload (evidence: `frontend/src/App.jsx`)
- Web application → Progress tracker: renders progress (evidence: `frontend/src/App.jsx`)
- Web application → Verification endpoints: posts files (evidence: `frontend/src/App.jsx`)
- Verification endpoints → OCR and field extraction: extracts fields (evidence: `backend/routes.py`)
- OCR and field extraction → Verification URL detection: detects URLs (evidence: `README.md`)
- Verification endpoints → Official record retrieval: fetches records (evidence: `backend/routes.py`)
- Official record retrieval → Institutional records: retrieves official data (evidence: `README.md`)
- Verification endpoints → Field comparison: compares fields (evidence: `backend/routes.py`)
- Verification endpoints → Tampering forensics: analyzes tampering (evidence: `backend/routes.py`)
- Institutional records → Field comparison: provides record data (evidence: `README.md`)
- Institutional records → Template image similarity: provides template (evidence: `README.md`)
- Verification endpoints → QR detection: uses QR detection
- Verification endpoints → Template image similarity: checks similarity (evidence: `README.md`)
- Verification endpoints → Web application: returns results (evidence: `frontend/src/App.jsx`)
- Web application → Single result dashboard: renders single results (evidence: `frontend/src/App.jsx`)
- Web application → Bulk results dashboard: renders batch results (evidence: `frontend/src/App.jsx`)
- Single result dashboard → Score gauge: renders gauge (evidence: `frontend/src/components/ResultDashboard.jsx`)
- Single result dashboard → Mismatch details: renders details (evidence: `frontend/src/components/ResultDashboard.jsx`)
- Bulk results dashboard → Mismatch details: renders details (evidence: `frontend/src/components/BulkResultsDashboard.jsx`)
- Web application → Verification history: renders history (evidence: `frontend/src/App.jsx`)
- Web application → Verification endpoints: fetches history (evidence: `frontend/src/App.jsx`)
- Student or teacher → Report endpoint: requests report (evidence: `README.md`)
- Single result dashboard → Report endpoint: requests PDF (evidence: `frontend/src/components/ResultDashboard.jsx`)
- Report endpoint → PDF report generation: generates report (evidence: `backend/routes.py`)
- Bulk results dashboard → Report endpoint: downloads batch PDF (evidence: `README.md`)
