# richardffrank/excel-to-ppt architecture

> Architecture diagram of the GitHub repository richardffrank/excel-to-ppt, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-07-31). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/richardffrank/excel-to-ppt
- Repository: https://github.com/richardffrank/excel-to-ppt

## Overview

##### Project type and purpose
- This is a standalone Python desktop tool (“Excel-to-PPT”) that reads a user-provided Excel workbook and a PowerPoint template and produces a finished .pptx output.

##### File structure
- Top level:
- Assets/ – contains constants, sample Excel & PPTX templates
- Transformations/ – core business logic modules (Classes.py, Excel.py, Mapping.py, PowerPoint.py)
- UserInterface.py – GUI code
- startup.py – application entry-point (also used by PyInstaller)
- requirements.txt – dependencies (e.g., pandas, openpyxl, python-pptx)
- No microservices—this is a monolith with a clear logical layering.

##### Main components and interactions
a. User Interface (UserInterface.py + startup.py)
– Shows file pickers for Excel & PPTX template
– Triggers the transformation pipeline
b. Asset Store (Assets/)
– Excel template (.xlsx)
– PPTX template (.pptx)
– Constants.py (annotation keys)
c. Excel Parser (Transformations/Excel.py)
– Reads Excel sheet rows into in-memory data structures
– Uses pandas or openpyxl
d. Mapping & Data Models (Transformations/Mapping.py + Transformations/Classes.py)
– Transforms raw Excel rows to a list of “SlideData” objects
– Validates Slide ID, Slide Type, Content Location, Content
e. PPTX Generator (Transformations/PowerPoint.py)
f. External Libraries
– pandas/openpyxl for Excel I/O
– python-pptx for PowerPoint manipulation
– PyInstaller (optional) for bundling

##### Architectural patterns & design principles
- Layered architecture:
- Presentation layer (UI)
- Business logic layer (Transformations modules)
- Data layer (file I/O & templates)
- Single-responsibility: each module has a clear job (parsing vs. mapping vs. generating).
- Sequential pipeline: UI → Excel Parser → Mapper → PPT Generator → File output.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Layers and Components

    subgraph "Presentation Layer"
        start["startup.py"]:::presentation
        UI["UserInterface.py"]:::presentation
    end

    subgraph "Business Logic Layer"
        parser["Excel Parser\n(openpyxl/pandas)\nTransformations/Excel.py"]:::business
        mapping["Mapping & Data Models\n(Transformations/Mapping.py & Classes.py)"]:::business
        pptgen["PowerPoint Generator\n(Transformations/PowerPoint.py)"]:::business
    end

    subgraph "Data & Templates"
        constants["Constants.py"]:::data
        excelTemplate["Sample_Excel_Template.xlsx"]:::data
        pptTemplate["Sample_PowerPoint_Template.pptx"]:::data
        Save["Save Output (.pptx)"]:::data
    end

    external["Dependencies\nrequirements.txt"]:::external

    %% Connections
    start --> UI
    UI -->|"load input.xlsx"| parser
    parser -->|"raw rows"| mapping
    mapping -->|"SlideData objects"| pptgen
    pptgen -->|"open template.pptx"| pptTemplate
    pptgen -->|"use constants"| constants
    pptgen -->|"save output.pptx"| Save
    parser -->|"uses libraries"| external
    pptgen -->|"uses libraries"| external

    %% Click events
    click start "https://github.com/richardffrank/excel-to-ppt/blob/main/startup.py"
    click UI "https://github.com/richardffrank/excel-to-ppt/blob/main/UserInterface.py"
    click parser "https://github.com/richardffrank/excel-to-ppt/blob/main/Transformations/Excel.py"
    click mapping "https://github.com/richardffrank/excel-to-ppt/blob/main/Transformations/Mapping.py"
    click mapping "https://github.com/richardffrank/excel-to-ppt/blob/main/Transformations/Classes.py"
    click pptgen "https://github.com/richardffrank/excel-to-ppt/blob/main/Transformations/PowerPoint.py"
    click constants "https://github.com/richardffrank/excel-to-ppt/blob/main/Assets/Constants.py"
    click excelTemplate "https://github.com/richardffrank/excel-to-ppt/blob/main/Assets/Sample_Excel_Template.xlsx"
    click pptTemplate "https://github.com/richardffrank/excel-to-ppt/blob/main/Assets/Sample_PowerPoint_Template.pptx"
    click external "https://github.com/richardffrank/excel-to-ppt/blob/main/requirements.txt"

    %% Styles
    classDef presentation fill:#8DD3C7,stroke:#333,stroke-width:1px
    classDef business fill:#FDB462,stroke:#333,stroke-width:1px
    classDef data fill:#B3DE69,stroke:#333,stroke-width:1px
    classDef external fill:#BC80BD,stroke:#333,stroke-width:1px
```
