# yunggialyana/bocchi-rocks-clone architecture

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

- Interactive diagram: https://gitdiagram.com/yunggialyana/bocchi-rocks-clone
- Repository: https://github.com/yunggialyana/bocchi-rocks-clone

## Overview

##### Project Type and Purpose
- This project is a front-end website clone (a static/dynamic site) that replicates the look and feel of the "Bocchi the Rock!" website.
- The README and file structure indicate the site features dynamic news content, interactive GSAP animations, and a responsive design. It uses central JSON data (news-data.json) to auto-generate content on both the homepage (index.html) and the news page (news.html).

##### File Structure
- Top-Level Files:
- index.html and news.html are the main entry points for the website.
- README.md contains the project documentation.
- Assets Folder Breakdown:
- /assets/css: Contains style sheets (style.css for base styles and news.css for the news page-specific styles).
- /assets/js: Contains JavaScript files including:
- script.js: Main website logic.
- news.js: Specific logic for the news page.
- shared.js: Common functionalities used across pages.
- /assets/data: Contains news-data.json which serves as a centralized data source for dynamically generated content.
- /assets/img: Stores images used in the website.
- The folder structure shows a clear separation between presentation (HTML and CSS), behavior (JavaScript), and content/data (JSON).

##### README for Additional Insights
- The README highlights core features including a dynamic news system, GSAP animations, and responsive design.
- It provides details on new centralized data handling and the use of modern JavaScript (ES6+), GSAP for animations, and semantic HTML5.
- The project is designed as an open-source educational tool, which means clean separation of concerns is an important design philosophy.

##### Final Advice
- Be very detailed. Clearly separate the project into its conceptual components as above.
- Do not overlook the new centralized data system in /assets/data and the role of shared.js to handle common dynamic functionalities across both pages.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Frontend Interface
    subgraph "Frontend Interface"
        IDX["index.html"]:::frontend
        NEWS["news.html"]:::frontend
    end

    %% CSS Styling
    subgraph "CSS Styling"
        STYLE["style.css"]:::css
        NEWS_STYLE["news.css"]:::css
    end

    %% JavaScript Logic
    subgraph "JavaScript Logic"
        SCRIPT["script.js"]:::js
        NEWS_JS["news.js"]:::js
        SHARED_JS["shared.js"]:::js
    end

    %% Data Layer and Assets
    DATA(("news-data.json")):::data
    ASSETS["Images"]:::assets

    %% Relationships between HTML and CSS
    IDX -->|"references"| STYLE
    NEWS -->|"references"| NEWS_STYLE

    %% HTML Includes JavaScript
    IDX -->|"includes"| SCRIPT
    IDX -->|"includes"| SHARED_JS
    NEWS -->|"includes"| NEWS_JS
    NEWS -->|"includes"| SHARED_JS

    %% JavaScript modifies DOM
    SCRIPT -->|"modifies"| IDX
    SHARED_JS -->|"modifies"| IDX
    SHARED_JS -->|"modifies"| NEWS
    NEWS_JS -->|"modifies"| NEWS

    %% JavaScript fetches data
    NEWS_JS -->|"fetches"| DATA
    SHARED_JS -->|"fetches"| DATA

    %% HTML uses Assets
    IDX -->|"uses"| ASSETS
    NEWS -->|"uses"| ASSETS

    %% Styles
    classDef frontend fill:#cce5ff,stroke:#2b8dd7,stroke-width:2px;
    classDef css fill:#fde2e4,stroke:#f08a24,stroke-width:2px;
    classDef js fill:#e2f0cb,stroke:#8cbf26,stroke-width:2px;
    classDef data fill:#fff2cc,stroke:#e7a700,stroke-width:2px;
    classDef assets fill:#d5e8d4,stroke:#82b366,stroke-width:2px;

    %% Click Events
    click IDX "https://github.com/yunggialyana/bocchi-rocks-clone/blob/main/index.html"
    click NEWS "https://github.com/yunggialyana/bocchi-rocks-clone/blob/main/news.html"
    click STYLE "https://github.com/yunggialyana/bocchi-rocks-clone/blob/main/assets/css/style.css"
    click NEWS_STYLE "https://github.com/yunggialyana/bocchi-rocks-clone/blob/main/assets/css/news.css"
    click SCRIPT "https://github.com/yunggialyana/bocchi-rocks-clone/blob/main/assets/js/script.js"
    click NEWS_JS "https://github.com/yunggialyana/bocchi-rocks-clone/blob/main/assets/js/news.js"
    click SHARED_JS "https://github.com/yunggialyana/bocchi-rocks-clone/blob/main/assets/js/shared.js"
    click DATA "https://github.com/yunggialyana/bocchi-rocks-clone/blob/main/assets/data/news-data.json"
    click ASSETS "https://github.com/yunggialyana/bocchi-rocks-clone/tree/main/assets/img"
```
