# erturk-dev/uyap-toplu-evrak-indirme architecture

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

- Interactive diagram: https://gitdiagram.com/erturk-dev/uyap-toplu-evrak-indirme
- Repository: https://github.com/erturk-dev/uyap-toplu-evrak-indirme

## Overview

UYAP Toplu Evrak İndirme is a browser extension that enhances UYAP’s document-list screen with a searchable, sortable, paginated table and bulk downloads. Users select documents, choose a folder layout, and start a paced download; the page-context adapter invokes UYAP’s existing download function, while the background script assigns downloaded files to organized paths. The README documents both flat and hierarchy-preserving layouts. Several responsibilities share the large content-script file; unsampled implementation details and their links are not inferred.

Main entry points: [`entrypoints/content.ts`](https://github.com/erturk-dev/uyap-toplu-evrak-indirme/blob/main/entrypoints/content.ts) (Bulk downloader), [`entrypoints/main-world.content.ts`](https://github.com/erturk-dev/uyap-toplu-evrak-indirme/blob/main/entrypoints/main-world.content.ts) (Page download adapter), [`entrypoints/background.ts`](https://github.com/erturk-dev/uyap-toplu-evrak-indirme/blob/main/entrypoints/background.ts) (Filename queue)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_portal_ui["Portal Interface"]
  node_extension_popup["Extension popup<br/>[main.ts]"]
  node_document_overlay["Document overlay<br/>[content.ts]"]
  node_document_table["Document table<br/>[content.ts]"]
end

subgraph group_download_flow["Download Flow"]
  node_bulk_download["Bulk downloader<br/>[content.ts]"]
  node_download_bridge["Download bridge<br/>[content.ts]"]
  node_page_adapter["Page download adapter"]
end

subgraph group_browser_io["Browser File Handling"]
  node_download_queue["Filename queue<br/>[background.ts]"]
end

node_user(("UYAP user"))
node_uyap["UYAP portal"]
node_browser_downloads["Browser downloads"]
node_local_files[("Organized local files")]

node_user -->|"opens documents"| node_uyap
node_uyap -->|"hosts enhancement"| node_document_overlay
node_document_overlay -->|"creates table"| node_document_table
node_user -->|"searches and selects"| node_document_table
node_document_table -->|"starts download"| node_bulk_download
node_bulk_download -->|"requests document"| node_download_bridge
node_download_bridge -->|"posts request"| node_page_adapter
node_page_adapter -->|"invokes downloadDoc"| node_uyap
node_page_adapter -->|"posts result"| node_download_bridge
node_bulk_download -->|"queues filename"| node_download_queue
node_download_queue -->|"suggests filename"| node_browser_downloads
node_browser_downloads -->|"saves file"| node_local_files

click node_extension_popup "https://github.com/erturk-dev/uyap-toplu-evrak-indirme/blob/main/entrypoints/popup/main.ts"
click node_document_overlay "https://github.com/erturk-dev/uyap-toplu-evrak-indirme/blob/main/entrypoints/content.ts"
click node_document_table "https://github.com/erturk-dev/uyap-toplu-evrak-indirme/blob/main/entrypoints/content.ts"
click node_bulk_download "https://github.com/erturk-dev/uyap-toplu-evrak-indirme/blob/main/entrypoints/content.ts"
click node_download_bridge "https://github.com/erturk-dev/uyap-toplu-evrak-indirme/blob/main/entrypoints/content.ts"
click node_page_adapter "https://github.com/erturk-dev/uyap-toplu-evrak-indirme/blob/main/entrypoints/main-world.content.ts"
click node_download_queue "https://github.com/erturk-dev/uyap-toplu-evrak-indirme/blob/main/entrypoints/background.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_extension_popup,node_document_overlay,node_document_table,node_user,node_browser_downloads toneBlue
class node_bulk_download,node_download_bridge,node_page_adapter,node_local_files toneAmber
class node_download_queue toneMint
class node_uyap toneIndigo
```

## Components

### Portal Interface

- [Extension popup](https://github.com/erturk-dev/uyap-toplu-evrak-indirme/blob/main/entrypoints/popup/main.ts): `entrypoints/popup/main.ts`
- [Document overlay](https://github.com/erturk-dev/uyap-toplu-evrak-indirme/blob/main/entrypoints/content.ts): `entrypoints/content.ts`
- [Document table](https://github.com/erturk-dev/uyap-toplu-evrak-indirme/blob/main/entrypoints/content.ts): `entrypoints/content.ts`

### Download Flow

- [Bulk downloader](https://github.com/erturk-dev/uyap-toplu-evrak-indirme/blob/main/entrypoints/content.ts): `entrypoints/content.ts`
- [Download bridge](https://github.com/erturk-dev/uyap-toplu-evrak-indirme/blob/main/entrypoints/content.ts): `entrypoints/content.ts`
- [Page download adapter](https://github.com/erturk-dev/uyap-toplu-evrak-indirme/blob/main/entrypoints/main-world.content.ts): `entrypoints/main-world.content.ts`

### Browser File Handling

- [Filename queue](https://github.com/erturk-dev/uyap-toplu-evrak-indirme/blob/main/entrypoints/background.ts): `entrypoints/background.ts`

### Other components

- **UYAP user**
- **UYAP portal**
- **Browser downloads**
- **Organized local files**

## Connections

- UYAP user → UYAP portal: opens documents (evidence: `README.md`)
- UYAP portal → Document overlay: hosts enhancement (evidence: `entrypoints/content.ts`)
- Document overlay → Document table: creates table (evidence: `entrypoints/content.ts`)
- UYAP user → Document table: searches and selects (evidence: `README.md`)
- Document table → Bulk downloader: starts download (evidence: `entrypoints/content.ts`)
- Bulk downloader → Download bridge: requests document (evidence: `entrypoints/content.ts`)
- Download bridge → Page download adapter: posts request (evidence: `entrypoints/content.ts`)
- Page download adapter → UYAP portal: invokes downloadDoc (evidence: `entrypoints/main-world.content.ts`)
- Page download adapter → Download bridge: posts result (evidence: `entrypoints/main-world.content.ts`)
- Bulk downloader → Filename queue: queues filename (evidence: `entrypoints/content.ts`)
- Filename queue → Browser downloads: suggests filename (evidence: `entrypoints/background.ts`)
- Browser downloads → Organized local files: saves file (evidence: `README.md`)
