# nijika21/switch architecture

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

- Interactive diagram: https://gitdiagram.com/nijika21/switch
- Repository: https://github.com/nijika21/switch

## Overview

##### Project type and purpose
- This is a simple, static front-end demo repository hosted on GitHub Pages.
- It implements two small “switch case” examples in JavaScript:
- Odd-Even Checker
- Grade Calculator
- There is no backend or database—just HTML, CSS, and JS files organized into demo folders.

##### File structure
- Top-level:
- index.html and style.css (landing page)
- README.md
- “Penerapan kode” folder: two subfolders (“Penerapan no 1” and “Penerapan no 2”), each containing:
- An HTML file
- A script.js
- A style.css
- “Tugas Grade & ganjil-genap” folder:
- kode_no_1.js (odd-even logic)
- kode_no_2.js (grade logic)
- No build scripts, no config files—purely static assets.

##### README for additional insights
- Confirms it’s a learning/demo repo for switch-case logic.
- Live demo link indicates deployment via GitHub Pages.
- No external services except static hosting.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Entities
    Browser["User Browser"]:::client
    CDN["GitHub Pages CDN"]:::cdn

    %% Client-Server Interaction
    Browser -->|HTTP GET index.html| CDN
    CDN -->|Serve index.html| Browser

    %% Static Asset Structure on CDN
    subgraph "Repository (Static Assets)"
        direction TB
        Index["index.html"]:::html
        GlobalCSS["style.css"]:::css
        README["README.md"]:::doc

        subgraph "Penerapan kode"
            direction TB
            subgraph "Penerapan no 1"
                direction TB
                Demo1HTML["PenerapanNo1.html"]:::html
                Demo1CSS["style.css"]:::css
                Demo1JS["script.js"]:::js
            end
            subgraph "Penerapan no 2"
                direction TB
                Demo2HTML["PenerapanNo2.html"]:::html
                Demo2CSS["style.css"]:::css
                Demo2JS["script.js"]:::js
            end
        end

        subgraph "Tugas Grade & ganjil-genap"
            direction TB
            OddEvenJS["kode_no_1.js"]:::js
            GradeJS["kode_no_2.js"]:::js
        end
    end

    %% Browser Asset Loading
    Browser -->|Fetch index.html| Index
    Index -->|Load CSS| GlobalCSS
    Index -->|Navigate to Demo1| Demo1HTML
    Index -->|Navigate to Demo2| Demo2HTML

    Browser -->|Fetch Demo1 HTML| Demo1HTML
    Demo1HTML -->|Load CSS| Demo1CSS
    Demo1HTML -->|Load JS| Demo1JS

    Browser -->|Fetch Demo2 HTML| Demo2HTML
    Demo2HTML -->|Load CSS| Demo2CSS
    Demo2HTML -->|Load JS| Demo2JS

    %% Static JS assets accessible
    Browser -->|View code| OddEvenJS
    Browser -->|View code| GradeJS

    %% Click Events
    click Index "https://github.com/nijika21/switch/blob/main/index.html"
    click GlobalCSS "https://github.com/nijika21/switch/blob/main/style.css"
    click README "https://github.com/nijika21/switch/blob/main/README.md"
    click Demo1HTML "https://github.com/nijika21/switch/blob/main/Penerapan kode/Penerapan no 1/PenerapanNo1.html"
    click Demo1CSS "https://github.com/nijika21/switch/blob/main/Penerapan kode/Penerapan no 1/style.css"
    click Demo1JS "https://github.com/nijika21/switch/blob/main/Penerapan kode/Penerapan no 1/script.js"
    click Demo2HTML "https://github.com/nijika21/switch/blob/main/Penerapan kode/Penerapan no 2/PenerapanNo2.html"
    click Demo2CSS "https://github.com/nijika21/switch/blob/main/Penerapan kode/Penerapan no 2/style.css"
    click Demo2JS "https://github.com/nijika21/switch/blob/main/Penerapan kode/Penerapan no 2/script.js"
    click OddEvenJS "https://github.com/nijika21/switch/blob/main/Tugas Grade & ganjil-genap/kode_no_1.js"
    click GradeJS "https://github.com/nijika21/switch/blob/main/Tugas Grade & ganjil-genap/kode_no_2.js"

    %% Styles
    classDef client fill:#E0F7FA,stroke:#006064,stroke-width:2px;
    classDef cdn fill:#ECEFF1,stroke:#607D8B,stroke-width:2px;
    classDef html fill:#BBDEFB,stroke:#0D47A1,stroke-width:2px;
    classDef css fill:#C8E6C9,stroke:#1B5E20,stroke-width:2px;
    classDef js fill:#FFF9C4,stroke:#F57F17,stroke-width:2px;
    classDef doc fill:#F3E5F5,stroke:#4A148C,stroke-width:2px;
```
