# ioriod/pdfsearcher architecture

> Architecture diagram of the GitHub repository ioriod/pdfsearcher, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-23). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ioriod/pdfsearcher
- Repository: https://github.com/ioriod/pdfsearcher

## Overview

##### Project type and purpose
- This is a standalone desktop Java application (“pdf-search.jar”) that provides a GUI for fast term search across one or many PDF files.
- Key indicators: a small Maven project (pom.xml), classes under com.pdfsearch, a GUI class, a searcher class, and a README showing GUI usage and launch scripts.

##### File structure
- Top-level scripts and config:
- compile_and_start_search.bat / start_search.bat – build & run on Windows
- pom.xml – Maven build descriptor
- src/main/java/com/pdfsearch:
- PdfSearchApplication.java – main application entry point
- PdfSearchGui.java – presentation layer (Swing/JavaFX)
- PdfSearcher.java – business logic / search engine
- src/main/resources: log4j.properties, log4j2.xml – logging configuration
- target/… contains compiled classes & the runnable JAR

##### README for additional insights
- Describes build (`mvn clean install`) and run (`java -jar …pdf-search.jar`) commands
- Mentions an interactive GUI with a results table that opens files on double-click

##### Detail and coverage
- Major classes and external systems (PDF library, file system, logging)
- Don’t over-engineer—simply break the project into its logical layers and flows

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% External User
    User["User (Desktop)"]:::external

    %% Presentation Layer
    subgraph "Presentation Layer"
        PdfSearchGui["PdfSearchGui"]:::presentation
    end

    %% Application Layer
    subgraph "Application Layer"
        PdfSearchApplication["PdfSearchApplication"]:::application
    end

    %% Business Logic Layer
    subgraph "Business Logic Layer"
        PdfSearcher["PdfSearcher"]:::business
    end

    %% Infrastructure Layer
    subgraph "Infrastructure"
        PDFParsingLibrary["PDF Parsing Library"]:::infrastructure
        FileSystem["File System"]:::infrastructure
        LoggingSubsystem["Logging Subsystem"]:::infrastructure
    end

    %% Build & Deployment
    subgraph "Build & Deployment"
        Maven["Maven (pom.xml)"]:::external
        compileBat["compile_and_start_search.bat"]:::external
        startBat["start_search.bat"]:::external
        JARArtifact["pdf-search.jar"]:::external
        ClassesOutput["Compiled Classes (target/classes/com/pdfsearch)"]:::external
        README["README.md"]:::external
    end

    %% Connections
    User -->|"enter search term"| PdfSearchGui
    PdfSearchGui -->|"invoke search"| PdfSearchApplication
    PdfSearchApplication -->|"calls search()"| PdfSearcher
    PdfSearcher -->|"uses parser"| PDFParsingLibrary
    PdfSearcher -->|"reads files"| FileSystem
    User -->|"opens file"| FileSystem
    PdfSearchGui -->|"log events"| LoggingSubsystem
    PdfSearchApplication -->|"log events"| LoggingSubsystem
    PdfSearcher -->|"log events"| LoggingSubsystem

    Maven -->|"build artifact"| ClassesOutput
    ClassesOutput -->|"package jar"| JARArtifact
    compileBat -->|"build & run"| JARArtifact
    startBat -->|"run jar"| JARArtifact
    README -->|"docs"| compileBat

    %% Click Events
    click PdfSearchGui "https://github.com/ioriod/pdfsearcher/blob/main/src/main/java/com/pdfsearch/PdfSearchGui.java"
    click PdfSearchApplication "https://github.com/ioriod/pdfsearcher/blob/main/src/main/java/com/pdfsearch/PdfSearchApplication.java"
    click PdfSearcher "https://github.com/ioriod/pdfsearcher/blob/main/src/main/java/com/pdfsearch/PdfSearcher.java"
    click log4jProps "https://github.com/ioriod/pdfsearcher/blob/main/src/main/resources/log4j.properties"
    click log4j2 "https://github.com/ioriod/pdfsearcher/blob/main/src/main/resources/log4j2.xml"
    click pom "https://github.com/ioriod/pdfsearcher/blob/main/pom.xml"
    click compileBat "https://github.com/ioriod/pdfsearcher/blob/main/compile_and_start_search.bat"
    click startBat "https://github.com/ioriod/pdfsearcher/blob/main/start_search.bat"
    click jar "https://github.com/ioriod/pdfsearcher/blob/main/target/pdf-search.jar"
    click classesDir "https://github.com/ioriod/pdfsearcher/tree/main/target/classes/com/pdfsearch"
    click readme "https://github.com/ioriod/pdfsearcher/blob/main/README.md"

    %% Styles
    classDef presentation fill:#ADD8E6,stroke:#000;
    classDef application fill:#90EE90,stroke:#000;
    classDef business fill:#98FB98,stroke:#000;
    classDef infrastructure fill:#D3D3D3,stroke:#000;
    classDef external fill:#FFA500,stroke:#000;
```
