# soydetemporada/website architecture

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

- Interactive diagram: https://gitdiagram.com/soydetemporada/website
- Repository: https://github.com/soydetemporada/website

## Overview

##### Data Ingestion and Processing Layer
- A set of scripts (in the _scripts folder and various PHP, Python, and notebook files) whose purpose is to clean, import, transform, and generate the necessary data (from CSV, Excel, JSON files under _data, data, and _products).

##### Static Site Generation (Build) Layer
- Build pipeline using Ruby gems (Gemfile) and configuration files (_config.yml, _config-devel.yml) to run the static site generator (Jekyll).
- That it takes as input:
– Layouts (_layouts), includes (_includes), Sass/CSS (_sass, css), and multi-language content (_i18n)
– Data files from _data and content pages (markdown files in _products, etc.)

##### Client-Facing Frontend
- Browser/client that downloads the static HTML, CSS, and JavaScript resources (js folder, manifest.json for offline support).
- Interactive components such as the seasonal “Buscador” (search), “Investigación”, “Petición” and upcoming “Recetas” sections.
- Mention that geolocation and offline capabilities are achieved via JavaScript (e.g., the use of service workers implied by manifest.json) and that the front-end uses i18n support (from _i18n) to display multilingual content.

##### Data and Content Storage
– The raw/auxiliary data files (data, _data directories)
– Product listings and details (from both _products and _data/products)
– Configuration files used by the build process
- That these are consumed by both the ETL scripts and by the static-site generator.

##### Integration & Deployment
- Although this is not a full backend system, illustrate how the “Build Pipeline” is triggered (by a developer commit to the Git repository, continuous integration scripts, or manual build using the provided shell scripts such as generate-beta.sh and install_missing.sh).
- That the final website is then deployed on a static hosting platform (e.g., GitHub Pages or another similar service).

##### Architectural Patterns and Design Principles
- Separation of concerns: the data ingestion/processing layer is separated from the static site build and the client rendering.
- Reuse/integration of multiple languages (Ruby, PHP, Python) in the ETL layer.
- Internationalization support (i18n) as a cross-cutting concern offered in the content files.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Data Processing Layer
    subgraph "Data Processing Layer"
        RawData["Raw Data Sources"]
        ETL["ETL/Data Processing Scripts"]
    end
    RawData -->|"RawData→CleanedData"| ETL

    %% Data & Content Storage
    subgraph "Data & Content Storage"
        RawStore["Raw/Auxiliary Data"]
        ProductData["Product Data"]
    end
    RawData -->|"Stores raw data"| RawStore
    ETL -->|"Outputs processed data"| ProductData

    %% Static Site Build Layer
    subgraph "Static Site Build Layer"
        RC["Ruby & Config (Gemfile, _config.yml, _config-devel.yml)"]
        TL["Templates & Layouts (_layouts, _includes)"]
        Sass["Styling (Sass: _sass)"]
        I18n["Internationalization (_i18n)"]
        StaticGen["Static Site Generator"]
        SiteArtifact["Artifact: Static Website"]
    end
    RC -->|"Uses"| StaticGen
    TL -->|"Uses"| StaticGen
    Sass -->|"Uses"| StaticGen
    I18n -->|"Uses"| StaticGen
    RawStore -->|"Data input"| StaticGen
    ProductData -->|"Data input"| StaticGen

    %% Integration & Deployment
    subgraph "Integration & Deployment"
        DS["Deployment Scripts (_scripts/generate-beta.sh, _scripts/install_missing.sh)"]
    end
    DS -->|"TriggersBuild"| StaticGen
    StaticGen -->|"Generates"| SiteArtifact

    %% Client-Facing Frontend
    subgraph "Client-Facing Frontend"
        CA["Client Assets (index.html, js, manifest.json, css)"]
        CB["Client Browser"]
    end
    SiteArtifact -->|"Serves"| CA
    CA -->|"Loads"| CB

    %% Styles
    classDef etl fill:#f96,stroke:#333,stroke-width:2px;
    classDef raw fill:#ccf,stroke:#333,stroke-width:2px;
    classDef product fill:#cff,stroke:#333,stroke-width:2px;
    classDef build fill:#9f6,stroke:#333,stroke-width:2px;
    classDef deployment fill:#fc9,stroke:#333,stroke-width:2px;
    classDef client fill:#9cf,stroke:#333,stroke-width:2px;

    class RawData raw;
    class ETL etl;
    class RawStore raw;
    class ProductData product;
    class RC,TL,Sass,I18n,StaticGen,SiteArtifact build;
    class DS deployment;
    class CA,CB client;

    %% Click Events
    click ETL "https://github.com/soydetemporada/website/tree/master/_scripts"
    click RawStore "https://github.com/soydetemporada/website/tree/master/_data"
    click ProductData "https://github.com/soydetemporada/website/tree/master/_products"
    click RC "https://github.com/soydetemporada/website/tree/master/Gemfile"
    click TL "https://github.com/soydetemporada/website/tree/master/_layouts"
    click Sass "https://github.com/soydetemporada/website/tree/master/_sass"
    click I18n "https://github.com/soydetemporada/website/tree/master/_i18n"
    click DS "https://github.com/soydetemporada/website/blob/master/_scripts/generate-beta.sh"
    click CA "https://github.com/soydetemporada/website/blob/master/index.html"
```
