# kenezu17/cvtx architecture

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

- Interactive diagram: https://gitdiagram.com/kenezu17/cvtx
- Repository: https://github.com/kenezu17/cvtx

## Overview

ConvertX is a web file-conversion product: a user selects a file and target format, the frontend validates and submits it, the backend dispatches to a format-specific converter, and the user downloads the result. The README documents PDF/DOCX, image/PDF, CSV/XLSX, and Excel/PDF capabilities; the router also defines PDF/XLSX and PDF/image routes. Relationships are limited to calls or composition shown in excerpts and the source index; converter internals not excerpted are represented without speculative wiring.

Main entry points: [`backend/app/routers/convert.py`](https://github.com/kenezu17/cvtx/blob/main/backend/app/routers/convert.py) (Conversion endpoint), [`ConvertX/src/components/upload/FileUpload.jsx`](https://github.com/kenezu17/cvtx/blob/main/ConvertX/src/components/upload/FileUpload.jsx) (Upload and convert), [`ConvertX/src/services/api.js`](https://github.com/kenezu17/cvtx/blob/main/ConvertX/src/services/api.js) (API client), [`backend/app/routers/download.py`](https://github.com/kenezu17/cvtx/blob/main/backend/app/routers/download.py) (Download endpoint)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Frontend experience"]
  node_app["React app entry<br/>[main.jsx]"]
  node_home["Home screen<br/>[Home.jsx]"]
  node_upload["Upload and convert<br/>[FileUpload.jsx]"]
  node_preview["File preview<br/>[FilePreview.jsx]"]
  node_options["Format options"]
  node_progress["Progress display<br/>[ProgressBar.jsx]"]
  node_download_button["Download control<br/>[DownloadBtn.jsx]"]
  node_download_client["Download client<br/>[DownloadFile.js]"]
  node_api_client["API client<br/>[api.js]"]
end

subgraph group_backend["Conversion API"]
  node_api["FastAPI application<br/>[main.py]"]
  node_convert_route["Conversion endpoint<br/>[convert.py]"]
  node_download_route["Download endpoint<br/>[download.py]"]
  node_auth["API key check<br/>[dependencies.py]"]
end

subgraph group_converters["Conversion engines"]
  node_pdf_engine["PDF conversions<br/>[pdf_convert.py]"]
  node_docx_engine["DOCX conversion<br/>[docs_convert.py]"]
  node_image_engine["Image conversion<br/>[image_convert.py]"]
  node_excel_engine["Excel conversion<br/>[execel.py]"]
  node_csv_engine["CSV conversion<br/>[csv.py]"]
  node_zip["Image ZIP packaging<br/>[zip_utils.py]"]
end

subgraph group_temporary["Temporary file handling"]
  node_file_store[("Upload and output files<br/>[convert.py]")]
  node_cleanup["Automatic cleanup<br/>[cleanup.py]"]
end

node_user(("File user"))

node_user -->|"opens interface"| node_app
node_app -->|"renders"| node_home
node_home -->|"renders"| node_upload
node_user -.->|"selects file"| node_upload
node_upload -->|"renders"| node_preview
node_upload -->|"renders"| node_options
node_upload -->|"renders"| node_progress
node_upload -->|"renders"| node_download_button
node_upload -->|"posts conversion"| node_api_client
node_download_button -->|"invokes"| node_download_client
node_download_client -->|"requests file"| node_api_client
node_api_client -.->|"sends conversion request"| node_convert_route
node_api_client -.->|"requests download"| node_download_route
node_api -->|"registers route"| node_convert_route
node_api -->|"registers route"| node_download_route
node_api -->|"starts worker"| node_cleanup
node_convert_route -->|"checks API key"| node_auth
node_convert_route -->|"dispatches PDF jobs"| node_pdf_engine
node_convert_route -->|"dispatches DOCX jobs"| node_docx_engine
node_convert_route -->|"dispatches image jobs"| node_image_engine
node_convert_route -->|"dispatches Excel jobs"| node_excel_engine
node_convert_route -->|"dispatches CSV jobs"| node_csv_engine
node_convert_route -->|"packages image output"| node_zip
node_convert_route -->|"writes conversion files"| node_file_store
node_download_route -->|"checks API key"| node_auth
node_download_route -->|"reads output files"| node_file_store
node_cleanup -.->|"removes expired files"| node_file_store

click node_app "https://github.com/kenezu17/cvtx/blob/main/ConvertX/src/main.jsx"
click node_home "https://github.com/kenezu17/cvtx/blob/main/ConvertX/src/page/Home.jsx"
click node_upload "https://github.com/kenezu17/cvtx/blob/main/ConvertX/src/components/upload/FileUpload.jsx"
click node_preview "https://github.com/kenezu17/cvtx/blob/main/ConvertX/src/components/upload/FilePreview.jsx"
click node_options "https://github.com/kenezu17/cvtx/blob/main/ConvertX/src/components/converter/ConvertOptionBtn.jsx"
click node_progress "https://github.com/kenezu17/cvtx/blob/main/ConvertX/src/components/upload/ProgressBar.jsx"
click node_download_button "https://github.com/kenezu17/cvtx/blob/main/ConvertX/src/components/converter/DownloadBtn.jsx"
click node_download_client "https://github.com/kenezu17/cvtx/blob/main/ConvertX/src/utils/DownloadFile.js"
click node_api_client "https://github.com/kenezu17/cvtx/blob/main/ConvertX/src/services/api.js"
click node_api "https://github.com/kenezu17/cvtx/blob/main/backend/app/main.py"
click node_convert_route "https://github.com/kenezu17/cvtx/blob/main/backend/app/routers/convert.py"
click node_download_route "https://github.com/kenezu17/cvtx/blob/main/backend/app/routers/download.py"
click node_auth "https://github.com/kenezu17/cvtx/blob/main/backend/app/dependencies.py"
click node_pdf_engine "https://github.com/kenezu17/cvtx/blob/main/backend/app/services/pdf_convert.py"
click node_docx_engine "https://github.com/kenezu17/cvtx/blob/main/backend/app/services/docs_convert.py"
click node_image_engine "https://github.com/kenezu17/cvtx/blob/main/backend/app/services/image_convert.py"
click node_excel_engine "https://github.com/kenezu17/cvtx/blob/main/backend/app/services/execel.py"
click node_csv_engine "https://github.com/kenezu17/cvtx/blob/main/backend/app/services/csv.py"
click node_zip "https://github.com/kenezu17/cvtx/blob/main/backend/app/utils/zip_utils.py"
click node_file_store "https://github.com/kenezu17/cvtx/blob/main/backend/app/routers/convert.py"
click node_cleanup "https://github.com/kenezu17/cvtx/blob/main/backend/app/services/cleanup.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_app,node_home,node_upload,node_preview,node_options,node_progress,node_download_button,node_download_client,node_api_client,node_user toneBlue
class node_api,node_convert_route,node_download_route,node_auth toneAmber
class node_pdf_engine,node_docx_engine,node_image_engine,node_excel_engine,node_csv_engine,node_zip toneMint
class node_file_store,node_cleanup toneRose
```

## Components

### Frontend experience

- [React app entry](https://github.com/kenezu17/cvtx/blob/main/ConvertX/src/main.jsx): `ConvertX/src/main.jsx`
- [Home screen](https://github.com/kenezu17/cvtx/blob/main/ConvertX/src/page/Home.jsx): `ConvertX/src/page/Home.jsx`
- [Upload and convert](https://github.com/kenezu17/cvtx/blob/main/ConvertX/src/components/upload/FileUpload.jsx): `ConvertX/src/components/upload/FileUpload.jsx`
- [File preview](https://github.com/kenezu17/cvtx/blob/main/ConvertX/src/components/upload/FilePreview.jsx): `ConvertX/src/components/upload/FilePreview.jsx`
- [Format options](https://github.com/kenezu17/cvtx/blob/main/ConvertX/src/components/converter/ConvertOptionBtn.jsx): `ConvertX/src/components/converter/ConvertOptionBtn.jsx`
- [Progress display](https://github.com/kenezu17/cvtx/blob/main/ConvertX/src/components/upload/ProgressBar.jsx): `ConvertX/src/components/upload/ProgressBar.jsx`
- [Download control](https://github.com/kenezu17/cvtx/blob/main/ConvertX/src/components/converter/DownloadBtn.jsx): `ConvertX/src/components/converter/DownloadBtn.jsx`
- [Download client](https://github.com/kenezu17/cvtx/blob/main/ConvertX/src/utils/DownloadFile.js): `ConvertX/src/utils/DownloadFile.js`
- [API client](https://github.com/kenezu17/cvtx/blob/main/ConvertX/src/services/api.js): `ConvertX/src/services/api.js`

### Conversion API

- [FastAPI application](https://github.com/kenezu17/cvtx/blob/main/backend/app/main.py): `backend/app/main.py`
- [Conversion endpoint](https://github.com/kenezu17/cvtx/blob/main/backend/app/routers/convert.py): `backend/app/routers/convert.py`
- [Download endpoint](https://github.com/kenezu17/cvtx/blob/main/backend/app/routers/download.py): `backend/app/routers/download.py`
- [API key check](https://github.com/kenezu17/cvtx/blob/main/backend/app/dependencies.py): `backend/app/dependencies.py`

### Conversion engines

- [PDF conversions](https://github.com/kenezu17/cvtx/blob/main/backend/app/services/pdf_convert.py): `backend/app/services/pdf_convert.py`
- [DOCX conversion](https://github.com/kenezu17/cvtx/blob/main/backend/app/services/docs_convert.py): `backend/app/services/docs_convert.py`
- [Image conversion](https://github.com/kenezu17/cvtx/blob/main/backend/app/services/image_convert.py): `backend/app/services/image_convert.py`
- [Excel conversion](https://github.com/kenezu17/cvtx/blob/main/backend/app/services/execel.py): `backend/app/services/execel.py`
- [CSV conversion](https://github.com/kenezu17/cvtx/blob/main/backend/app/services/csv.py): `backend/app/services/csv.py`
- [Image ZIP packaging](https://github.com/kenezu17/cvtx/blob/main/backend/app/utils/zip_utils.py): `backend/app/utils/zip_utils.py`

### Temporary file handling

- [Upload and output files](https://github.com/kenezu17/cvtx/blob/main/backend/app/routers/convert.py): `backend/app/routers/convert.py`
- [Automatic cleanup](https://github.com/kenezu17/cvtx/blob/main/backend/app/services/cleanup.py): `backend/app/services/cleanup.py`

### Other components

- **File user**

## Connections

- File user → React app entry: opens interface (evidence: `ConvertX/src/main.jsx`)
- React app entry → Home screen: renders
- Home screen → Upload and convert: renders (evidence: `ConvertX/src/page/Home.jsx`)
- File user → Upload and convert: selects file
- Upload and convert → File preview: renders (evidence: `ConvertX/src/components/upload/FileUpload.jsx`)
- Upload and convert → Format options: renders (evidence: `ConvertX/src/components/upload/FileUpload.jsx`)
- Upload and convert → Progress display: renders (evidence: `ConvertX/src/components/upload/FileUpload.jsx`)
- Upload and convert → Download control: renders (evidence: `ConvertX/src/components/upload/FileUpload.jsx`)
- Upload and convert → API client: posts conversion (evidence: `ConvertX/src/components/upload/FileUpload.jsx`)
- Download control → Download client: invokes (evidence: `ConvertX/src/components/converter/DownloadBtn.jsx`)
- Download client → API client: requests file (evidence: `ConvertX/src/utils/DownloadFile.js`)
- API client → Conversion endpoint: sends conversion request
- API client → Download endpoint: requests download
- FastAPI application → Conversion endpoint: registers route (evidence: `backend/app/main.py`)
- FastAPI application → Download endpoint: registers route (evidence: `backend/app/main.py`)
- FastAPI application → Automatic cleanup: starts worker (evidence: `backend/app/main.py`)
- Conversion endpoint → API key check: checks API key (evidence: `backend/app/routers/convert.py`)
- Conversion endpoint → PDF conversions: dispatches PDF jobs (evidence: `backend/app/routers/convert.py`)
- Conversion endpoint → DOCX conversion: dispatches DOCX jobs (evidence: `backend/app/routers/convert.py`)
- Conversion endpoint → Image conversion: dispatches image jobs (evidence: `backend/app/routers/convert.py`)
- Conversion endpoint → Excel conversion: dispatches Excel jobs (evidence: `backend/app/routers/convert.py`)
- Conversion endpoint → CSV conversion: dispatches CSV jobs (evidence: `backend/app/routers/convert.py`)
- Conversion endpoint → Image ZIP packaging: packages image output (evidence: `backend/app/routers/convert.py`)
- Conversion endpoint → Upload and output files: writes conversion files (evidence: `backend/app/routers/convert.py`)
- Download endpoint → API key check: checks API key (evidence: `backend/app/routers/download.py`)
- Download endpoint → Upload and output files: reads output files (evidence: `backend/app/routers/download.py`)
- Automatic cleanup → Upload and output files: removes expired files
