# rfortherestofus/omni architecture

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

- Interactive diagram: https://gitdiagram.com/rfortherestofus/omni
- Repository: https://github.com/rfortherestofus/omni

## Overview

##### Main Components

a. Core Package Components:
- RMarkdown Templates Module
- Data Integration Services (Qualtrics)
- Table Generation Utilities
- Visualization Components

b. External Dependencies:
- R Ecosystem
- Qualtrics API
- Output Formats (PDF, HTML, Word)

##### Specific Elements

- Rectangles: Core package modules
- Rounded rectangles: Template outputs
- Hexagons: R package dependencies

- Blue: Core package functionality
- Green: External services
- Orange: Template systems
- Purple: Styling components

##### Key Relationships to Highlight

- How RMarkdown templates utilize the styling components
- Connection between Qualtrics services and data processing
- Demonstrate how the theme system integrates with ggplot2
- Relationship between templates and output formats

##### Technical Details

- Asset management system (inst/assets structure)
- Template variation handling
- Style inheritance patterns
- API integration points

Remember to include notes about extensibility points where users might need to customize templates or styles, and clearly show the separation between core functionality and user-facing interfaces.

This system design should help developers understand both the technical architecture and the user workflow, making it easier to maintain and extend the package's functionality.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Templates
        RMD[RMarkdown Templates]
        HTML[HTML Templates]
        PDF[PDF Templates]
        WORD[Word Templates]
    end

    subgraph Core
        STYLE[Styling Components]
        THEME[Theme Management]
        COLOR[Color Palettes]
        TABLE[Table Generation]
        PLOT[Plot Defaults]
    end

    subgraph Data
        QAPI[Qualtrics Integration]
        SMAPI[SurveyMonkey Integration]
    end

    subgraph Assets
        CSS[CSS Assets]
        JS[JavaScript]
        IMG[Images]
        REF[Reference Materials]
    end

    subgraph Documentation
        DOC[Package Documentation]
        VIG[Vignettes]
    end

    RMD --> HTML
    RMD --> PDF
    RMD --> WORD
    STYLE --> |Applies to| HTML
    STYLE --> |Applies to| PDF
    STYLE --> |Applies to| WORD
    THEME --> STYLE
    COLOR --> STYLE
    PLOT --> STYLE
    TABLE --> HTML
    TABLE --> PDF
    TABLE --> WORD
    QAPI --> |Data Flow| TABLE
    SMAPI --> |Data Flow| TABLE
    CSS --> STYLE
    JS --> HTML
    IMG --> |Used in| HTML
    IMG --> |Used in| PDF
    IMG --> |Used in| WORD

    classDef default fill:#ddd,stroke:#000,stroke-width:1px
    classDef core fill:#b3e0ff,stroke:#000
    classDef data fill:#98fb98,stroke:#000
    classDef asset fill:#ffd700,stroke:#000
    classDef doc fill:#dda0dd,stroke:#000
    classDef template fill:#ffa07a,stroke:#000

    class STYLE,THEME,COLOR,TABLE,PLOT core
    class QAPI,SMAPI data
    class CSS,JS,IMG,REF asset
    class DOC,VIG doc
    class RMD,HTML,PDF,WORD template

    click RMD "https://github.com/rfortherestofus/omni/tree/main/inst/rmarkdown/templates/"
    click STYLE "https://github.com/rfortherestofus/omni/blob/main/R/theme.R"
    click COLOR "https://github.com/rfortherestofus/omni/blob/main/R/colors.R"
    click PLOT "https://github.com/rfortherestofus/omni/blob/main/R/ggplot_defaults.R"
    click TABLE "https://github.com/rfortherestofus/omni/blob/main/R/table.R"
    click QAPI "https://github.com/rfortherestofus/omni/blob/main/R/qualtrics.R"
    click SMAPI "https://github.com/rfortherestofus/omni/blob/main/R/surveymonkey.R"
    click CSS "https://github.com/rfortherestofus/omni/tree/main/inst/assets/css_partials/"
    click JS "https://github.com/rfortherestofus/omni/tree/main/inst/assets/js/"
    click IMG "https://github.com/rfortherestofus/omni/tree/main/inst/assets/images/"
    click REF "https://github.com/rfortherestofus/omni/tree/main/inst/reference/"
    click DOC "https://github.com/rfortherestofus/omni/tree/main/man/"
    click VIG "https://github.com/rfortherestofus/omni/tree/main/vignettes/"
    click HTML "https://github.com/rfortherestofus/omni/tree/main/inst/rmarkdown/templates/html_report/"
    click PDF "https://github.com/rfortherestofus/omni/tree/main/inst/rmarkdown/templates/pdf_report/"
    click WORD "https://github.com/rfortherestofus/omni/tree/main/inst/rmarkdown/templates/word_report/"
```
