# shotgun-02/js30 architecture

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

- Interactive diagram: https://gitdiagram.com/shotgun-02/js30
- Repository: https://github.com/shotgun-02/js30

## Overview

##### Project type and purpose
- From the file tree and README, this is a static, front-end showcase site built as “30 Days of JavaScript” exercises. Each numbered folder (01, 02, 03, 04) contains a self-contained HTML/CSS/JS demo (Day 1–4), plus a top-level index.html that links to them all.
- The presence of _config.yml and typical GitHub Pages structure suggests it’s built with Jekyll (a static site generator) and hosted on GitHub Pages. There is no dynamic backend or database—just static assets.

##### File structure
- Top-level folders:
- 01, 02, 03, 04: day-by-day demo code (HTML, CSS, sounds, JS).
- invite: a standalone demo (with its own HTML, JS, CSS).
- javascripts/: global scripts (main.js).
- stylesheets/: global CSS themes.
- images/: any shared assets.
- package.json: local-dev dependencies (Node/NPM scripts, linters, etc.).
- _config.yml: Jekyll configuration for GitHub Pages.
- The root index.html ties everything together. No server-side code—purely static.

##### README for additional insights
- The README confirms this is “JavaScript 30 Days code revision” with links to each day’s live demo.

##### Detailed capture of architectural elements
- If package.json contains build scripts (e.g., `jekyll serve`), note that as “npm run dev → local preview.”
- That changes to any of the numbered folders (01–04) feed into the same build pipeline.

## Diagram (Mermaid)

```mermaid
graph TB
    %% Development Layer
    subgraph "Development Environment"
        direction TB
        DevWorkstation["Developer Workstation\n(Node.js, NPM)"]:::dev
        LocalPreview["Local Preview\nnpm run dev (jekyll serve)"]:::dev
    end

    %% Source Code Repository
    subgraph "Source Code (GitHub Repo)"
        direction TB
        RootIndex["index.html"]:::runtime
        PackageJSON["package.json"]:::dev
        ConfigYML["_config.yml"]:::build
        IssueTemplate["feature_request.md"]:::build
        subgraph "Day Demos"
            direction TB
            Day1["Day 1 Demo\n01/index.html\n01/style.css\n01/sounds/"]:::runtime
            Day2["Day 2 Demo\n02/index.html\n02/style.css"]:::runtime
            Day3["Day 3 Demo\n03/index.html"]:::runtime
            Day4["Day 4 Demo\n04/index.html\n04/cm.js"]:::runtime
        end
        subgraph "Invite Demo"
            direction TB
            InvitePage["Invite Page\ninvite/TempImagePreview.html"]:::runtime
            InviteCSS["invite/css/"]:::runtime
            InviteJS["invite/js/"]:::runtime
            InviteImages["invite/images/"]:::runtime
        end
        subgraph "Global Assets"
            direction TB
            GlobalJS["javascripts/main.js"]:::runtime
            GlobalCSS1["stylesheets/github-dark.css"]:::runtime
            GlobalCSS2["stylesheets/stylesheet.css"]:::runtime
            SharedImages["images/"]:::runtime
        end
    end

    %% Build & Deploy
    subgraph "Build & Deploy"
        direction TB
        GitHubActions["GitHub Actions\n(Jekyll Build)"]:::build
        GitHubPages["GitHub Pages/CDN\n(Static Site Hosting)"]:::runtime
    end

    %% End User
    UserBrowser["End User Browser\n(Views Static Site)"]:::runtime

    %% Flows
    DevWorkstation -->|push code| RootIndex
    DevWorkstation -->|push code| Day1
    DevWorkstation -->|push code| Day2
    DevWorkstation -->|push code| Day3
    DevWorkstation -->|push code| Day4
    DevWorkstation -->|push code| InvitePage
    DevWorkstation -->|push code| GlobalJS
    DevWorkstation -->|push code| GlobalCSS1
    DevWorkstation -->|push code| GlobalCSS2
    DevWorkstation -->|push code| SharedImages
    DevWorkstation -->|push code| PackageJSON
    DevWorkstation -->|push code| ConfigYML
    DevWorkstation -->|push code| IssueTemplate

    RootIndex & PackageJSON & ConfigYML & Day1 & Day2 & Day3 & Day4 & InvitePage & GlobalJS & GlobalCSS1 & SharedImages -->|trigger build| GitHubActions
    LocalPreview -->|jekyll serve| DevWorkstation

    GitHubActions -->|deploy static files| GitHubPages
    GitHubPages -->|serve over HTTPS| UserBrowser

    %% Click Events
    click Day1 "https://github.com/shotgun-02/js30/blob/master/01/index.html"
    click Day1 "https://github.com/shotgun-02/js30/blob/master/01/style.css"
    click Day1 "https://github.com/shotgun-02/js30/tree/master/01/sounds/"
    click Day2 "https://github.com/shotgun-02/js30/blob/master/02/index.html"
    click Day2 "https://github.com/shotgun-02/js30/blob/master/02/style.css"
    click Day3 "https://github.com/shotgun-02/js30/blob/master/03/index.html"
    click Day4 "https://github.com/shotgun-02/js30/blob/master/04/index.html"
    click Day4 "https://github.com/shotgun-02/js30/blob/master/04/cm.js"
    click InvitePage "https://github.com/shotgun-02/js30/blob/master/invite/TempImagePreview.html"
    click InviteCSS "https://github.com/shotgun-02/js30/tree/master/invite/css/"
    click InviteJS "https://github.com/shotgun-02/js30/tree/master/invite/js/"
    click InviteImages "https://github.com/shotgun-02/js30/tree/master/invite/images/"
    click GlobalJS "https://github.com/shotgun-02/js30/blob/master/javascripts/main.js"
    click GlobalCSS1 "https://github.com/shotgun-02/js30/blob/master/stylesheets/github-dark.css"
    click GlobalCSS2 "https://github.com/shotgun-02/js30/blob/master/stylesheets/stylesheet.css"
    click SharedImages "https://github.com/shotgun-02/js30/tree/master/images/"
    click ConfigYML "https://github.com/shotgun-02/js30/blob/master/_config.yml"
    click IssueTemplate "https://github.com/shotgun-02/js30/blob/master/.github/ISSUE_TEMPLATE/feature_request.md"
    click RootIndex "https://github.com/shotgun-02/js30/blob/master/index.html"
    click PackageJSON "https://github.com/shotgun-02/js30/blob/master/package.json"

    %% Styles
    classDef dev fill:#D6E9FF,stroke:#034C8C,color:#034C8C;
    classDef build fill:#DFF7D6,stroke:#287L3A,color:#287L3A;
    classDef runtime fill:#FFF4D6,stroke:#A66F00,color:#A66F00;
```
