# nouralhaddad/app_pdf_merger architecture

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

- Interactive diagram: https://gitdiagram.com/nouralhaddad/app_pdf_merger
- Repository: https://github.com/nouralhaddad/app_pdf_merger

## Overview

This is a small command-line PDF merger. The user runs `run.py`, which selects the input and output directories and calls the merger; the merger sorts PDFs, combines them with pypdf, and writes a timestamped result. The README documents these directories and the run command. The graph is limited to the sampled entry point and merger implementation; input and output folders are runtime data, not repository modules.

Main entry points: [`src/merge_pdfs.py`](https://github.com/nouralhaddad/app_pdf_merger/blob/master/src/merge_pdfs.py) (PDF merger), [`run.py`](https://github.com/nouralhaddad/app_pdf_merger/blob/master/run.py) (Command entry point)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("User"))
node_runner["Command entry point<br/>[run.py]"]
node_merger["PDF merger<br/>[merge_pdfs.py]"]
node_inputs["Input PDFs"]
node_outputs["Merged PDF"]
node_pypdf["pypdf library"]

node_user -->|"runs"| node_runner
node_runner -->|"calls"| node_merger
node_merger -->|"reads"| node_inputs
node_merger -->|"appends pages"| node_pypdf
node_merger -->|"writes timestamped"| node_outputs

click node_runner "https://github.com/nouralhaddad/app_pdf_merger/blob/master/run.py"
click node_merger "https://github.com/nouralhaddad/app_pdf_merger/blob/master/src/merge_pdfs.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_user toneBlue
class node_runner,node_merger toneTeal
class node_inputs,node_outputs,node_pypdf toneIndigo
```

## Components

### Other components

- **User**
- [Command entry point](https://github.com/nouralhaddad/app_pdf_merger/blob/master/run.py): `run.py`
- [PDF merger](https://github.com/nouralhaddad/app_pdf_merger/blob/master/src/merge_pdfs.py): `src/merge_pdfs.py`
- **Input PDFs**
- **Merged PDF**
- **pypdf library**

## Connections

- User → Command entry point: runs (evidence: `README.md`)
- Command entry point → PDF merger: calls (evidence: `run.py`)
- PDF merger → Input PDFs: reads (evidence: `src/merge_pdfs.py`)
- PDF merger → pypdf library: appends pages (evidence: `src/merge_pdfs.py`)
- PDF merger → Merged PDF: writes timestamped (evidence: `src/merge_pdfs.py`)
