# b84955189/thesissummarizing architecture

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

- Interactive diagram: https://gitdiagram.com/b84955189/thesissummarizing
- Repository: https://github.com/b84955189/thesissummarizing

## Overview

##### Main Components
- User Interface (GUI): Represented by the “gui” folder and its main component (gui/gui.py). This is the entry point for the user interaction.
- Application Controller: The “main.py” file acts as the orchestrator. It initiates the process and calls other modules.
- Functionality Modules: The “func” directory, containing CommonTools.py, ExcelFunc.py, and WordFunc.py, houses the business logic to convert Excel data into Word outputs.
- Domain Models and Configuration: The “model” folder holds modules for configuration (Config.py), enumerations (EnumModels.py), exceptions (ExceptionModels.py) and rating models (RatingModels.py) – components that represent the core data and error behavior.
- Template Resources: The “template” folder provides all required templates (Word and Excel documents) that define the result file formats.
- External Libraries & Packaging: Note dependencies like openpyxl (for Excel) and python-docx (for Word) – along with PyInstaller used for packaging.

##### Relationships and Interactions
- The “func” modules should be shown interacting with the “model” modules for configuration and error handling.
- That “template” resources are read from by the “func” modules for file generation.
- Optionally, include a packaging component that wraps the whole system using PyInstaller based on the provided spec file.

##### Architectural Patterns and Design Principles
- The project follows a layered approach – a clear separation between the GUI (presentation layer), application logic (controller layer provided by main.py and the func modules), and domain models (model package).
- This separation promotes maintainability and modularity, as each major function (data processing, configuration, error handling) is isolated.
- External integration via well-known libraries (openpyxl and python-docx) is also visible.
- The packaging process is a key design aspect that allows the project to be distributed as a standalone executable.

##### Relevant Technologies and Libraries
- Python (core language)
- Tkinter (GUI framework)
- openpyxl (Excel processing)
- python-docx (Word document manipulation)
- PyInstaller (for packaging/distribution)

##### Extra Detail and Clarity
- Annotations near each component explaining its role.
- Use a neat layout – for example, arrange the GUI at the top or left, the Main Controller centrally, and the supporting components (func, model, templates, libraries) arrayed logically around the center.
- Packaging aspect (PyInstaller) is shown as an additional post-development step that encapsulates the entire system.

## Diagram (Mermaid)

```mermaid
flowchart TD
    GUI["User Interface (Tkinter Designer)"]
    main["Main Controller (main.py)"]
    util["Utility Functions (func)"]
    domain["Domain Models (model)"]
    template["Templates (template)"]
    ext["External Libraries (openpyxl,python-docx)"]
    pkg["Packaging (PyInstaller)"]

    GUI -->|"triggers"| main
    main -->|"calls_logic"| util
    main -->|"loads_config"| domain
    util <-->|"config&error_handling"| domain
    util -->|"reads_templates"| template
    util -->|"process_files"| ext
    main -->|"builds_executable"| pkg

    click GUI "https://github.com/b84955189/thesissummarizing/blob/master/gui/gui.py"
    click main "https://github.com/b84955189/thesissummarizing/blob/master/main.py"
    click util "https://github.com/b84955189/thesissummarizing/tree/master/func/"
    click domain "https://github.com/b84955189/thesissummarizing/tree/master/model/"
    click template "https://github.com/b84955189/thesissummarizing/tree/master/template/"
    click pkg "https://github.com/b84955189/thesissummarizing/blob/master/pack-config-template.spec"

    classDef gui fill:#ffcccc,stroke:#333,stroke-width:2px;
    classDef controller fill:#ccffcc,stroke:#333,stroke-width:2px;
    classDef util fill:#cceeff,stroke:#333,stroke-width:2px;
    classDef domain fill:#ffe6cc,stroke:#333,stroke-width:2px;
    classDef template fill:#e6ffe6,stroke:#333,stroke-width:2px;
    classDef external fill:#f0e68c,stroke:#333,stroke-width:2px;
    classDef packaging fill:#d3d3d3,stroke:#333,stroke-width:2px;

    class GUI gui;
    class main controller;
    class util util;
    class domain domain;
    class template template;
    class ext external;
    class pkg packaging;
```
