# cassie-tatibana/echo_in_yue architecture

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

- Interactive diagram: https://gitdiagram.com/cassie-tatibana/echo_in_yue
- Repository: https://github.com/cassie-tatibana/echo_in_yue

## Overview

##### Main Components
- User Interface (UI) Layers:
- Landing pages like index.html, login.html, preface/preface.html.
- Chapter pages organized in the “chapter” directory (each chapter folder contains an HTML file, its specific CSS, and images assets).
- Content pages under the “content” directory which also come with individual HTML, style CSS and image directories.
- A dedicated “directory” section that might serve as an index or navigation helper.

- Interactive 3D Module:
- The “3D” folder contains HTML, CSS, and JS files for interactive or visual 3D content.
- 3D models are stored in the “3D/image” folder (supported formats like .glb, .max).

- Multimedia and Assets:
- Images: Distributed across several folders (general_image, chapter, content, index, etc.).
- Audio: Located in “chapter/voice” and “content/内容音频”.
- Fonts and additional resources.

- Deployment and CI/CD:
- The .github folder with a deploy workflow indicates an automated deployment process, suggesting integration with GitHub Actions or similar tools.

##### Out the Relationships and Interactions
- Navigation and Linking:
- That each chapter page or content page typically includes a paired CSS and JS file (or multiple scripts, like chapter_scripts.js and content_scripts.js) that help manage user interactions and page-specific behaviors.

- Static Asset Usage:

- 3D Module Integration:

- CI/CD Pipeline:

##### Architectural Patterns and Design Principles
- Separation of Concerns:
- Each major section (e.g., chapters, content, 3D) is divided into its own folder, keeping HTML, styling, and scripts modular.

- Static Content Delivery:
- There is no dynamic backend layer; the project is organized as a static website where the content is loaded directly from pre-generated HTML files.

- Modular Interactivity:
- The 3D and interactive elements are encapsulated and can be updated or replaced without affecting the overall structure.

- Automated Deployment:
- The inclusion of deployment configurations shows that continuous integration and deployment (CI/CD) practices are in place, ensuring updates are safely and automatically pushed when changes occur.

##### Relevant Tools, Frameworks, or Libraries
- HTML, CSS, and JavaScript as the primary web technologies.
- GitHub Actions (as seen in the .github/workflows folder) for CI/CD.

## Diagram (Mermaid)

```mermaid
flowchart TD
    User(["User"]):::external

    %% UI Layer
    subgraph "UI Layer"
        Index("Index Page"):::ui
        Login("Login Page"):::ui
        Preface("Preface Page"):::ui
    end

    User --> Index
    User --> Login
    User --> Preface

    %% Navigation Section
    subgraph "Navigation"
        Directory("Directory Page"):::navigation
    end

    %% UI to Navigation
    Index -->|"navigates"| Directory
    Login -->|"navigates"| Directory
    Preface -->|"navigates"| Directory

    %% Chapter Module
    subgraph "Chapter Module"
        ChapterPages("Chapter Pages"):::chapter
        ChapterAudio("Chapter Audio"):::chapter
    end

    %% Content Module
    subgraph "Content Module"
        ContentPages("Content Pages"):::content
        ContentAudio("Content Audio"):::content
    end

    %% Interactive 3D Module
    subgraph "Interactive 3D Module"
        ThreeDViewer("3D Viewer"):::threeD
        ThreeDModels("3D Models"):::threeD
    end

    %% Multimedia Assets
    subgraph "Multimedia Assets"
        Images("Images & Audio"):::assets
        Fonts("Fonts"):::assets
    end

    %% CI/CD Pipeline
    CI("CI/CD Pipeline"):::cicd

    %% Navigation to Modules
    Directory -->|"selects"| ChapterPages
    Directory -->|"selects"| ContentPages

    %% Linking Audio in Chapters and Content
    ChapterPages -->|"media"| Images
    ChapterAudio -->|"media"| Images
    ContentPages -->|"media"| Images
    ContentAudio -->|"media"| Images
    ThreeDModels -->|"media"| Images

    %% Connecting UI with Interactive 3D Module
    Preface -->|"triggers"| ThreeDViewer

    %% Deployment connections from CI/CD Pipeline
    CI -->|"deploys"| Index
    CI -->|"deploys"| Login
    CI -->|"deploys"| Preface
    CI -->|"deploys"| Directory
    CI -->|"deploys"| ChapterPages
    CI -->|"deploys"| ChapterAudio
    CI -->|"deploys"| ContentPages
    CI -->|"deploys"| ContentAudio
    CI -->|"deploys"| ThreeDViewer

    %% Click Events for UI Components
    click Index "https://github.com/cassie-tatibana/echo_in_yue/blob/main/index/index.html"
    click Login "https://github.com/cassie-tatibana/echo_in_yue/blob/main/login.html"
    click Preface "https://github.com/cassie-tatibana/echo_in_yue/blob/main/preface/preface.html"

    %% Click Events for Chapter Module
    click ChapterPages "https://github.com/cassie-tatibana/echo_in_yue/blob/main/chapter/chapter_scripts.js"
    click ChapterAudio "https://github.com/cassie-tatibana/echo_in_yue/tree/main/chapter/voice"

    %% Click Events for Content Module
    click ContentPages "https://github.com/cassie-tatibana/echo_in_yue/blob/main/content/content_scripts.js"
    click ContentAudio "https://github.com/cassie-tatibana/echo_in_yue/tree/main/content/内容音频"

    %% Click Event for Directory
    click Directory "https://github.com/cassie-tatibana/echo_in_yue/blob/main/directory/directory.html"

    %% Click Events for Interactive 3D Module
    click ThreeDViewer "https://github.com/cassie-tatibana/echo_in_yue/blob/main/3D/3D.html"
    click ThreeDModels "https://github.com/cassie-tatibana/echo_in_yue/tree/main/3D/image"

    %% Click Events for Multimedia Assets
    click Images "https://github.com/cassie-tatibana/echo_in_yue/tree/main/general_image"
    click Fonts "https://github.com/cassie-tatibana/echo_in_yue/tree/main/fonts"

    %% Click Event for CI/CD Pipeline
    click CI "https://github.com/cassie-tatibana/echo_in_yue/blob/main/.github/workflows/deploy.yml"

    %% Class Definitions
    classDef ui fill:#ADD8E6,stroke:#000,stroke-width:2px;
    classDef chapter fill:#90EE90,stroke:#000,stroke-width:2px;
    classDef content fill:#AFEEEE,stroke:#000,stroke-width:2px;
    classDef navigation fill:#FFB6C1,stroke:#000,stroke-width:2px;
    classDef threeD fill:#FFD700,stroke:#000,stroke-width:2px;
    classDef assets fill:#D3D3D3,stroke:#000,stroke-width:2px;
    classDef cicd fill:#E6E6FA,stroke:#000,stroke-width:2px;
    classDef external fill:#F5DEB3,stroke:#000,stroke-width:2px;
```
