# carlosjroo/esland-web architecture

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

- Interactive diagram: https://gitdiagram.com/carlosjroo/esland-web
- Repository: https://github.com/carlosjroo/esland-web

## Overview

This project is an Astro-based static website that reimagines the ESLAND page for educational and demonstrative purposes. The architecture leverages component-driven development with Astro at its core and integrates TailwindCSS for styling, Typescript for type safety, and supporting libraries for animations and fonts.

##### Project Type & Purpose
- It is essentially a content-driven, front-end web application built using Astro.
- The purpose is to build a modern, multi-language website that serves static content (e.g., pages, images, videos) and demonstrates component reusability with a clear separation of concerns.

##### Main Components
a. Astro Core & Configuration:
- Astro configuration file (astro.config.mjs) which sets up the build and routing.

b. Frontend Layer (UI Components & Pages):
- Existence of language-specific pages (e.g., index.astro, archivo.astro, src/pages/ca/index.astro, etc.) indicating routing and internationalization.
- A block for “Layouts” (src/layouts/Layout.astro) which wrap page content and maintain consistent structure.
- “Components” block (src/components) that includes header, footer, video, button, etc.
- These components are reused across pages, establishing a modular design.

c. Internationalization (i18n):

d. Static Assets and Public Directory:
- “Public” directory containing static files like images (logo.svg), videos (video.webm), fonts, and specific content pages (archivo-page) with their nested structure.
- This block shows where assets are served directly and delineates content organization (e.g., separate folders for editions, galleries, palmares, and responsive image folders like desktop/mobile).

e. Styling & Build Tools:
- Nodes for Tailwind configuration (tailwind.config.mjs) and TypeScript configuration (tsconfig.json) indicating the underpinning styling and compilation/setup processes.
- Optionally, include a reference to extended Tailwind utilities (tailwindcss-animated) and font support (fontsource).

##### Component Relationships & Interactions
- User requests are handled by Astro’s routing which maps URL paths to files in src/pages.
- Pages use layouts (from src/layouts) and integrate multiple UI components (from src/components).
- The i18n module feeds localization data to pages—demonstrating how language files (ca.json, es.json) are used.
- The static assets in the public directory supplement the content and UI elements.
- That build and deployment processes (dev, build, preview commands) orchestrate these files’ interactions through the build system configured in Astro.

##### Architectural Patterns & Design Principles
- The project clearly follows a component-based architecture, emphasized by a distinct separation between pages, layouts, and smaller UI components.
- It uses file-based routing, a common pattern in Astro, where the folder structure directly corresponds to URL paths.
- Reusability and modularity in how the project separates aspects such as internationalization, static assets, and component styling.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Astro Core & Configuration
    subgraph "Astro Core & Configuration"
        AC["astro.config.mjs"]:::core
        PKG["package.json"]:::core
        PNPM["pnpm-lock.yaml"]:::core
    end

    %% Styling & Build Tools
    subgraph "Styling & Build Tools"
        TW["tailwind.config.mjs"]:::build
        TS["tsconfig.json"]:::build
    end

    %% Frontend Layer
    subgraph "Frontend Layer"
        subgraph "Pages"
            PAGES["Pages (src/pages)"]:::frontend
        end
        subgraph "Layouts"
            LAYOUT["Layout (src/layouts/Layout.astro)"]:::frontend
        end
        subgraph "UI Components"
            COMPONENTS["Components (src/components)"]:::frontend
        end
    end

    %% Internationalization
    I18N["i18n (src/i18n)"]:::i18n

    %% Static Assets and Public Directory
    PUBLIC["Public Directory"]:::static

    %% Connections
    AC -->|"routing"| PAGES
    PAGES -->|"wraps"| LAYOUT
    LAYOUT -->|"integrates"| COMPONENTS
    I18N -->|"providesLocalization"| PAGES
    PUBLIC -->|"servesAssets"| COMPONENTS
    TW -->|"styles"| COMPONENTS
    TS -->|"configures"| COMPONENTS

    %% Styles
    classDef core fill:#f9e79f,stroke:#b9770e,stroke-width:2px;
    classDef frontend fill:#aed6f1,stroke:#2471a3,stroke-width:2px;
    classDef build fill:#fad7a0,stroke:#e67e22,stroke-width:2px;
    classDef i18n fill:#a9dfbf,stroke:#27ae60,stroke-width:2px;
    classDef static fill:#d5dbdb,stroke:#7f8c8d,stroke-width:2px;

    %% Click Events
    click AC "https://github.com/carlosjroo/esland-web/blob/main/astro.config.mjs"
    click PKG "https://github.com/carlosjroo/esland-web/blob/main/package.json"
    click PNPM "https://github.com/carlosjroo/esland-web/blob/main/pnpm-lock.yaml"
    click TW "https://github.com/carlosjroo/esland-web/blob/main/tailwind.config.mjs"
    click TS "https://github.com/carlosjroo/esland-web/blob/main/tsconfig.json"
    click PAGES "https://github.com/carlosjroo/esland-web/tree/main/src/pages"
    click LAYOUT "https://github.com/carlosjroo/esland-web/blob/main/src/layouts/Layout.astro"
    click COMPONENTS "https://github.com/carlosjroo/esland-web/tree/main/src/components"
    click I18N "https://github.com/carlosjroo/esland-web/tree/main/src/i18n"
    click PUBLIC "https://github.com/carlosjroo/esland-web/tree/main/public"
```
