# paullukashuber/qr-code-generator architecture

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

- Interactive diagram: https://gitdiagram.com/paullukashuber/qr-code-generator
- Repository: https://github.com/paullukashuber/qr-code-generator

## Overview

##### Project type and purpose
- This is a client‑side single‑page application (SPA) built with React 18.

##### File structure
- Top‐level folders and files:
- .github (CI/CD templates)
- docs (project documentation, design tips)
- public (static assets: index.html, images)
- src (application source)
- package.json, vite.config.js, tailwind.config.js (build/config)
- src substructure:
- components/qr‑code – QR code UI (form fields, generator, templates, export panel)
- components/ui – primitive UI controls (button, card, slider, etc.)
- context – ThemeContext for light/dark mode
- lib – pure utility modules (qrExportUtils.js, qrSvgUtils.js, general utils)
- main.jsx, App.jsx – entry point & top‐level application shell

##### README for additional insights
- Tech stack: React 18, Vite, Tailwind CSS, Shadcn UI primitives, QRCode.js library
- Deployment: GitHub Actions workflow (deploy.yml) publishes static build
- No backend or external API dependencies – everything runs client‑side

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Developer & CI/CD
    subgraph "Developer & CI/CD"
        style Developer fill:#cce5ff,stroke:#333,stroke-width:1px
        subgraph "Local Development & Build Config"
            style LocalDev fill:#cce5ff,stroke:#333,stroke-width:1px
            Pkg["package.json"]:::blue
            ViteCfg["vite.config.js"]:::blue
            TailwindCfg["tailwind.config.js"]:::blue
            PostcssCfg["postcss.config.js"]:::blue
        end
        CI["GitHub Actions CI/CD (.github/workflows/deploy.yml)"]:::blue
    end

    %% Hosting & Delivery
    subgraph "Hosting & Delivery"
        style Hosting fill:#d4edda,stroke:#333,stroke-width:1px
        subgraph "Static Assets"
            style StaticAssets fill:#d4edda,stroke:#333,stroke-width:1px
            Index["index.html"]:::green
            PublicDir["public/"]:::green
        end
        PublicHost["CDN / GitHub Pages"]:::green
    end

    %% Browser SPA
    subgraph "Browser SPA"
        style SPA fill:#ffe5b4,stroke:#333,stroke-width:1px
        Main["src/main.jsx"]:::orange
        App["src/App.jsx"]:::orange
        Theme["src/context/ThemeContext.jsx"]:::orange

        subgraph "UI Component Library"
            style UIComp fill:#ffe5b4,stroke:#333,stroke-width:1px
            Button["button.jsx"]:::orange
            Card["card.jsx"]:::orange
            DateTime["custom-date-time-picker.jsx"]:::orange
            Input["input.jsx"]:::orange
            Label["label.jsx"]:::orange
            Select["select.jsx"]:::orange
            Slider["slider.jsx"]:::orange
            Switch["switch.jsx"]:::orange
            Tabs["tabs.jsx"]:::orange
            ThemeToggle["theme-toggle.jsx"]:::orange
        end

        subgraph "QR Code Feature Modules"
            style QRFeat fill:#ffe5b4,stroke:#333,stroke-width:1px
            ColorSel["ColorSchemeSelector.jsx"]:::orange
            LogoCfg["LogoConfigSection.jsx"]:::orange
            QRG["QRCodeGenerator.jsx"]:::orange
            QRTemp["QRCodeTemplates.jsx"]:::orange
            ExportPanel["TabbedExportPanel.jsx"]:::orange
            FormFields["TemplateFormFields.jsx"]:::orange
        end

        subgraph "Utility Libraries"
            style Utils fill:#ffe5b4,stroke:#333,stroke-width:1px
            ExportUtils["qrExportUtils.js"]:::orange
            SvgUtils["qrSvgUtils.js"]:::orange
            GeneralUtils["utils.js"]:::orange
        end

        ExternalLib["QRCode.js (external)"]:::gray
    end

    %% Browser APIs & Device
    subgraph "Browser APIs & User Device"
        style BrowserAPI fill:#e2e3e5,stroke:#333,stroke-width:1px
        DOMCanvas["DOM & canvas/SVG rendering"]:::gray
        FileAPI["File API (logo upload)"]:::gray
        DownloadAPI["Download API (Blob/DataURL)"]:::gray
    end

    %% Connections
    Pkg --> ViteCfg
    ViteCfg --> TailwindCfg
    TailwindCfg --> PostcssCfg
    PostcssCfg --> CI
    CI --> PublicHost
    PublicHost --> Index
    PublicHost --> PublicDir
    Index --> Main
    Main --> App
    App --> Theme
    Theme --> Button
    Theme --> Card
    Theme --> DateTime
    Theme --> Input
    Theme --> Label
    Theme --> Select
    Theme --> Slider
    Theme --> Switch
    Theme --> Tabs
    Theme --> ThemeToggle
    ThemeToggle --> ColorSel
    ColorSel --> LogoCfg
    LogoCfg --> QRG
    QRG --> QRTemp
    QRTemp --> ExportPanel
    ExportPanel --> FormFields
    FormFields --> ExportUtils
    ExportUtils --> SvgUtils
    SvgUtils --> GeneralUtils
    GeneralUtils --> ExternalLib
    ExternalLib --> DOMCanvas
    DOMCanvas --> FileAPI
    FileAPI --> DownloadAPI

    %% Click Events
    click Pkg "https://github.com/paullukashuber/qr-code-generator/blob/main/package.json"
    click ViteCfg "https://github.com/paullukashuber/qr-code-generator/blob/main/vite.config.js"
    click TailwindCfg "https://github.com/paullukashuber/qr-code-generator/blob/main/tailwind.config.js"
    click PostcssCfg "https://github.com/paullukashuber/qr-code-generator/blob/main/postcss.config.js"
    click CI "https://github.com/paullukashuber/qr-code-generator/blob/main/.github/workflows/deploy.yml"
    click Index "https://github.com/paullukashuber/qr-code-generator/blob/main/index.html"
    click PublicDir "https://github.com/paullukashuber/qr-code-generator/tree/main/public/"
    click Main "https://github.com/paullukashuber/qr-code-generator/blob/main/src/main.jsx"
    click App "https://github.com/paullukashuber/qr-code-generator/blob/main/src/App.jsx"
    click Theme "https://github.com/paullukashuber/qr-code-generator/blob/main/src/context/ThemeContext.jsx"
    click Button "https://github.com/paullukashuber/qr-code-generator/blob/main/src/components/ui/button.jsx"
    click Card "https://github.com/paullukashuber/qr-code-generator/blob/main/src/components/ui/card.jsx"
    click DateTime "https://github.com/paullukashuber/qr-code-generator/blob/main/src/components/ui/custom-date-time-picker.jsx"
    click Input "https://github.com/paullukashuber/qr-code-generator/blob/main/src/components/ui/input.jsx"
    click Label "https://github.com/paullukashuber/qr-code-generator/blob/main/src/components/ui/label.jsx"
    click Select "https://github.com/paullukashuber/qr-code-generator/blob/main/src/components/ui/select.jsx"
    click Slider "https://github.com/paullukashuber/qr-code-generator/blob/main/src/components/ui/slider.jsx"
    click Switch "https://github.com/paullukashuber/qr-code-generator/blob/main/src/components/ui/switch.jsx"
    click Tabs "https://github.com/paullukashuber/qr-code-generator/blob/main/src/components/ui/tabs.jsx"
    click ThemeToggle "https://github.com/paullukashuber/qr-code-generator/blob/main/src/components/ui/theme-toggle.jsx"
    click ColorSel "https://github.com/paullukashuber/qr-code-generator/blob/main/src/components/qr-code/ColorSchemeSelector.jsx"
    click LogoCfg "https://github.com/paullukashuber/qr-code-generator/blob/main/src/components/qr-code/LogoConfigSection.jsx"
    click QRG "https://github.com/paullukashuber/qr-code-generator/blob/main/src/components/qr-code/QRCodeGenerator.jsx"
    click QRTemp "https://github.com/paullukashuber/qr-code-generator/blob/main/src/components/qr-code/QRCodeTemplates.jsx"
    click ExportPanel "https://github.com/paullukashuber/qr-code-generator/blob/main/src/components/qr-code/TabbedExportPanel.jsx"
    click FormFields "https://github.com/paullukashuber/qr-code-generator/blob/main/src/components/qr-code/TemplateFormFields.jsx"
    click ExportUtils "https://github.com/paullukashuber/qr-code-generator/blob/main/src/lib/qrExportUtils.js"
    click SvgUtils "https://github.com/paullukashuber/qr-code-generator/blob/main/src/lib/qrSvgUtils.js"
    click GeneralUtils "https://github.com/paullukashuber/qr-code-generator/blob/main/src/lib/utils.js"

    %% Styles
    classDef blue fill:#cce5ff,stroke:#333,stroke-width:1px
    classDef green fill:#d4edda,stroke:#333,stroke-width:1px
    classDef orange fill:#ffe5b4,stroke:#333,stroke-width:1px
    classDef gray fill:#e2e3e5,stroke:#333,stroke-width:1px
```
