# cresenciocl/biopixel-public architecture

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

- Interactive diagram: https://gitdiagram.com/cresenciocl/biopixel-public
- Repository: https://github.com/cresenciocl/biopixel-public

## Overview

##### Project Type and Purpose
- This is a static, multi-language website intended for deployment on GitHub Pages.
- It uses plain HTML, CSS, and JavaScript plus JSON files for internationalization (i18n).

##### Main Components
a. Client (Web Browser)
- Renders HTML/CSS, executes JavaScript, displays images.
b. Hosting Platform
- GitHub Pages (a static site host/CDN).
c. Static Assets
- HTML files: index.html, about.html, contacto.html, test_i18n.html
- CSS: style.css
- JavaScript:
- i18n.js (loads locale JSON based on user’s language)
- form-handler.js (captures form submissions)
- header-scroll.js, mobile-menu.js, smooth-scroll.js (UI behaviors)
- Images: /images directory
d. Locale Data
- JSON files: en.json, es.json, nl.json (text strings per language)
e. Optional External Service
- form-handler.js may POST to a third-party endpoint (e.g., Formspree, Netlify Forms).

##### Relationships and Data Flows
- Browser requests HTML from GitHub Pages.
- HTML references style.css and UI-behavior scripts.
- i18n.js loads the correct JSON file at runtime and replaces text nodes.
- User interactions (scroll, menu clicks) are handled by the various UI JS modules.
- When a user submits a form, form-handler.js serializes the data and sends it to the configured endpoint.
- All static resources are fetched from GitHub Pages CDN.

##### Architectural Patterns and Design Principles
- Static Site Architecture: no backend code in this repo.
- Separation of concerns:
- Structure: HTML
- Presentation: CSS
- Behavior: Modular JS (one module per UI concern)
- Content: JSON locale files
- Deployment as immutable assets on CDN (GitHub Pages).

##### Checklist
- All major files or logical groupings shown.
- Hosting/CDN
- Browser
- Static resource types (HTML/CSS/JS/JSON/images)
- External service
- Clear component names and data-flow annotations.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph "Client Browser"
        Browser["Web Browser"]:::client
    end

    subgraph "GitHub Pages CDN"
        CDN["GitHub Pages CDN"]:::hosting
    end

    subgraph "Static Assets"
        subgraph "HTML Pages"
            IDX["index.html"]:::assets
            ABOUT["about.html"]:::assets
            CONTACT["contacto.html"]:::assets
            TEST["test_i18n.html"]:::assets
        end
        STYLE["style.css"]:::assets
        subgraph "JS Modules"
            I18N["i18n.js"]:::assets
            FORM["form-handler.js"]:::assets
            HS["header-scroll.js"]:::assets
            MM["mobile-menu.js"]:::assets
            SS["smooth-scroll.js"]:::assets
        end
        IMGS["images/"]:::assets
        subgraph "Locale JSON"
            EN["en.json"]:::data
            ES["es.json"]:::data
            NL["nl.json"]:::data
        end
    end

    External["External Form Endpoint"]:::external

    %% Data Flows
    Browser -->|GET HTML/CSS/JS/JSON/images| CDN
    CDN -->|SERVES assets| Browser
    Browser -->|POST form data| External

    %% Asset References
    IDX -->|references CSS| STYLE
    ABOUT -->|references CSS| STYLE
    CONTACT -->|references CSS| STYLE
    TEST -->|references CSS| STYLE

    IDX -->|loads JS| I18N
    IDX -->|loads JS| FORM
    IDX -->|loads JS| HS
    IDX -->|loads JS| MM
    IDX -->|loads JS| SS

    ABOUT -->|loads JS| I18N
    ABOUT -->|loads JS| FORM
    CONTACT -->|loads JS| I18N
    CONTACT -->|loads JS| FORM
    TEST -->|loads JS| I18N

    I18N -->|load JSON| EN
    I18N -->|load JSON| ES
    I18N -->|load JSON| NL

    %% Click Events
    click IDX "https://github.com/cresenciocl/biopixel-public/blob/create-website-project/index.html"
    click ABOUT "https://github.com/cresenciocl/biopixel-public/blob/create-website-project/about.html"
    click CONTACT "https://github.com/cresenciocl/biopixel-public/blob/create-website-project/contacto.html"
    click TEST "https://github.com/cresenciocl/biopixel-public/blob/create-website-project/test_i18n.html"
    click STYLE "https://github.com/cresenciocl/biopixel-public/blob/create-website-project/style.css"
    click I18N "https://github.com/cresenciocl/biopixel-public/blob/create-website-project/i18n.js"
    click FORM "https://github.com/cresenciocl/biopixel-public/blob/create-website-project/form-handler.js"
    click HS "https://github.com/cresenciocl/biopixel-public/blob/create-website-project/header-scroll.js"
    click MM "https://github.com/cresenciocl/biopixel-public/blob/create-website-project/mobile-menu.js"
    click SS "https://github.com/cresenciocl/biopixel-public/blob/create-website-project/smooth-scroll.js"
    click EN "https://github.com/cresenciocl/biopixel-public/blob/create-website-project/en.json"
    click ES "https://github.com/cresenciocl/biopixel-public/blob/create-website-project/es.json"
    click NL "https://github.com/cresenciocl/biopixel-public/blob/create-website-project/nl.json"
    click IMGS "https://github.com/cresenciocl/biopixel-public/tree/create-website-project/images/"

    %% Styles
    classDef client fill:#ADD8E6,stroke:#000,stroke-width:1px
    classDef hosting fill:#90EE90,stroke:#000,stroke-width:1px
    classDef assets fill:#FFD580,stroke:#000,stroke-width:1px
    classDef data fill:#FFD580,stroke:#000,stroke-width:1px
    classDef external fill:#D8BFD8,stroke:#000,stroke-width:1px
```
