# bradleyboehmke/intro-to-r-bootcamp architecture

> Architecture diagram of the GitHub repository bradleyboehmke/intro-to-r-bootcamp, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-06-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/bradleyboehmke/intro-to-r-bootcamp
- Repository: https://github.com/bradleyboehmke/intro-to-r-bootcamp

## Overview

##### Project type and purpose
- This is not a service-oriented app but a static content generator for an “Intro to R” bootcamp.
- It houses source materials (R scripts and R Markdown), data sets, styling assets, and generates HTML that is published as a course website on GitHub Pages.

##### File structure
- Top-level:
- R project files and IDE state (“.Rproj”, “.Rproj.user/…”) – environment metadata
- README files (“README.Rmd”, “README.md”, “README.html”) – project description
- Folders:
– data/ – raw input data files (CSV, TSV, Excel)
– styles.css – site-wide styling
– “Files – students” & “Files – teacher” – finalized lesson outputs (R, HTML)
– Working files/ – in-progress Rmd notebooks, caches, and generated HTML
- No backend server or database; the “engine” is R/knitr generating static HTML.

##### README for additional insights
- Confirms this is teaching material for a short R course.
- Final site is deployed to an external GitHub Pages repo.
- Licensed CC-SA 2.0.

a. Main components
1. Source Layer
– R Markdown (.Rmd) and R scripts (.R) under Working files/
– Data assets in data/
– Styling and assets (styles.css, images/)
2. Build Engine
– R + knitr/rmarkdown converting .Rmd → HTML + figures
– Caching mechanism (Working files/*_cache/)
3. Output Layer
– Rendered HTML & R scripts in “Files – students” and “Files – teacher”
4. Hosting/Distribution
– Push to GitHub Pages (uc-r.github.io/r_bootcamp)
b. Relationships & interactions
– Data files feed into Rmd notebooks
– Rmd + CSS + images → processed by knitr → HTML pages + supporting assets (figures, cache)
– Final HTML and static assets uploaded to GitHub repository for hosting
c. Architectural patterns & design principles
– Static site generation (SSG) pattern
– Clear separation of source (editable Rmd) vs generated output (HTML folders)
– Content reuse: single data sources feed multiple lessons
d. Key technologies & libraries
– R, RStudio, knitr, rmarkdown
– Git & GitHub Pages for versioning & hosting

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Source Layer
    subgraph "Source Layer"
        WF["Working files/ (*.Rmd & .R)"]:::source
        DA["data/"]:::source
        ST["styles.css"]:::source
        IM["images/"]:::source
    end

    %% Project Metadata & Documentation
    subgraph "Project Metadata & Docs"
        PJ["Intro to R Bootcamp.Rproj"]:::docs
        RMD["README.Rmd"]:::docs
        MD["README.md"]:::docs
        HTML["README.html"]:::docs
    end

    %% Build Engine
    BE["knitr/rmarkdown\n(Build Engine)"]:::engine

    %% Cache Layer
    CA["Cache (Working files/*_cache/)"]:::engine

    %% Output Layer
    subgraph "Output Layer"
        OS["Files – students/ (HTML & R)"]:::output
        OT["Files – teacher/ (HTML & R)"]:::output
    end

    %% Hosting
    HP["GitHub Pages\n(uc-r.github.io/r_bootcamp)"]:::hosting

    %% Connections
    DA -->|feeds| BE
    WF -->|feeds| BE
    ST -->|applies styling| BE
    IM -->|feeds assets| BE
    BE -->|caches build| CA
    BE -->|generates| OS
    BE -->|generates| OT
    OS -->|deploys to| HP
    OT -->|deploys to| HP

    %% Click Events
    click WF "https://github.com/bradleyboehmke/intro-to-r-bootcamp/tree/master/Working files/"
    click DA "https://github.com/bradleyboehmke/intro-to-r-bootcamp/tree/master/data/"
    click ST "https://github.com/bradleyboehmke/intro-to-r-bootcamp/blob/master/styles.css"
    click IM "https://github.com/bradleyboehmke/intro-to-r-bootcamp/tree/master/images/"
    click CA "https://github.com/bradleyboehmke/intro-to-r-bootcamp/tree/master/Working files/*_cache/"
    click OS "https://github.com/bradleyboehmke/intro-to-r-bootcamp/tree/master/Files - students/"
    click OT "https://github.com/bradleyboehmke/intro-to-r-bootcamp/tree/master/Files - teacher/"
    click PJ "https://github.com/bradleyboehmke/intro-to-r-bootcamp/blob/master/Intro to R Bootcamp.Rproj"
    click RMD "https://github.com/bradleyboehmke/intro-to-r-bootcamp/blob/master/README.Rmd"
    click MD "https://github.com/bradleyboehmke/intro-to-r-bootcamp/blob/master/README.md"
    click HTML "https://github.com/bradleyboehmke/intro-to-r-bootcamp/blob/master/README.html"

    %% Styles
    classDef source fill:#D6EAF8,stroke:#1B4F72,color:#1B2631
    classDef engine fill:#D5F5E3,stroke:#145A32,color:#0E3623
    classDef output fill:#FCF3CF,stroke:#9A7D0A,color:#7E5109
    classDef hosting fill:#FADBD8,stroke:#922B21,color:#641E16
    classDef docs fill:#E8DAEF,stroke:#4A235A,color:#2E0854
```
