# juanantoniomn/webpoetozo architecture

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

- Interactive diagram: https://gitdiagram.com/juanantoniomn/webpoetozo
- Repository: https://github.com/juanantoniomn/webpoetozo

## Overview

##### Project type and purpose
- This is a static site built with the Astro framework (“Astro Starter Kit: Basics”), organized around markdown-based content (poems and poem collections).
- Purpose: generate a poem-centric website at build time, serving purely static HTML/CSS/JS to end-users.

##### File structure
- Top-level:
- public/ – static assets (images, favicon) served as-is
- src/ – project source
– assets/ – fonts and images
– components/ – reusable Astro UI components (nav, footer, poema, poemarios, etc.)
– content/ – markdown poems & poemario metadata + config.js + poemas.js (content layer)
– layouts/ – base layout (Layout.astro)
– pages/ – route files: index.astro, dynamic routes at /poema/[slug], /poemarios/[slug]
– script/ – client-side JavaScript (carrusel, transitions, load-more poems)
– styles/ – global CSS (Tailwind)
- astro.config.mjs, tailwind.config.js, tsconfig.json – configuration
- package.json + lock – dependencies & scripts

##### README
- Minimal Astro starter instructions; confirms static SSG workflow, no runtime backend, deployable to any static host.

a. Main components
- Content Layer: markdown files + content config (src/content)
- Build Engine: Astro compiler + Tailwind CSS processor + Node.js scripts
- Component Library: Astro UI components (src/components) + Layouts
- Pages / Routes: dynamic route definitions in src/pages
- Static Assets: public/, src/assets (images/fonts), src/script, src/styles
- Deployment / Hosting: (e.g., Netlify, Vercel, GitHub Pages / CDN)

b. Relationships & interactions
- Content Layer → (feeds) → Astro Build Engine
- Astro Build Engine → (renders) → Pages using Layouts + Components
- Components → (include) → static assets & client scripts
- Build Engine → (outputs) → Dist folder (static HTML/CSS/JS)
- Dist folder → (deployed to) → Hosting + CDN → Browser

c. Architectural patterns
- Static Site Generation (SSG)
- File-based routing (Astro’s pages directory)
- Component-based UI (Astro components)
- Content-as-data (markdown + JS objects)

