# wayne1894/frontend2024 architecture

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

- Interactive diagram: https://gitdiagram.com/wayne1894/frontend2024
- Repository: https://github.com/wayne1894/frontend2024

## Overview

##### Project type and purpose
- This repository (“frontend2024”) is a collection of front-end exercises and mini-projects for a web-development course.
- It contains:
– Pure static HTML/CSS/JS examples (e.g., “0527”, “0603”, etc.)
– Assignments demonstrating AJAX with a local Node mock server (“0826_ajax”, “0902”, “0903”)
– Vue/Vite projects (e.g., “0910_es6_vue”, “0923_vue”, “_0924/vue-project”, “sicbo”, “course_demo2024”)
– Some Firebase-based demos (e.g., “bluemonkey”, “khs_layout”, “vite5_scss_ejs_2024_temp”)

##### File structure
- Top-level folders are by date or by project name—each is effectively a self-contained front-end demo.
- Many projects use NPM + package.json + Vite for development and build.
- Some have a “mock” subfolder that spins up a Node.js server to simulate API endpoints.
- Vue/Vite projects share a common structure:
– public/ (static assets, e.g., images)
– src/ (App.vue, components/, router/, stores/, assets/, main.js)
– config files (vite.config.js, tailwind.config.js)

##### README for additional insights
- The README is primarily course material links; it doesn’t prescribe a single architecture.
- The assignments cover: basic HTML/CSS, responsive layouts, JavaScript fundamentals, AJAX, ES6, Vue with Pinia/router, and integrating with an API.

##### Elements
- Developer → GitHub (push)
- Developer → Dev Toolchain (npm install, vite dev/build)
- Dev Toolchain → Browser (local serve)
- Browser ↔ Mock Server (for AJAX demos)
- Build output → Hosting (deploy)
- Browser → Hosting (fetch production assets)
- Blue for “Development” components (IDE, NPM, Vite)
- Green for “Runtime” components (Browser, Mock Server)
- Orange for “Infrastructure” (GitHub, Firebase Hosting)

##### Detail
- For Vue projects, annotate: “src/components”, “router/index.js”, “stores/counter.js”, “vite.config.js”.
- For AJAX demos, annotate the location of mock code (“mock/index.js”, package.json).
- Flow of asset generation (src → Vite → dist → Hosting).

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Developer Environment"
        Dev["Developer"]:::dev
    end

    subgraph "Dev Toolchain"
        IDE["IDE/Text Editor"]:::dev
        NPM["Node.js / NPM"]:::dev
        Vite["Vite Dev Server"]:::dev
        Git["Git"]:::dev
    end

    Dev --> IDE
    Dev --> NPM
    Dev --> Vite
    Dev --> Git
    Dev --> GitHub["GitHub"]:::infra

    subgraph "Catalog of Demos"
        subgraph "Static HTML/CSS/JS"
            S0527["0527"]:::static
            S0603["0603"]:::static
        end
        subgraph "AJAX Demos"
            A0826["0826_ajax"]:::ajax
            A0902["0902"]:::ajax
        end
        subgraph "Vue/Vite SPA"
            V0924["0924/vue-project"]:::vue
            Vsicbo["sicbo"]:::vue
        end
        subgraph "Firebase Hosted Demos"
            Fbluemonkey["bluemonkey"]:::firebase
        end
    end

    GitHub -->|clone/pull| S0527
    GitHub --> S0603
    GitHub --> A0826
    GitHub --> A0902
    GitHub --> V0924
    GitHub --> Vsicbo
    GitHub --> Fbluemonkey

    NPM --> Vite
    Vite -->|"serve (HMR)"| Browser["Browser"]:::runtime
    Browser -->|AJAX| Mock["Local Mock Server"]:::runtime

    subgraph "Build Pipeline"
        Tailwind["PostCSS/Tailwind"]:::dev
        Bundler["Vite Bundler"]:::dev
        Dist["dist/"]:::runtime
    end

    Vite --> Bundler --> Dist --> Hosting["Hosting (GitHub Pages / Firebase)"]:::infra
    Browser -->|fetch prod assets| Hosting

    click S0527 "https://github.com/wayne1894/frontend2024/blob/main/0527/index.html"
    click S0603 "https://github.com/wayne1894/frontend2024/blob/main/0603/index.html"
    click A0826 "https://github.com/wayne1894/frontend2024/blob/main/0826_ajax/index.html"
    click A0826 "https://github.com/wayne1894/frontend2024/blob/main/0826_ajax/mock/index.js"
    click A0902 "https://github.com/wayne1894/frontend2024/blob/main/0902/index.html"
    click A0902 "https://github.com/wayne1894/frontend2024/blob/main/0902/mock/index.js"
    click V0924 "https://github.com/wayne1894/frontend2024/blob/main/0924/vue-project/src/App.vue"
    click V0924 "https://github.com/wayne1894/frontend2024/blob/main/0924/vue-project/vite.config.js"
    click Vsicbo "https://github.com/wayne1894/frontend2024/blob/main/sicbo/src/App.vue"
    click Fbluemonkey "https://github.com/wayne1894/frontend2024/blob/main/bluemonkey/src/index.html"

    classDef dev fill:#cce5ff,stroke:#004085,color:#004085
    classDef runtime fill:#d4edda,stroke:#155724,color:#155724
    classDef infra fill:#fff3cd,stroke:#856404,color:#856404
    classDef static fill:#e2e3e5,stroke:#6c757d,color:#6c757d
    classDef ajax fill:#f8d7da,stroke:#721c24,color:#721c24
    classDef vue fill:#d1ecf1,stroke:#0c5460,color:#0c5460
    classDef firebase fill:#f0f4c3,stroke:#827717,color:#827717
```
