# alvarorojas1101/invitacion-boda architecture

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

- Interactive diagram: https://gitdiagram.com/alvarorojas1101/invitacion-boda
- Repository: https://github.com/alvarorojas1101/invitacion-boda

## Overview

##### Project type and purpose
- This is a JAMstack “static” website built with Astro.
- It delivers mostly pre‑rendered pages (e.g., index.astro, various section .astro components) and offers interactive features (attendance registration, music controls, modals) via Firebase.

##### File structure
- Top‑level artifacts:
- astro.config.mjs, tailwind.config.mjs, tsconfig.json → build/pipeline/config
- public/ → static assets (MP3, photos, favicon)
- src/ → application code
· components/ → UI widgets (modals, cards, music controls)
· layouts/ → page layout wrappers
· pages/ → route endpoints (Astro routes)
· sections/ → larger page segments
· firebase.js & src/env.d.ts → client‑side Firebase SDK initialization and type definitions
- No separate “backend” folder: dynamic interactions handled in the client via Firebase.

##### Extract additional insights from the README
- This uses Astro’s “basics” template.
- There is no built‑in server or custom API—everything beyond static content uses client calls to Firebase.

a. Build & Deployment Pipeline
- Astro CLI + Tailwind → builds static HTML/CSS/JS → deploy to static host or CDN
b. Static Hosting / CDN
- Serves pre‑rendered HTML, CSS, JS, public assets
c. Client Browser (User)
- Fetches pages; loads Astro Islands (JS for interactive widgets)
- Executes components: AsistenciaModal, Music Controls, etc.
d. Firebase (BaaS)
- Auth (if used)
- Firestore or Realtime Database for attendance, messages
- Storage (optional) if uploading assets
e. External Services
- Instagram embed (via section/Instagram.astro)
- Potential analytics or other 3rd‑party widgets

##### Architectural patterns & technologies
- JAMstack / static site generation + client‑side hydration (“Astro Island” pattern)
- Component‑based UI (Astro, JSX)
- Tailwind CSS for styling
- Firebase as a serverless backend
- Sectioned page layout: modular “sections” and “components”

