# datthodai/11tyjamstackcmsproject architecture

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

- Interactive diagram: https://gitdiagram.com/datthodai/11tyjamstackcmsproject
- Repository: https://github.com/datthodai/11tyjamstackcmsproject

## Overview

##### Project Type & Purpose
- Project Type: JAMStack static site
- Purpose: A fast, responsive hamster-care blog built with Eleventy (11ty) and Nunjucks templates, deployed via Netlify, with content stored as Markdown and managed optionally through Netlify CMS.

##### Main Components
a. Content Source
– Markdown posts under src/blog (e.g., 2025-xx-xx.md)
– Static assets (images, CSS) under src/assets & public/assets
– Nunjucks templates in src/_includes
– Netlify CMS configuration (src/admin/config.yml)
b. Build Engine
– Eleventy CLI (.eleventy.js + package.json)
c. Repository & CI/CD
– Git repository (GitHub, GitLab, etc.)
– Netlify build hook (connected to repo)
d. Hosting & Delivery
– Netlify CDN and DNS
– Public URL / Live Demo endpoint
e. End Users
– Browsers on mobile/desktop.

##### Relationships & Data Flow
1. Developer writes or edits content (Markdown) and templates locally
2. Commits pushed to Git repository
3. Netlify CI pipeline triggers on each push
4. Eleventy reads Markdown + Nunjucks templates + assets → generates static HTML/CSS/JS in public/
5. Netlify deploys the generated static site to its CDN edge network
6. End user requests content; CDN serves prebuilt pages instantly
7. (Optional) Content editors use Netlify CMS admin UI to propose new posts—commits stored back to Git.

##### Architectural Patterns & Design Principles
- JAMStack separation: Content + Markup + Delivery are decoupled
- Static-first approach for speed and security
- Git-backed headless CMS for content management
- CI/CD pipeline enforces build consistency and atomic deployments

##### Technologies & Frameworks to Call Out
– Eleventy (11ty) static site generator
– Nunjucks for templating
– Netlify for hosting, CDN, and CMS integration
– Custom CSS variables and responsive design
– Markdown for content authoring

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Authoring Layer
    subgraph "Authoring"
        direction TB
        MD["Markdown Content"]:::storage
        SA["Static Assets (src/assets)"]:::storage
        NI["Nunjucks Includes"]:::devTools
        PT["Nunjucks Page Templates"]:::devTools
        DA["Design Assets (UI Mockups)"]:::devTools
        GR["Git Repository"]:::devTools
        subgraph "Netlify CMS Admin"
            direction TB
            CMSUI["Admin UI Entry Point"]:::cms
            CMSCFG["CMS Config"]:::cms
        end
    end

    %% Build Layer
    subgraph "Build"
        direction TB
        EC["Eleventy Config"]:::devTools
        BS["Build Scripts & Dependencies"]:::devTools
        EB["Eleventy Build Engine"]:::devTools
        SO["Static Output (public/)"]:::storage
    end

    %% Deployment Layer
    subgraph "Deployment"
        direction TB
        CI["Netlify CI/CD Pipeline"]:::ci
        CDN["Netlify CDN & DNS"]:::cdn
    end

    %% Delivery Layer
    subgraph "Delivery"
        direction TB
        EU["End Users (Browsers)"]:::external
    end

    %% Relationships
    MD --> EB
    SA --> EB
    NI --> EB
    PT --> EB
    EB --> SO
    SO --> CDN
    GR --> CI
    CI --> EB
    CDN --> EU
    EU --> CMSUI
    CMSUI --> GR
    CMSCFG --> CMSUI

    %% Click Events
    click MD "https://github.com/datthodai/11tyjamstackcmsproject/blob/main/src/blog/*.md"
    click SA "https://github.com/datthodai/11tyjamstackcmsproject/tree/main/src/assets/"
    click NI "https://github.com/datthodai/11tyjamstackcmsproject/tree/main/src/_includes/"
    click PT "https://github.com/datthodai/11tyjamstackcmsproject/blob/main/src/index.njk"
    click PT "https://github.com/datthodai/11tyjamstackcmsproject/blob/main/src/blog.njk"
    click DA "https://github.com/datthodai/11tyjamstackcmsproject/blob/main/design-files/JAMStack Blog - Design.fig"
    click CMSUI "https://github.com/datthodai/11tyjamstackcmsproject/blob/main/src/admin/index.html"
    click CMSCFG "https://github.com/datthodai/11tyjamstackcmsproject/blob/main/src/admin/config.yml"
    click EC "https://github.com/datthodai/11tyjamstackcmsproject/blob/main/.eleventy.js"
    click BS "https://github.com/datthodai/11tyjamstackcmsproject/blob/main/package.json"
    click BS "https://github.com/datthodai/11tyjamstackcmsproject/blob/main/package-lock.json"
    click SO "https://github.com/datthodai/11tyjamstackcmsproject/tree/main/public/"
    click GR "https://github.com/datthodai/11tyjamstackcmsproject/blob/main/.gitignore"
    click GR "https://github.com/datthodai/11tyjamstackcmsproject/blob/main/README.md"
    click GR "https://github.com/datthodai/11tyjamstackcmsproject/tree/main/LICENSE"

    %% Styles
    classDef devTools fill:#cfe2f3,stroke:#2196f3,stroke-width:1px
    classDef storage fill:#d9ead3,stroke:#6aa84f,stroke-width:1px
    classDef ci fill:#f9cb9c,stroke:#e69138,stroke-width:1px
    classDef cdn fill:#d9d2e9,stroke:#8e7cc3,stroke-width:1px
    classDef cms fill:#e0e0e0,stroke:#828282,stroke-width:1px
    classDef external fill:#ffffff,stroke:#000000,stroke-width:1px,stroke-dasharray: 2 2
```
