# arnaupinyol/lista-de-fundas architecture

> Architecture diagram of the GitHub repository arnaupinyol/lista-de-fundas, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-08-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/arnaupinyol/lista-de-fundas
- Repository: https://github.com/arnaupinyol/lista-de-fundas

## Overview

##### Project Type and Purpose
- This is a single-page application (SPA) built with React, styled with Tailwind/PostCSS, and bundled by Vite.
- It has no backend services; all data lives in static JS modules under `src/data`. The UI lets users browse a catalog via components like `CatalogViewer`, `FundaViewer`, etc.

##### File-Structure Analysis
- Top-level:
- index.html – host page for the React app
- package.json & lock – npm dependencies & scripts
- Vite/Tailwind/PostCSS configs – build & styling pipeline
- src/
- main.jsx – React app entry point
- App.jsx – root component
- assets/ – static images/logos
- data/ – catalog.js & designs.js (static “database”)
- components/ – reusable UI pieces (sidebar, selectors, viewers)
- index.css – global styles

##### README Insights
- (Empty) – assume standard React + Vite SPA deployment to a static host/CDN.

##### Components
a. User & Browser
- User → Browser (runs the SPA)
b. Static Hosting Layer
- CDN / Static Web Server (e.g., Vercel, Netlify) serves index.html, JS/CSS bundles, assets
c. Build Pipeline (toolchain)
- Developer machine & CI → npm scripts → Vite (bundles JS/CSS) → PostCSS/Tailwind (styles) → dist/
d. Runtime App Components
- App Shell (Router, Context Providers)
- UI Components:
- CarreteSidebar
- MarcaSelector & ModeloSelector
- CatalogViewer & FundaViewer
- Data Layer:
- Static data modules (catalog.js, designs.js)
e. Optional External Services (if any in future)
- Analytics, Error Logging, Feature Flags

##### Relationships & Data Flow
- User actions (click selectors) → UI Components trigger state updates (React Context or props) → Data Layer (static JS) provides data → Components render views.
- Build Pipeline compiles source → produces static assets → deployed to CDN → served to the browser.

##### Architectural Patterns & Principles
- Component-based UI (React)
- Separation of Concerns:
- Styling (Tailwind/PostCSS) vs. Layout vs. Data
- Build Pipeline vs. Runtime
- Single source of truth for catalog data (static modules)

##### Detail Level
- Call out PostCSS/Tailwind as part of the styling sub-pipeline.
- Vite dev server separately from the production CDN.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% External Entities
    User["User"]:::external
    Browser["Browser"]:::external

    %% Development & Build Pipeline
    subgraph "Development & Build"
        direction TB
        DEV["Developer & CI"]:::build
        PKG["package.json"]:::build
        LOCK["package-lock.json"]:::build
        NPM["npm scripts"]:::build
        VITE["Vite"]:::build
        POSTCSS["PostCSS"]:::build
        TAILWIND["Tailwind"]:::build
        DIST["dist/ (build output)"]:::build

        DEV --> PKG
        DEV --> LOCK
        PKG --> NPM
        LOCK --> NPM
        NPM --> VITE
        VITE --> POSTCSS
        POSTCSS --> TAILWIND
        TAILWIND --> DIST
    end

    %% Hosting & CDN
    subgraph "Hosting & CDN"
        direction TB
        CDN["Static Web Server / CDN"]:::hosting
        DIST --> CDN
    end

    %% Browser Runtime
    subgraph "Browser Runtime"
        direction TB
        SPA["index.html"]:::runtime
        JSBundle["JS & CSS Bundles"]:::runtime

        SPA --> JSBundle

        subgraph "Application"
            direction TB
            Main["main.jsx"]:::runtime
            AppShell["App Shell"]:::runtime
            Styles["index.css"]:::runtime

            Main --> AppShell
            Main --> Styles

            subgraph "UI Components"
                direction TB
                Sidebar["CarreteSidebar"]:::runtime
                MarcaSel["MarcaSelector"]:::runtime
                ModeloSel["ModeloSelector"]:::runtime
                CatalogView["CatalogViewer"]:::runtime
                FundaView["FundaViewer"]:::runtime
            end

            subgraph "Data Layer"
                direction TB
                CatalogData["catalog.js"]:::static
                DesignsData["designs.js"]:::static
            end

            AppShell --> Sidebar
            AppShell --> MarcaSel
            AppShell --> ModeloSel
            AppShell --> CatalogView
            AppShell --> FundaView

            MarcaSel -->|"props/state"| CatalogView
            ModeloSel -->|"props/state"| CatalogView
            CatalogView -->|"import"| CatalogData
            FundaView -->|"import"| DesignsData
        end
    end

    %% User Interaction & Flow
    User -->|"uses"| Browser
    Browser -->|"HTTP GET"| CDN
    Browser -->|"loads"| SPA
    Browser -->|"executes"| JSBundle

    %% Styles
    classDef build fill:#E0F2FF,stroke:#0284C7,color:#023E8A
    classDef hosting fill:#FFF4E6,stroke:#FB8C00,color:#9C4221
    classDef runtime fill:#ECFDF5,stroke:#059669,color:#065F46
    classDef static fill:#F5F5F5,stroke:#6B7280,color:#374151
    classDef external fill:#F3F4F6,stroke:#9CA3AF,color:#4B5563

    %% Click Events
    click SPA "https://github.com/arnaupinyol/lista-de-fundas/blob/main/index.html"
    click PKG "https://github.com/arnaupinyol/lista-de-fundas/blob/main/package.json"
    click LOCK "https://github.com/arnaupinyol/lista-de-fundas/blob/main/package-lock.json"
    click VITE "https://github.com/arnaupinyol/lista-de-fundas/blob/main/vite.config.js"
    click POSTCSS "https://github.com/arnaupinyol/lista-de-fundas/blob/main/postcss.config.js"
    click TAILWIND "https://github.com/arnaupinyol/lista-de-fundas/blob/main/tailwind.config.js"
    click Styles "https://github.com/arnaupinyol/lista-de-fundas/blob/main/src/index.css"
    click Main "https://github.com/arnaupinyol/lista-de-fundas/blob/main/src/main.jsx"
    click AppShell "https://github.com/arnaupinyol/lista-de-fundas/blob/main/src/App.jsx"
    click CatalogData "https://github.com/arnaupinyol/lista-de-fundas/blob/main/src/data/catalog.js"
    click DesignsData "https://github.com/arnaupinyol/lista-de-fundas/blob/main/src/data/designs.js"
    click Sidebar "https://github.com/arnaupinyol/lista-de-fundas/blob/main/src/components/CarreteSidebar.jsx"
    click CatalogView "https://github.com/arnaupinyol/lista-de-fundas/blob/main/src/components/CatalogViewer.jsx"
    click FundaView "https://github.com/arnaupinyol/lista-de-fundas/blob/main/src/components/FundaViewer.jsx"
    click MarcaSel "https://github.com/arnaupinyol/lista-de-fundas/blob/main/src/components/MarcaSelector.jsx"
    click ModeloSel "https://github.com/arnaupinyol/lista-de-fundas/blob/main/src/components/ModeloSelector.jsx"
```