##### Final checklist
– Build pipeline
– Static host / CDN
– Client browser with Astro Islands & component folders
– Firebase services (Auth/DB/Storage)
– External APIs (Instagram embed)

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Build & Deployment Pipeline
    subgraph "Build & Deployment Pipeline"
        AC["astro.config.mjs"]:::build
        TC["tailwind.config.mjs"]:::build
        TS["tsconfig.json"]:::build
        CLI["Astro CLI + Tailwind"]:::build
        AC --> CLI
        TC --> CLI
        TS --> CLI
    end

    %% Static Hosting / CDN
    subgraph "Static Hosting / CDN"
        PUB["public/"]:::cdn
        MP3["cancion-fondo.mp3"]:::cdn
        PH["photos/"]:::cdn
        CDN["Static Host / CDN"]:::cdn
        PUB --> MP3
        PUB --> PH
        PUB --> CDN
    end

    CLI -->|"build to dist/"| PUB

    %% Client Browser
    subgraph "Client Browser"
        subgraph "Pages & Layouts"
            IDX["src/pages/index.astro"]:::client
            LYT["src/layouts/Layout.astro"]:::client
        end
        subgraph "Astro Islands (Interactive UI)"
            AM["AsistenciaModal.jsx"]:::island
            DM["DressCodeModal.jsx"]:::island
            MM["MusicaModal.jsx"]:::island
            CM["ControlMusic.jsx"]:::island
            TM["TipsModal.jsx"]:::island
            LD["Loader.jsx"]:::island
            MR["MessageRegistroAsistencia.jsx"]:::island
        end
        subgraph "Presentational Components"
            Card["Card.astro"]:::present
            CP["CardParty.jsx"]:::present
            Div["Divider.astro"]:::present
            MC["MessageCard.astro"]:::present
            Tit["Title.astro"]:::present
        end
        subgraph "Sections"
            H["Hero.astro"]:::section
            I["Intro.astro"]:::section
            PD["PrincipalDate.astro"]:::section
            CD["Countdown.astro"]:::section
            P["Party.astro"]:::section
            M["Message.astro"]:::section
            F["Footer.astro"]:::section
            IG["Instagram.astro"]:::section
        end
        subgraph "Icons"
            IP["IconPlayMusic.astro"]:::icon
            IS["IconStopMusic.astro"]:::icon
            II["InstagramIcon.astro"]:::icon
        end
        FI["src/firebase.js"]:::client
        ENV["src/env.d.ts"]:::client
    end

    CDN -->|"HTTP GET"| IDX
    IDX -->|"uses layout"| LYT
    IDX -->|"hydrates"| AM
    IDX -->|"hydrates"| MM
    IDX -->|"hydrates"| DM
    AM -->|"init via SDK"| FI
    FI -->|"reads/writes"| DB
    DB["Firestore/Realtime DB"]:::firebase
    Auth["Auth"]:::firebase
    Storage["Storage"]:::firebase
    DB --> AM
    Auth --> FI
    Storage --> CM

    %% External Services
    subgraph "External Services"
        IGAPI["Instagram Embed API"]:::external
    end
    IG -->|"embed script"| IGAPI

    %% Click Events
    click AC "https://github.com/alvarorojas1101/invitacion-boda/blob/main/astro.config.mjs"
    click TC "https://github.com/alvarorojas1101/invitacion-boda/blob/main/tailwind.config.mjs"
    click TS "https://github.com/alvarorojas1101/invitacion-boda/blob/main/tsconfig.json"
    click MP3 "https://github.com/alvarorojas1101/invitacion-boda/blob/main/public/cancion-fondo.mp3"
    click PH "https://github.com/alvarorojas1101/invitacion-boda/tree/main/public/photos/"
    click PUB "https://github.com/alvarorojas1101/invitacion-boda/tree/main/public/"
    click IDX "https://github.com/alvarorojas1101/invitacion-boda/blob/main/src/pages/index.astro"
    click LYT "https://github.com/alvarorojas1101/invitacion-boda/blob/main/src/layouts/Layout.astro"
    click AM "https://github.com/alvarorojas1101/invitacion-boda/blob/main/src/components/AsistenciaModal.jsx"
    click DM "https://github.com/alvarorojas1101/invitacion-boda/blob/main/src/components/DressCodeModal.jsx"
    click MM "https://github.com/alvarorojas1101/invitacion-boda/blob/main/src/components/MusicaModal.jsx"
    click CM "https://github.com/alvarorojas1101/invitacion-boda/blob/main/src/components/ControlMusic.jsx"
    click TM "https://github.com/alvarorojas1101/invitacion-boda/blob/main/src/components/TipsModal.jsx"
    click LD "https://github.com/alvarorojas1101/invitacion-boda/blob/main/src/components/Loader.jsx"
    click MR "https://github.com/alvarorojas1101/invitacion-boda/blob/main/src/components/MessageRegistroAsistencia.jsx"
    click Card "https://github.com/alvarorojas1101/invitacion-boda/blob/main/src/components/Card.astro"
    click CP "https://github.com/alvarorojas1101/invitacion-boda/blob/main/src/components/CardParty.jsx"
    click Div "https://github.com/alvarorojas1101/invitacion-boda/blob/main/src/components/Divider.astro"
    click MC "https://github.com/alvarorojas1101/invitacion-boda/blob/main/src/components/MessageCard.astro"
    click Tit "https://github.com/alvarorojas1101/invitacion-boda/blob/main/src/components/Title.astro"
    click H "https://github.com/alvarorojas1101/invitacion-boda/blob/main/src/sections/Hero.astro"
    click I "https://github.com/alvarorojas1101/invitacion-boda/blob/main/src/sections/Intro.astro"
    click PD "https://github.com/alvarorojas1101/invitacion-boda/blob/main/src/sections/PrincipalDate.astro"
    click CD "https://github.com/alvarorojas1101/invitacion-boda/blob/main/src/sections/Countdown.astro"
    click P "https://github.com/alvarorojas1101/invitacion-boda/blob/main/src/sections/Party.astro"
    click M "https://github.com/alvarorojas1101/invitacion-boda/blob/main/src/sections/Message.astro"
    click F "https://github.com/alvarorojas1101/invitacion-boda/blob/main/src/sections/Footer.astro"
    click IG "https://github.com/alvarorojas1101/invitacion-boda/blob/main/src/sections/Instagram.astro"
    click IP "https://github.com/alvarorojas1101/invitacion-boda/blob/main/src/icons/IconPlayMusic.astro"
    click IS "https://github.com/alvarorojas1101/invitacion-boda/blob/main/src/icons/IconStopMusic.astro"
    click II "https://github.com/alvarorojas1101/invitacion-boda/blob/main/src/icons/InstagramIcon.astro"
    click FI "https://github.com/alvarorojas1101/invitacion-boda/blob/main/src/firebase.js"
    click ENV "https://github.com/alvarorojas1101/invitacion-boda/blob/main/src/env.d.ts"

    %% Styles
    classDef build fill:#DDDDDD,stroke:#333;
    classDef cdn fill:#6699FF,stroke:#333;
    classDef client fill:#99FF99,stroke:#333;
    classDef island fill:#CCFFCC,stroke:#333;
    classDef present fill:#CCFFCC,stroke:#333;
    classDef section fill:#CCFFCC,stroke:#333;
    classDef icon fill:#CCFFCC,stroke:#333;
    classDef firebase fill:#FFCC66,stroke:#333;
    classDef external fill:#CC99FF,stroke:#333;
```
