# lingamalisha/verifyai architecture

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

- Interactive diagram: https://gitdiagram.com/lingamalisha/verifyai
- Repository: https://github.com/lingamalisha/verifyai

## Overview

VerifyAI is an academic-document integrity and quality auditing application. Users submit a document for text extraction and analysis, then inspect originality, AI-writing, grammar, citation, and quality findings in the results and report views; citation lookup and institutional archive/history features are separate capabilities. The server pipeline’s calls are visible in excerpts, but the frontend-to-API wiring and several tab implementations were not sampled, so those connections are not inferred.

Main entry points: [`src/App.tsx`](https://github.com/lingamalisha/verifyai/blob/main/src/App.tsx) (Application shell), [`server/analysisPipeline.ts`](https://github.com/lingamalisha/verifyai/blob/main/server/analysisPipeline.ts) (Analysis pipeline), [`src/utils/pdfGenerator.ts`](https://github.com/lingamalisha/verifyai/blob/main/src/utils/pdfGenerator.ts) (PDF reports), [`src/components/charts/AcademicCharts.tsx`](https://github.com/lingamalisha/verifyai/blob/main/src/components/charts/AcademicCharts.tsx) (Academic charts)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Review interface"]
  node_app["Application shell<br/>[App.tsx]"]
  node_upload["Document upload<br/>[UploadSection.tsx]"]
  node_results["Analysis results<br/>[ResultsView.tsx]"]
  node_inspection["Sentence inspector"]
  node_sources["Source review<br/>[SourcesTab.tsx]"]
  node_ai["AI review<br/>[AiAnalysisTab.tsx]"]
  node_grammar["Grammar review<br/>[GrammarTab.tsx]"]
  node_citations["Citation tools"]
  node_vault["Institutional vault"]
  node_history["Analysis history<br/>[HistoryTab.tsx]"]
  node_admin["Administration<br/>[AdminTab.tsx]"]
  node_master["Master report"]
  node_charts["Academic charts<br/>[AcademicCharts.tsx]"]
end

subgraph group_server["Analysis services"]
  node_api["HTTP API<br/>[server.ts]"]
  node_parser["File text extraction<br/>[fileParser.ts]"]
  node_pipeline["Analysis pipeline"]
  node_nlp["NLP metrics<br/>[nlpEngine.ts]"]
  node_corpus["Academic corpus<br/>[academicCorpus.ts]"]
  node_gemini["Gemini analysis<br/>[geminiService.ts]"]
  node_crossref["Crossref lookup<br/>[crossrefService.ts]"]
end

subgraph group_records["Records and reports"]
  node_storage[("Document storage<br/>[storage.ts]")]
  node_documents["Document records<br/>[documents.json]"]
  node_pdf["PDF reports<br/>[pdfGenerator.ts]"]
  node_docx["Text report export<br/>[docxGenerator.ts]"]
end

subgraph group_external["External sources"]
  node_crossref_service["Crossref registry"]
end

node_user(("Researcher"))

node_user -->|"uses"| node_app
node_app -->|"renders"| node_upload
node_app -->|"renders"| node_results
node_app -->|"renders"| node_sources
node_app -->|"renders"| node_ai
node_app -->|"renders"| node_grammar
node_app -->|"renders"| node_citations
node_app -->|"renders"| node_vault
node_app -->|"renders"| node_history
node_app -->|"renders"| node_admin
node_app -->|"renders"| node_master
node_results -->|"opens"| node_inspection
node_results -->|"generates PDF"| node_pdf
node_results -->|"exports report"| node_docx
node_master -->|"renders"| node_charts
node_master -->|"generates PDF"| node_pdf
node_master -->|"exports report"| node_docx
node_sources -->|"renders"| node_charts
node_sources -->|"generates PDF"| node_pdf
node_ai -->|"renders"| node_charts
node_ai -->|"generates PDF"| node_pdf
node_grammar -->|"renders"| node_charts
node_grammar -->|"generates PDF"| node_pdf
node_citations -->|"renders"| node_charts
node_citations -->|"generates PDF"| node_pdf
node_api -->|"extracts text"| node_parser
node_api -->|"runs analysis"| node_pipeline
node_api -->|"looks up DOI"| node_crossref
node_api -->|"reads and writes"| node_storage
node_pipeline -->|"uses metrics"| node_nlp
node_pipeline -->|"searches corpus"| node_corpus
node_pipeline -->|"requests analysis"| node_gemini
node_pipeline -->|"uses lookup"| node_crossref
node_pipeline -->|"persists analysis"| node_storage
node_storage -->|"persists records"| node_documents
node_crossref -->|"queries registry"| node_crossref_service

click node_app "https://github.com/lingamalisha/verifyai/blob/main/src/App.tsx"
click node_upload "https://github.com/lingamalisha/verifyai/blob/main/src/components/UploadSection.tsx"
click node_results "https://github.com/lingamalisha/verifyai/blob/main/src/components/ResultsView.tsx"
click node_inspection "https://github.com/lingamalisha/verifyai/blob/main/src/components/InspectionDrawer.tsx"
click node_sources "https://github.com/lingamalisha/verifyai/blob/main/src/components/SourcesTab.tsx"
click node_ai "https://github.com/lingamalisha/verifyai/blob/main/src/components/AiAnalysisTab.tsx"
click node_grammar "https://github.com/lingamalisha/verifyai/blob/main/src/components/GrammarTab.tsx"
click node_citations "https://github.com/lingamalisha/verifyai/blob/main/src/components/CitationEngineTab.tsx"
click node_vault "https://github.com/lingamalisha/verifyai/blob/main/src/components/InstitutionalVaultTab.tsx"
click node_history "https://github.com/lingamalisha/verifyai/blob/main/src/components/HistoryTab.tsx"
click node_admin "https://github.com/lingamalisha/verifyai/blob/main/src/components/AdminTab.tsx"
click node_master "https://github.com/lingamalisha/verifyai/blob/main/src/components/MasterReportView.tsx"
click node_charts "https://github.com/lingamalisha/verifyai/blob/main/src/components/charts/AcademicCharts.tsx"
click node_api "https://github.com/lingamalisha/verifyai/blob/main/server.ts"
click node_parser "https://github.com/lingamalisha/verifyai/blob/main/server/fileParser.ts"
click node_pipeline "https://github.com/lingamalisha/verifyai/blob/main/server/analysisPipeline.ts"
click node_nlp "https://github.com/lingamalisha/verifyai/blob/main/server/nlpEngine.ts"
click node_corpus "https://github.com/lingamalisha/verifyai/blob/main/server/academicCorpus.ts"
click node_gemini "https://github.com/lingamalisha/verifyai/blob/main/server/geminiService.ts"
click node_crossref "https://github.com/lingamalisha/verifyai/blob/main/server/crossrefService.ts"
click node_storage "https://github.com/lingamalisha/verifyai/blob/main/server/storage.ts"
click node_documents "https://github.com/lingamalisha/verifyai/blob/main/data/documents.json"
click node_pdf "https://github.com/lingamalisha/verifyai/blob/main/src/utils/pdfGenerator.ts"
click node_docx "https://github.com/lingamalisha/verifyai/blob/main/src/utils/docxGenerator.ts"

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_upload,node_results,node_inspection,node_sources,node_ai,node_grammar,node_citations,node_vault,node_history,node_admin,node_master,node_charts toneBlue
class node_api,node_parser,node_pipeline,node_nlp,node_corpus,node_gemini,node_crossref toneAmber
class node_storage,node_documents,node_pdf,node_docx toneMint
class node_crossref_service toneRose
class node_user toneIndigo
```

## Components

### Review interface

- [Application shell](https://github.com/lingamalisha/verifyai/blob/main/src/App.tsx): `src/App.tsx`
- [Document upload](https://github.com/lingamalisha/verifyai/blob/main/src/components/UploadSection.tsx): `src/components/UploadSection.tsx`
- [Analysis results](https://github.com/lingamalisha/verifyai/blob/main/src/components/ResultsView.tsx): `src/components/ResultsView.tsx`
- [Sentence inspector](https://github.com/lingamalisha/verifyai/blob/main/src/components/InspectionDrawer.tsx): `src/components/InspectionDrawer.tsx`
- [Source review](https://github.com/lingamalisha/verifyai/blob/main/src/components/SourcesTab.tsx): `src/components/SourcesTab.tsx`
- [AI review](https://github.com/lingamalisha/verifyai/blob/main/src/components/AiAnalysisTab.tsx): `src/components/AiAnalysisTab.tsx`
- [Grammar review](https://github.com/lingamalisha/verifyai/blob/main/src/components/GrammarTab.tsx): `src/components/GrammarTab.tsx`
- [Citation tools](https://github.com/lingamalisha/verifyai/blob/main/src/components/CitationEngineTab.tsx): `src/components/CitationEngineTab.tsx`
- [Institutional vault](https://github.com/lingamalisha/verifyai/blob/main/src/components/InstitutionalVaultTab.tsx): `src/components/InstitutionalVaultTab.tsx`
- [Analysis history](https://github.com/lingamalisha/verifyai/blob/main/src/components/HistoryTab.tsx): `src/components/HistoryTab.tsx`
- [Administration](https://github.com/lingamalisha/verifyai/blob/main/src/components/AdminTab.tsx): `src/components/AdminTab.tsx`
- [Master report](https://github.com/lingamalisha/verifyai/blob/main/src/components/MasterReportView.tsx): `src/components/MasterReportView.tsx`
- [Academic charts](https://github.com/lingamalisha/verifyai/blob/main/src/components/charts/AcademicCharts.tsx): `src/components/charts/AcademicCharts.tsx`

### Analysis services

- [HTTP API](https://github.com/lingamalisha/verifyai/blob/main/server.ts): `server.ts`
- [File text extraction](https://github.com/lingamalisha/verifyai/blob/main/server/fileParser.ts): `server/fileParser.ts`
- [Analysis pipeline](https://github.com/lingamalisha/verifyai/blob/main/server/analysisPipeline.ts): `server/analysisPipeline.ts`
- [NLP metrics](https://github.com/lingamalisha/verifyai/blob/main/server/nlpEngine.ts): `server/nlpEngine.ts`
- [Academic corpus](https://github.com/lingamalisha/verifyai/blob/main/server/academicCorpus.ts): `server/academicCorpus.ts`
- [Gemini analysis](https://github.com/lingamalisha/verifyai/blob/main/server/geminiService.ts): `server/geminiService.ts`
- [Crossref lookup](https://github.com/lingamalisha/verifyai/blob/main/server/crossrefService.ts): `server/crossrefService.ts`

### Records and reports

- [Document storage](https://github.com/lingamalisha/verifyai/blob/main/server/storage.ts): `server/storage.ts`
- [Document records](https://github.com/lingamalisha/verifyai/blob/main/data/documents.json): `data/documents.json`
- [PDF reports](https://github.com/lingamalisha/verifyai/blob/main/src/utils/pdfGenerator.ts): `src/utils/pdfGenerator.ts`
- [Text report export](https://github.com/lingamalisha/verifyai/blob/main/src/utils/docxGenerator.ts): `src/utils/docxGenerator.ts`

### External sources

- **Crossref registry**

### Other components

- **Researcher**

## Connections

- Researcher → Application shell: uses
- Application shell → Document upload: renders (evidence: `src/App.tsx`)
- Application shell → Analysis results: renders (evidence: `src/App.tsx`)
- Application shell → Source review: renders (evidence: `src/App.tsx`)
- Application shell → AI review: renders (evidence: `src/App.tsx`)
- Application shell → Grammar review: renders (evidence: `src/App.tsx`)
- Application shell → Citation tools: renders (evidence: `src/App.tsx`)
- Application shell → Institutional vault: renders (evidence: `src/App.tsx`)
- Application shell → Analysis history: renders (evidence: `src/App.tsx`)
- Application shell → Administration: renders (evidence: `src/App.tsx`)
- Application shell → Master report: renders (evidence: `src/App.tsx`)
- Analysis results → Sentence inspector: opens (evidence: `src/components/ResultsView.tsx`)
- Analysis results → PDF reports: generates PDF (evidence: `src/components/ResultsView.tsx`)
- Analysis results → Text report export: exports report (evidence: `src/components/ResultsView.tsx`)
- Master report → Academic charts: renders (evidence: `src/components/MasterReportView.tsx`)
- Master report → PDF reports: generates PDF (evidence: `src/components/MasterReportView.tsx`)
- Master report → Text report export: exports report (evidence: `src/components/MasterReportView.tsx`)
- Source review → Academic charts: renders (evidence: `src/components/SourcesTab.tsx`)
- Source review → PDF reports: generates PDF (evidence: `src/components/SourcesTab.tsx`)
- AI review → Academic charts: renders (evidence: `src/components/AiAnalysisTab.tsx`)
- AI review → PDF reports: generates PDF (evidence: `src/components/AiAnalysisTab.tsx`)
- Grammar review → Academic charts: renders (evidence: `src/components/GrammarTab.tsx`)
- Grammar review → PDF reports: generates PDF (evidence: `src/components/GrammarTab.tsx`)
- Citation tools → Academic charts: renders (evidence: `src/components/CitationEngineTab.tsx`)
- Citation tools → PDF reports: generates PDF (evidence: `src/components/CitationEngineTab.tsx`)
- HTTP API → File text extraction: extracts text (evidence: `server.ts`)
- HTTP API → Analysis pipeline: runs analysis (evidence: `server.ts`)
- HTTP API → Crossref lookup: looks up DOI (evidence: `server.ts`)
- HTTP API → Document storage: reads and writes (evidence: `server.ts`)
- Analysis pipeline → NLP metrics: uses metrics (evidence: `server/analysisPipeline.ts`)
- Analysis pipeline → Academic corpus: searches corpus (evidence: `server/analysisPipeline.ts`)
- Analysis pipeline → Gemini analysis: requests analysis (evidence: `server/analysisPipeline.ts`)
- Analysis pipeline → Crossref lookup: uses lookup (evidence: `server/analysisPipeline.ts`)
- Analysis pipeline → Document storage: persists analysis (evidence: `server/analysisPipeline.ts`)
- Document storage → Document records: persists records (evidence: `server/storage.ts`)
- Crossref lookup → Crossref registry: queries registry (evidence: `server/crossrefService.ts`)