d. Technologies / frameworks
- Astro (SSG, .astro files)
- Markdown (poems, poemarios)
- Tailwind CSS (global.css + config)
- Node.js (build scripts)
- Client-side JS modules (carrusel, transitions)
- Optional Deployment: Vercel / Netlify / any CDN

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Build Time
    subgraph "Build Time"
        direction TB
        subgraph "Content Layer"
            direction TB
            ContentFiles[/"Poemas & Poemarios Markdown"/]:::data
            click ContentFiles "https://github.com/juanantoniomn/webpoetozo/tree/main/src/content"
            ConfigJS["config.js & poemas.js"]:::config
            click ConfigJS "https://github.com/juanantoniomn/webpoetozo/blob/main/src/content/config.js"
            click ConfigJS "https://github.com/juanantoniomn/webpoetozo/blob/main/src/content/poemas.js"
        end

        subgraph "Component Library"
            direction TB
            Nav["nav.astro"]:::component
            click Nav "https://github.com/juanantoniomn/webpoetozo/blob/main/src/components/nav.astro"
            Footer["footer.astro"]:::component
            click Footer "https://github.com/juanantoniomn/webpoetozo/blob/main/src/components/footer.astro"
            Poema["poema.astro"]:::component
            click Poema "https://github.com/juanantoniomn/webpoetozo/blob/main/src/components/poema.astro"
            PoemaMovil["poemaMovil.astro"]:::component
            click PoemaMovil "https://github.com/juanantoniomn/webpoetozo/blob/main/src/components/poemaMovil.astro"
            Poemario["poemario.astro"]:::component
            click Poemario "https://github.com/juanantoniomn/webpoetozo/blob/main/src/components/poemario.astro"
            PoemariosList["poemarios.astro"]:::component
            click PoemariosList "https://github.com/juanantoniomn/webpoetozo/blob/main/src/components/poemarios.astro"
            PoemsList["poemas.astro"]:::component
            click PoemsList "https://github.com/juanantoniomn/webpoetozo/blob/main/src/components/poemas.astro"
            Versos["versos.astro"]:::component
            click Versos "https://github.com/juanantoniomn/webpoetozo/blob/main/src/components/versos.astro"
            Banner["informacion.astro"]:::component
            click Banner "https://github.com/juanantoniomn/webpoetozo/blob/main/src/components/informacion.astro"
            Welcome["welcome.astro"]:::component
            click Welcome "https://github.com/juanantoniomn/webpoetozo/blob/main/src/components/welcome.astro"
        end

        subgraph "Layouts"
            direction TB
            Layout["Layout.astro"]:::component
            click Layout "https://github.com/juanantoniomn/webpoetozo/blob/main/src/layouts/Layout.astro"
        end

        subgraph "Pages / Routes"
            direction TB
            Home["index.astro"]:::component
            click Home "https://github.com/juanantoniomn/webpoetozo/blob/main/src/pages/index.astro"
            PoemaRoute["poema/[slug].astro"]:::component
            click PoemaRoute "https://github.com/juanantoniomn/webpoetozo/blob/main/src/pages/poema/[slug].astro"
            PoemariosRoute["poemarios/[slug].astro"]:::component
            click PoemariosRoute "https://github.com/juanantoniomn/webpoetozo/blob/main/src/pages/poemarios/[slug].astro"
        end

        subgraph "Static Assets"
            direction TB
            Public["public/ (images, favicon)"]:::asset
            click Public "https://github.com/juanantoniomn/webpoetozo/tree/main/public/"
            ProjectAssets["src/assets"]:::asset
            click ProjectAssets "https://github.com/juanantoniomn/webpoetozo/tree/main/src/assets"
            Fonts["fonts"]:::asset
            click Fonts "https://github.com/juanantoniomn/webpoetozo/tree/main/src/assets/fonts"
            PageImgs["imgpage"]:::asset
            click PageImgs "https://github.com/juanantoniomn/webpoetozo/tree/main/src/assets/imgpage"
            Styles["global.css"]:::asset
            click Styles "https://github.com/juanantoniomn/webpoetozo/blob/main/src/styles/global.css"
        end

        subgraph "Build Engine"
            direction TB
            Engine["Astro Compiler + Tailwind + Node.js"]:::process
            AstroConfig["astro.config.mjs"]:::config
            click AstroConfig "https://github.com/juanantoniomn/webpoetozo/blob/main/astro.config.mjs"
            TailwindConfig["tailwind.config.js"]:::config
            click TailwindConfig "https://github.com/juanantoniomn/webpoetozo/blob/main/tailwind.config.js"
            TSConfig["tsconfig.json"]:::config
            click TSConfig "https://github.com/juanantoniomn/webpoetozo/blob/main/tsconfig.json"
            Package["package.json & lock"]:::config
            click Package "https://github.com/juanantoniomn/webpoetozo/blob/main/package.json"
            click Package "https://github.com/juanantoniomn/webpoetozo/blob/main/package-lock.json"
        end
    end

    %% Build Flow
    ContentFiles -->|feeds content| Engine
    ConfigJS -->|feeds config| Engine
    Nav -->|component| Engine
    Footer -->|component| Engine
    Poema -->|component| Engine
    PoemaMovil -->|component| Engine
    Poemario -->|component| Engine
    PoemariosList -->|component| Engine
    PoemsList -->|component| Engine
    Versos -->|component| Engine
    Banner -->|component| Engine
    Welcome -->|component| Engine
    Layout -->|layout| Engine
    Home -->|page route| Engine
    PoemaRoute -->|page route| Engine
    PoemariosRoute -->|page route| Engine
    Public -->|static assets| Engine
    ProjectAssets -->|static assets| Engine
    Styles -->|styles| Engine
    AstroConfig -->|config| Engine
    TailwindConfig -->|config| Engine
    TSConfig -->|config| Engine
    Package -->|deps| Engine

    %% Output and Deployment
    Engine -->|outputs| Dist["Dist (static HTML/CSS/JS)"]:::output
    Dist -->|deployed to| CDN["Hosting/CDN"]:::cloud
    CDN -->|serves| Browser["Browser"]:::browser

    %% Runtime Scripts
    subgraph "Runtime (Browser)"
        direction TB
        Scripts["Client Scripts"]:::script
        click Scripts "https://github.com/juanantoniomn/webpoetozo/tree/main/src/script"
        Carrusel["carrusel.js"]:::script
        click Carrusel "https://github.com/juanantoniomn/webpoetozo/blob/main/src/script/carrusel.js"
        MasPoemas["masPoemas.js"]:::script
        click MasPoemas "https://github.com/juanantoniomn/webpoetozo/blob/main/src/script/masPoemas.js"
        Transicion["transicion.js"]:::script
        click Transicion "https://github.com/juanantoniomn/webpoetozo/blob/main/src/script/transicion.js"
        Dist -->|loads| Scripts
        Scripts -->|executes in| Browser
    end

    %% Classes
    classDef data fill:#f9f,stroke:#333,stroke-width:1px;
    classDef config fill:#ccf,stroke:#333,stroke-width:1px;
    classDef component fill:#cfc,stroke:#333,stroke-width:1px;
    classDef asset fill:#fcf,stroke:#333,stroke-width:1px;
    classDef process fill:#ffc,stroke:#333,stroke-width:1px;
    classDef output fill:#cff,stroke:#333,stroke-width:1px;
    classDef cloud fill:#cce,stroke:#333,stroke-width:1px;
    classDef browser fill:#eef,stroke:#333,stroke-width:1px;
    classDef script fill:#fdd,stroke:#333,stroke-width:1px;
```
