# nestorandres1215/buscador-de-peliculas-japonesas architecture

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

- Interactive diagram: https://gitdiagram.com/nestorandres1215/buscador-de-peliculas-japonesas
- Repository: https://github.com/nestorandres1215/buscador-de-peliculas-japonesas

## Overview

##### Main Components
- User Interface: Represented by the static HTML (index.html) and styled using CSS (style.css) along with Bootstrap 5 to ensure a modern, responsive design.
- Client-Side Logic: The JavaScript (script.js) handles dynamic user interactions, search functionality, filtering of movies (by name and release year), and API calls.
- External Data Source: The Studio Ghibli API that feeds movie details (title, synopsis, director, release date, etc.) to the application.

##### Relationships and Data Flow
- User interacts with the UI (index.html) on the browser.
- UI events (e.g., search input, filter criteria) are captured and processed by script.js.
- script.js sends requests to the Studio Ghibli API to fetch movie data.
- Upon receiving data, script.js updates the UI dynamically to display search results and detailed information.

##### Architectural Patterns and Design Principles
- Separation of Concerns: Differentiate clearly between presentation (HTML/CSS), behavior (JavaScript), and data (external API).
- Client-Side Rendering: Emphasize the dynamic update of the UI without needing a build-backend.
- Responsive Design: Mention the use of Bootstrap 5 to ensure the application’s layout adapts to various device sizes.

##### Technologies and Frameworks
- HTML for the static markup.
- CSS and Bootstrap 5 for styling and responsive behaviors.
- JavaScript for client-side interactivity and API integration.
- Studio Ghibli API as the external data provider.

##### Detail
- Every major piece of the architecture is represented with its interactions.
- Even though the project is relatively simple, breaking it into components (UI, Logic, External Service) will provide clarity.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Global nodes
    U["User/Browser"]:::user
    
    %% UI Layer Subgraph
    subgraph "UI Layer"
        HT["index.html"]:::ui
        CS["style.css + Bootstrap5"]:::ui
    end

    %% Client-Side Logic
    JS["script.js"]:::logic

    %% External API
    API["Studio Ghibli API"]:::external

    %% Connections
    U -->|"loads"| HT
    HT -->|"applies"| CS
    HT -->|"triggers events"| JS
    JS -->|"APIRequest"| API
    API -->|"APIData"| JS
    JS -->|"updates UI"| HT

    %% Click Events
    click HT "https://github.com/nestorandres1215/buscador-de-peliculas-japonesas/blob/master/index.html"
    click CS "https://github.com/nestorandres1215/buscador-de-peliculas-japonesas/blob/master/style.css"
    click JS "https://github.com/nestorandres1215/buscador-de-peliculas-japonesas/blob/master/script.js"

    %% Styles
    classDef user fill:#AED6F1,stroke:#1B4F72,stroke-width:2px;
    classDef ui fill:#A9DFBF,stroke:#239B56,stroke-width:2px;
    classDef logic fill:#F9E79F,stroke:#B7950B,stroke-width:2px;
    classDef external fill:#F5CBA7,stroke:#D35400,stroke-width:2px;
```
