# vovalitwinov2012-wq/all-pdf architecture

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

- Interactive diagram: https://gitdiagram.com/vovalitwinov2012-wq/all-pdf
- Repository: https://github.com/vovalitwinov2012-wq/all-pdf

## Overview

ALL PDF is a browser-based PDF toolkit, also offered as a Telegram Mini App. The user chooses a tool, supplies local files, runs an operation, then downloads its result; the README says files stay on-device. The app routes to specialized tool pages, which call PDF-processing code where shown. Major documented capabilities are retained, including tools whose implementations were not sampled. Edges are limited to README statements and source-index references; unsampled tool internals are not inferred.

Main entry points: [`src/App.tsx`](https://github.com/vovalitwinov2012-wq/all-pdf/blob/main/src/App.tsx) (Routed application), [`src/features/pdf-core/pdfOps.ts`](https://github.com/vovalitwinov2012-wq/all-pdf/blob/main/src/features/pdf-core/pdfOps.ts) (PDF operations), [`src/pages/tools/SignPage.tsx`](https://github.com/vovalitwinov2012-wq/all-pdf/blob/main/src/pages/tools/SignPage.tsx) (Sign documents), [`src/pages/tools/MergePage.tsx`](https://github.com/vovalitwinov2012-wq/all-pdf/blob/main/src/pages/tools/MergePage.tsx) (Merge and images to PDF)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and navigation"]
  node_app["Routed application<br/>[App.tsx]"]
  node_home["Tool selection<br/>[Home.tsx]"]
  node_result["Download result<br/>[ResultCard.tsx]"]
end

subgraph group_organize["Page and file tools"]
  node_merge["Merge and images to PDF<br/>[MergePage.tsx]"]
  node_split["Split pages<br/>[SplitPage.tsx]"]
  node_organizer["Organize pages<br/>[OrganizerPage.tsx]"]
end

subgraph group_read["Read and convert"]
  node_read_tools["View, export, OCR<br/>[ViewerPage.tsx]"]
  node_compare["Compare documents<br/>[ComparePage.tsx]"]
  node_tables["Extract tables<br/>[TablesPage.tsx]"]
  node_images["Extract images<br/>[ImagesPage.tsx]"]
end

subgraph group_edit["Edit and protect"]
  node_edit["Edit and annotate<br/>[EditPage.tsx]"]
  node_shapes["Draw shapes<br/>[ShapesPage.tsx]"]
  node_crop["Crop pages<br/>[CropPage.tsx]"]
  node_sign["Sign documents<br/>[SignPage.tsx]"]
  node_forms["Fill forms<br/>[FormsPage.tsx]"]
  node_compress["Compress PDF<br/>[CompressPage.tsx]"]
  node_protect["Protect and repair<br/>[ProtectPage.tsx]"]
end

subgraph group_core["PDF processing"]
  node_pdfops["PDF operations<br/>[pdfOps.ts]"]
  node_pages["Page operations<br/>[pages.ts]"]
  node_diff["Document diff<br/>[diff.ts]"]
  node_ranges["Page ranges<br/>[ranges.ts]"]
  node_tables_core["Table extraction<br/>[tables.ts]"]
  node_qpdf["PDF repair support<br/>[qpdf.ts]"]
  node_settings[("Browser preferences<br/>[settings.ts]")]
end

node_user(("User"))

node_user -->|"opens"| node_app
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_merge
node_app -->|"routes to"| node_split
node_app -->|"routes to"| node_organizer
node_app -->|"routes to"| node_read_tools
node_app -->|"routes to"| node_compare
node_app -->|"routes to"| node_tables
node_app -->|"routes to"| node_images
node_app -->|"routes to"| node_edit
node_app -->|"routes to"| node_shapes
node_app -->|"routes to"| node_crop
node_app -->|"routes to"| node_sign
node_app -->|"routes to"| node_forms
node_app -->|"routes to"| node_compress
node_app -->|"routes to"| node_protect
node_merge -->|"calls"| node_pdfops
node_organizer -->|"calls"| node_pdfops
node_compare -->|"calls"| node_diff
node_shapes -->|"calls"| node_pages
node_crop -->|"calls"| node_pdfops
node_sign -->|"stamps via"| node_pdfops
node_forms -->|"calls"| node_pdfops
node_compress -->|"calls"| node_pdfops
node_pdfops -->|"loads dynamically"| node_ranges
node_pdfops -->|"uses"| node_pages
node_sign -->|"reads and writes"| node_settings
node_user -->|"downloads"| node_result

click node_app "https://github.com/vovalitwinov2012-wq/all-pdf/blob/main/src/App.tsx"
click node_home "https://github.com/vovalitwinov2012-wq/all-pdf/blob/main/src/pages/Home.tsx"
click node_merge "https://github.com/vovalitwinov2012-wq/all-pdf/blob/main/src/pages/tools/MergePage.tsx"
click node_split "https://github.com/vovalitwinov2012-wq/all-pdf/blob/main/src/pages/tools/SplitPage.tsx"
click node_organizer "https://github.com/vovalitwinov2012-wq/all-pdf/blob/main/src/pages/tools/OrganizerPage.tsx"
click node_read_tools "https://github.com/vovalitwinov2012-wq/all-pdf/blob/main/src/pages/tools/ViewerPage.tsx"
click node_compare "https://github.com/vovalitwinov2012-wq/all-pdf/blob/main/src/pages/tools/ComparePage.tsx"
click node_tables "https://github.com/vovalitwinov2012-wq/all-pdf/blob/main/src/pages/tools/TablesPage.tsx"
click node_images "https://github.com/vovalitwinov2012-wq/all-pdf/blob/main/src/pages/tools/ImagesPage.tsx"
click node_edit "https://github.com/vovalitwinov2012-wq/all-pdf/blob/main/src/pages/tools/EditPage.tsx"
click node_shapes "https://github.com/vovalitwinov2012-wq/all-pdf/blob/main/src/pages/tools/ShapesPage.tsx"
click node_crop "https://github.com/vovalitwinov2012-wq/all-pdf/blob/main/src/pages/tools/CropPage.tsx"
click node_sign "https://github.com/vovalitwinov2012-wq/all-pdf/blob/main/src/pages/tools/SignPage.tsx"
click node_forms "https://github.com/vovalitwinov2012-wq/all-pdf/blob/main/src/pages/tools/FormsPage.tsx"
click node_compress "https://github.com/vovalitwinov2012-wq/all-pdf/blob/main/src/pages/tools/CompressPage.tsx"
click node_protect "https://github.com/vovalitwinov2012-wq/all-pdf/blob/main/src/pages/tools/ProtectPage.tsx"
click node_pdfops "https://github.com/vovalitwinov2012-wq/all-pdf/blob/main/src/features/pdf-core/pdfOps.ts"
click node_pages "https://github.com/vovalitwinov2012-wq/all-pdf/blob/main/src/features/pdf-core/pages.ts"
click node_diff "https://github.com/vovalitwinov2012-wq/all-pdf/blob/main/src/features/pdf-core/diff.ts"
click node_ranges "https://github.com/vovalitwinov2012-wq/all-pdf/blob/main/src/features/pdf-core/ranges.ts"
click node_tables_core "https://github.com/vovalitwinov2012-wq/all-pdf/blob/main/src/features/pdf-core/tables.ts"
click node_qpdf "https://github.com/vovalitwinov2012-wq/all-pdf/blob/main/src/features/pdf-core/qpdf.ts"
click node_settings "https://github.com/vovalitwinov2012-wq/all-pdf/blob/main/src/lib/settings.ts"
click node_result "https://github.com/vovalitwinov2012-wq/all-pdf/blob/main/src/components/ResultCard.tsx"

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_home,node_result,node_user toneBlue
class node_merge,node_split,node_organizer toneAmber
class node_read_tools,node_compare,node_tables,node_images toneMint
class node_edit,node_shapes,node_crop,node_sign,node_forms,node_compress,node_protect toneRose
class node_pdfops,node_pages,node_diff,node_ranges,node_tables_core,node_qpdf,node_settings toneIndigo
```

## Components

### App and navigation

- [Routed application](https://github.com/vovalitwinov2012-wq/all-pdf/blob/main/src/App.tsx): `src/App.tsx`
- [Tool selection](https://github.com/vovalitwinov2012-wq/all-pdf/blob/main/src/pages/Home.tsx): `src/pages/Home.tsx`
- [Download result](https://github.com/vovalitwinov2012-wq/all-pdf/blob/main/src/components/ResultCard.tsx): `src/components/ResultCard.tsx`

### Page and file tools

- [Merge and images to PDF](https://github.com/vovalitwinov2012-wq/all-pdf/blob/main/src/pages/tools/MergePage.tsx): `src/pages/tools/MergePage.tsx`
- [Split pages](https://github.com/vovalitwinov2012-wq/all-pdf/blob/main/src/pages/tools/SplitPage.tsx): `src/pages/tools/SplitPage.tsx`
- [Organize pages](https://github.com/vovalitwinov2012-wq/all-pdf/blob/main/src/pages/tools/OrganizerPage.tsx): `src/pages/tools/OrganizerPage.tsx`

### Read and convert

- [View, export, OCR](https://github.com/vovalitwinov2012-wq/all-pdf/blob/main/src/pages/tools/ViewerPage.tsx): `src/pages/tools/ViewerPage.tsx`
- [Compare documents](https://github.com/vovalitwinov2012-wq/all-pdf/blob/main/src/pages/tools/ComparePage.tsx): `src/pages/tools/ComparePage.tsx`
- [Extract tables](https://github.com/vovalitwinov2012-wq/all-pdf/blob/main/src/pages/tools/TablesPage.tsx): `src/pages/tools/TablesPage.tsx`
- [Extract images](https://github.com/vovalitwinov2012-wq/all-pdf/blob/main/src/pages/tools/ImagesPage.tsx): `src/pages/tools/ImagesPage.tsx`

### Edit and protect

- [Edit and annotate](https://github.com/vovalitwinov2012-wq/all-pdf/blob/main/src/pages/tools/EditPage.tsx): `src/pages/tools/EditPage.tsx`
- [Draw shapes](https://github.com/vovalitwinov2012-wq/all-pdf/blob/main/src/pages/tools/ShapesPage.tsx): `src/pages/tools/ShapesPage.tsx`
- [Crop pages](https://github.com/vovalitwinov2012-wq/all-pdf/blob/main/src/pages/tools/CropPage.tsx): `src/pages/tools/CropPage.tsx`
- [Sign documents](https://github.com/vovalitwinov2012-wq/all-pdf/blob/main/src/pages/tools/SignPage.tsx): `src/pages/tools/SignPage.tsx`
- [Fill forms](https://github.com/vovalitwinov2012-wq/all-pdf/blob/main/src/pages/tools/FormsPage.tsx): `src/pages/tools/FormsPage.tsx`
- [Compress PDF](https://github.com/vovalitwinov2012-wq/all-pdf/blob/main/src/pages/tools/CompressPage.tsx): `src/pages/tools/CompressPage.tsx`
- [Protect and repair](https://github.com/vovalitwinov2012-wq/all-pdf/blob/main/src/pages/tools/ProtectPage.tsx): `src/pages/tools/ProtectPage.tsx`

### PDF processing

- [PDF operations](https://github.com/vovalitwinov2012-wq/all-pdf/blob/main/src/features/pdf-core/pdfOps.ts): `src/features/pdf-core/pdfOps.ts`
- [Page operations](https://github.com/vovalitwinov2012-wq/all-pdf/blob/main/src/features/pdf-core/pages.ts): `src/features/pdf-core/pages.ts`
- [Document diff](https://github.com/vovalitwinov2012-wq/all-pdf/blob/main/src/features/pdf-core/diff.ts): `src/features/pdf-core/diff.ts`
- [Page ranges](https://github.com/vovalitwinov2012-wq/all-pdf/blob/main/src/features/pdf-core/ranges.ts): `src/features/pdf-core/ranges.ts`
- [Table extraction](https://github.com/vovalitwinov2012-wq/all-pdf/blob/main/src/features/pdf-core/tables.ts): `src/features/pdf-core/tables.ts`
- [PDF repair support](https://github.com/vovalitwinov2012-wq/all-pdf/blob/main/src/features/pdf-core/qpdf.ts): `src/features/pdf-core/qpdf.ts`
- [Browser preferences](https://github.com/vovalitwinov2012-wq/all-pdf/blob/main/src/lib/settings.ts): `src/lib/settings.ts`

### Other components

- **User**

## Connections

- User → Routed application: opens
- Routed application → Tool selection: routes to (evidence: `src/App.tsx`)
- Routed application → Merge and images to PDF: routes to (evidence: `src/App.tsx`)
- Routed application → Split pages: routes to (evidence: `src/App.tsx`)
- Routed application → Organize pages: routes to (evidence: `src/App.tsx`)
- Routed application → View, export, OCR: routes to (evidence: `src/App.tsx`)
- Routed application → Compare documents: routes to (evidence: `src/App.tsx`)
- Routed application → Extract tables: routes to (evidence: `src/App.tsx`)
- Routed application → Extract images: routes to (evidence: `src/App.tsx`)
- Routed application → Edit and annotate: routes to (evidence: `src/App.tsx`)
- Routed application → Draw shapes: routes to (evidence: `src/App.tsx`)
- Routed application → Crop pages: routes to (evidence: `src/App.tsx`)
- Routed application → Sign documents: routes to (evidence: `src/App.tsx`)
- Routed application → Fill forms: routes to (evidence: `src/App.tsx`)
- Routed application → Compress PDF: routes to (evidence: `src/App.tsx`)
- Routed application → Protect and repair: routes to (evidence: `src/App.tsx`)
- Merge and images to PDF → PDF operations: calls (evidence: `src/pages/tools/MergePage.tsx`)
- Organize pages → PDF operations: calls (evidence: `src/pages/tools/OrganizerPage.tsx`)
- Compare documents → Document diff: calls (evidence: `src/pages/tools/ComparePage.tsx`)
- Draw shapes → Page operations: calls (evidence: `src/pages/tools/ShapesPage.tsx`)
- Crop pages → PDF operations: calls (evidence: `src/pages/tools/CropPage.tsx`)
- Sign documents → PDF operations: stamps via (evidence: `src/pages/tools/SignPage.tsx`)
- Fill forms → PDF operations: calls (evidence: `src/pages/tools/FormsPage.tsx`)
- Compress PDF → PDF operations: calls (evidence: `src/pages/tools/CompressPage.tsx`)
- PDF operations → Page ranges: loads dynamically (evidence: `src/features/pdf-core/pdfOps.ts`)
- PDF operations → Page operations: uses (evidence: `src/pages/tools/CompressPage.tsx`)
- Sign documents → Browser preferences: reads and writes (evidence: `src/pages/tools/SignPage.tsx`)
- User → Download result: downloads
