# cu-sanjay/free-turnitin-plagiarism-checker architecture

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

- Interactive diagram: https://gitdiagram.com/cu-sanjay/free-turnitin-plagiarism-checker
- Repository: https://github.com/cu-sanjay/free-turnitin-plagiarism-checker

## Overview

This is a browser-based plagiarism checker that compares submitted text with accessible public web pages, then presents matched passages and a downloadable report. The main path is document submission, server validation, segmented web search and page comparison, similarity resolution, and result review; users can also revisit saved history and browse tools/about pages. The README documents visual analytics, citation exclusion, dark mode, and multiple file formats, though sampled input code only visibly handles plain-text files. Some client wiring and unsampled feature implementations are represented only where documented.

Main entry points: [`client/src/App.jsx`](https://github.com/cu-sanjay/free-turnitin-plagiarism-checker/blob/main/client/src/App.jsx) (App routes), [`client/src/pages/Index.jsx`](https://github.com/cu-sanjay/free-turnitin-plagiarism-checker/blob/main/client/src/pages/Index.jsx) (Document checker), [`server/routes.js`](https://github.com/cu-sanjay/free-turnitin-plagiarism-checker/blob/main/server/routes.js) (Check routes), [`server/plagiarism.js`](https://github.com/cu-sanjay/free-turnitin-plagiarism-checker/blob/main/server/plagiarism.js) (Check orchestration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client experience"]
  node_app["App routes<br/>[App.jsx]"]
  node_checker["Document checker<br/>[Index.jsx]"]
  node_reportview["Report view<br/>[ReportView.jsx]"]
  node_historypage["History page<br/>[HistoryPage.jsx]"]
  node_tools["Free tools<br/>[ToolsPage.jsx]"]
  node_about["About page<br/>[AboutPage.jsx]"]
  node_download["Report download<br/>[download-report.js]"]
  node_appshell["Application shell<br/>[AppShell.jsx]"]
  node_charting["Visual analytics<br/>[ReportView.jsx]"]
end

subgraph group_server["Check service"]
  node_server["HTTP server<br/>[index.js]"]
  node_routes["Check routes<br/>[routes.js]"]
  node_plagiarism["Check orchestration<br/>[plagiarism.js]"]
  node_search["Web search and fetch<br/>[search.js]"]
end

subgraph group_analysis["Matching and reports"]
  node_similarity["Similarity engine<br/>[similarity.js]"]
  node_schema["Input schema<br/>[schema.js]"]
  node_reportpdf["PDF report builder<br/>[pdf-report.js]"]
  node_sourcecolors["Source colors<br/>[source-colors.js]"]
end

subgraph group_history["History"]
  node_historydata[("History storage<br/>[history-store.js]")]
end

node_user(("User"))
node_web(("Public web pages"))

node_user -->|"opens"| node_app
node_app -->|"routes to"| node_checker
node_app -->|"routes to"| node_historypage
node_app -->|"routes to"| node_tools
node_app -->|"routes to"| node_about
node_app -->|"renders in"| node_appshell
node_checker -.->|"submits check"| node_routes
node_routes -->|"validates with"| node_schema
node_routes -->|"invokes"| node_plagiarism
node_plagiarism -->|"analyzes with"| node_similarity
node_plagiarism -->|"searches and fetches"| node_search
node_search -->|"queries and reads"| node_web
node_checker -->|"saves result"| node_historydata
node_checker -->|"renders results"| node_reportview
node_checker -->|"requests download"| node_download
node_download -.->|"generates PDF"| node_reportpdf
node_reportpdf -->|"formats highlights"| node_similarity
node_reportpdf -->|"colors sources"| node_sourcecolors
node_reportview -.->|"presents analytics"| node_charting
node_historypage -.->|"reads records"| node_historydata

click node_app "https://github.com/cu-sanjay/free-turnitin-plagiarism-checker/blob/main/client/src/App.jsx"
click node_checker "https://github.com/cu-sanjay/free-turnitin-plagiarism-checker/blob/main/client/src/pages/Index.jsx"
click node_reportview "https://github.com/cu-sanjay/free-turnitin-plagiarism-checker/blob/main/client/src/components/ReportView.jsx"
click node_historypage "https://github.com/cu-sanjay/free-turnitin-plagiarism-checker/blob/main/client/src/pages/HistoryPage.jsx"
click node_tools "https://github.com/cu-sanjay/free-turnitin-plagiarism-checker/blob/main/client/src/pages/ToolsPage.jsx"
click node_about "https://github.com/cu-sanjay/free-turnitin-plagiarism-checker/blob/main/client/src/pages/AboutPage.jsx"
click node_server "https://github.com/cu-sanjay/free-turnitin-plagiarism-checker/blob/main/server/index.js"
click node_routes "https://github.com/cu-sanjay/free-turnitin-plagiarism-checker/blob/main/server/routes.js"
click node_plagiarism "https://github.com/cu-sanjay/free-turnitin-plagiarism-checker/blob/main/server/plagiarism.js"
click node_search "https://github.com/cu-sanjay/free-turnitin-plagiarism-checker/blob/main/server/search.js"
click node_similarity "https://github.com/cu-sanjay/free-turnitin-plagiarism-checker/blob/main/shared/similarity.js"
click node_schema "https://github.com/cu-sanjay/free-turnitin-plagiarism-checker/blob/main/shared/schema.js"
click node_reportpdf "https://github.com/cu-sanjay/free-turnitin-plagiarism-checker/blob/main/shared/pdf-report.js"
click node_sourcecolors "https://github.com/cu-sanjay/free-turnitin-plagiarism-checker/blob/main/shared/source-colors.js"
click node_download "https://github.com/cu-sanjay/free-turnitin-plagiarism-checker/blob/main/client/src/lib/download-report.js"
click node_historydata "https://github.com/cu-sanjay/free-turnitin-plagiarism-checker/blob/main/shared/history-store.js"
click node_appshell "https://github.com/cu-sanjay/free-turnitin-plagiarism-checker/blob/main/client/src/components/AppShell.jsx"
click node_charting "https://github.com/cu-sanjay/free-turnitin-plagiarism-checker/blob/main/client/src/components/ReportView.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_checker,node_reportview,node_historypage,node_tools,node_about,node_download,node_appshell,node_charting,node_user toneBlue
class node_server,node_routes,node_plagiarism,node_search toneAmber
class node_similarity,node_schema,node_reportpdf,node_sourcecolors toneMint
class node_historydata toneRose
class node_web toneIndigo
```

## Components

### Client experience

- [App routes](https://github.com/cu-sanjay/free-turnitin-plagiarism-checker/blob/main/client/src/App.jsx): `client/src/App.jsx`
- [Document checker](https://github.com/cu-sanjay/free-turnitin-plagiarism-checker/blob/main/client/src/pages/Index.jsx): `client/src/pages/Index.jsx`
- [Report view](https://github.com/cu-sanjay/free-turnitin-plagiarism-checker/blob/main/client/src/components/ReportView.jsx): `client/src/components/ReportView.jsx`
- [History page](https://github.com/cu-sanjay/free-turnitin-plagiarism-checker/blob/main/client/src/pages/HistoryPage.jsx): `client/src/pages/HistoryPage.jsx`
- [Free tools](https://github.com/cu-sanjay/free-turnitin-plagiarism-checker/blob/main/client/src/pages/ToolsPage.jsx): `client/src/pages/ToolsPage.jsx`
- [About page](https://github.com/cu-sanjay/free-turnitin-plagiarism-checker/blob/main/client/src/pages/AboutPage.jsx): `client/src/pages/AboutPage.jsx`
- [Report download](https://github.com/cu-sanjay/free-turnitin-plagiarism-checker/blob/main/client/src/lib/download-report.js): `client/src/lib/download-report.js`
- [Application shell](https://github.com/cu-sanjay/free-turnitin-plagiarism-checker/blob/main/client/src/components/AppShell.jsx): `client/src/components/AppShell.jsx`
- [Visual analytics](https://github.com/cu-sanjay/free-turnitin-plagiarism-checker/blob/main/client/src/components/ReportView.jsx): `client/src/components/ReportView.jsx`

### Check service

- [HTTP server](https://github.com/cu-sanjay/free-turnitin-plagiarism-checker/blob/main/server/index.js): `server/index.js`
- [Check routes](https://github.com/cu-sanjay/free-turnitin-plagiarism-checker/blob/main/server/routes.js): `server/routes.js`
- [Check orchestration](https://github.com/cu-sanjay/free-turnitin-plagiarism-checker/blob/main/server/plagiarism.js): `server/plagiarism.js`
- [Web search and fetch](https://github.com/cu-sanjay/free-turnitin-plagiarism-checker/blob/main/server/search.js): `server/search.js`

### Matching and reports

- [Similarity engine](https://github.com/cu-sanjay/free-turnitin-plagiarism-checker/blob/main/shared/similarity.js): `shared/similarity.js`
- [Input schema](https://github.com/cu-sanjay/free-turnitin-plagiarism-checker/blob/main/shared/schema.js): `shared/schema.js`
- [PDF report builder](https://github.com/cu-sanjay/free-turnitin-plagiarism-checker/blob/main/shared/pdf-report.js): `shared/pdf-report.js`
- [Source colors](https://github.com/cu-sanjay/free-turnitin-plagiarism-checker/blob/main/shared/source-colors.js): `shared/source-colors.js`

### History

- [History storage](https://github.com/cu-sanjay/free-turnitin-plagiarism-checker/blob/main/shared/history-store.js): `shared/history-store.js`

### Other components

- **User**
- **Public web pages**

## Connections

- User → App routes: opens
- App routes → Document checker: routes to (evidence: `client/src/App.jsx`)
- App routes → History page: routes to (evidence: `client/src/App.jsx`)
- App routes → Free tools: routes to (evidence: `client/src/App.jsx`)
- App routes → About page: routes to (evidence: `client/src/App.jsx`)
- App routes → Application shell: renders in (evidence: `client/src/App.jsx`)
- Document checker → Check routes: submits check
- Check routes → Input schema: validates with (evidence: `server/routes.js`)
- Check routes → Check orchestration: invokes (evidence: `server/routes.js`)
- Check orchestration → Similarity engine: analyzes with (evidence: `server/plagiarism.js`)
- Check orchestration → Web search and fetch: searches and fetches (evidence: `server/plagiarism.js`)
- Web search and fetch → Public web pages: queries and reads (evidence: `server/search.js`)
- Document checker → History storage: saves result (evidence: `client/src/pages/Index.jsx`)
- Document checker → Report view: renders results (evidence: `client/src/pages/Index.jsx`)
- Document checker → Report download: requests download (evidence: `client/src/pages/Index.jsx`)
- Report download → PDF report builder: generates PDF
- PDF report builder → Similarity engine: formats highlights (evidence: `shared/pdf-report.js`)
- PDF report builder → Source colors: colors sources (evidence: `shared/pdf-report.js`)
- Report view → Visual analytics: presents analytics (evidence: `client/src/components/ReportView.jsx`)
- History page → History storage: reads records
