# agatocherry/digital-garden-challenge architecture

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

- Interactive diagram: https://gitdiagram.com/agatocherry/digital-garden-challenge
- Repository: https://github.com/agatocherry/digital-garden-challenge

## Overview

##### Project Type and Purpose
- This is a lightweight, static “digital garden” front-end project. It consists solely of client-side HTML, CSS, and image assets, without any back-end or database layers. The purpose is to let users navigate between ASCII art plant pages (cherry blossom, tulip, sunflower, rose).

##### File Structure Analysis
- Top-level files:
- README.md – project description
- index.html – entry point
- style.css – global styles
- Directories:
- assets/ – screenshot images for README
- css/ – theme-specific CSS files (rose.css, sunflower.css, tulip.css)
- pages/ – individual plant pages (rose.html, sunflower.html, tulip.html)
- No build scripts, no server code, no dynamic data layers.

##### Key Architectural Insights from README
- Static site deployed on Vercel (implied by the live demo URL).
- Simple navigation model: index.html links to each plant page.
- Themes are separated into dedicated CSS files for each plant.

##### Main Components and Their Relationships
a. Browser (Client)
– Renders HTML pages and applies CSS.
b. Static Web Server/CDN
– Hosts and delivers index.html, pages/*.html, style.css, css/*.css, assets/* over HTTP(S).
c. Assets
– ASCII art and image files stored under assets/ and referenced by pages.
d. Navigation Layer
– index.html provides links; each page includes global style.css plus a theme CSS file from css/.

Data Flow:
User’s browser → DNS → Static CDN → GET HTML → GET CSS → GET Images → render pages.

##### Architectural Patterns and Design Principles
- Single‐page entrypoint with multi-page navigation (traditional static site).
- Separation of concerns:
- Global styles in style.css
- Theme variations in css/*.css
- Content in individual HTML files under pages/
- Cacheability: static assets can be aggressively cached via CDN headers.

##### Essentials to Capture
– Clear labeling of each component and artifact.
– Note caching at the CDN layer for performance.

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph "Client Layer"
        Browser["Browser"]:::infra
    end

    subgraph "Hosting Layer"
        CDN["CDN / Static Server (Vercel)"]:::infra
    end

    Browser -->|"HTTP GET"| CDN

    subgraph "HTML Content" 
        Index["index.html"]:::html
        RosePage["pages/rose.html"]:::html
        SunPage["pages/sunflower.html"]:::html
        TulipPage["pages/tulip.html"]:::html
    end

    subgraph "CSS Files"
        GlobalCSS["style.css"]:::css
        RoseCSS["css/rose.css"]:::css
        SunCSS["css/sunflower.css"]:::css
        TulipCSS["css/tulip.css"]:::css
    end

    subgraph "Assets"
        Assets["assets/*"]:::image
    end

    CDN -->|"HTTP 200"| Index
    CDN -->|"HTTP 200"| RosePage
    CDN -->|"HTTP 200"| SunPage
    CDN -->|"HTTP 200"| TulipPage
    CDN -->|"HTTP 200"| GlobalCSS
    CDN -->|"HTTP 200"| RoseCSS
    CDN -->|"HTTP 200"| SunCSS
    CDN -->|"HTTP 200"| TulipCSS
    CDN -->|"HTTP 200"| Assets

    Index -->|"links to"| RosePage
    Index -->|"links to"| SunPage
    Index -->|"links to"| TulipPage

    Index -->|"loads CSS"| GlobalCSS
    RosePage -->|"loads CSS"| GlobalCSS
    RosePage -->|"loads CSS"| RoseCSS
    RosePage -->|"uses assets"| Assets

    SunPage -->|"loads CSS"| GlobalCSS
    SunPage -->|"loads CSS"| SunCSS
    SunPage -->|"uses assets"| Assets

    TulipPage -->|"loads CSS"| GlobalCSS
    TulipPage -->|"loads CSS"| TulipCSS
    TulipPage -->|"uses assets"| Assets

    click Index "https://github.com/agatocherry/digital-garden-challenge/blob/main/index.html"
    click GlobalCSS "https://github.com/agatocherry/digital-garden-challenge/blob/main/style.css"
    click RoseCSS "https://github.com/agatocherry/digital-garden-challenge/blob/main/css/rose.css"
    click SunCSS "https://github.com/agatocherry/digital-garden-challenge/blob/main/css/sunflower.css"
    click TulipCSS "https://github.com/agatocherry/digital-garden-challenge/blob/main/css/tulip.css"
    click RosePage "https://github.com/agatocherry/digital-garden-challenge/blob/main/pages/rose.html"
    click SunPage "https://github.com/agatocherry/digital-garden-challenge/blob/main/pages/sunflower.html"
    click TulipPage "https://github.com/agatocherry/digital-garden-challenge/blob/main/pages/tulip.html"
    click Assets "https://github.com/agatocherry/digital-garden-challenge/tree/main/assets/"

    classDef infra fill:#D3D3D3,stroke:#333,stroke-width:1px
    classDef html fill:#ADD8E6,stroke:#333,stroke-width:1px
    classDef css fill:#90EE90,stroke:#333,stroke-width:1px
    classDef image fill:#FFA500,stroke:#333,stroke-width:1px
```
