# marieg56/strega architecture

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

- Interactive diagram: https://gitdiagram.com/marieg56/strega
- Repository: https://github.com/marieg56/strega

## Overview

##### Project type and purpose
- This is a front-end single-page application (SPA) built with React and Vite.
- It provides a multi-page UI (Home, About, Contact, Gallery, Services sub-pages) all rendered client-side.
- Uses Tailwind CSS for styling, ESLint for code quality, and Vite for fast HMR and build.

##### File structure
- Top-level files:
– package.json, package-lock.json (dependencies & scripts)
– vite.config.js (build & dev-server config)
– tailwind.config.js, postcss.config.cjs (CSS toolchain)
– index.html (SPA entry point)
- src/ directory:
– main.tsx: bootstraps React into index.html
– App.tsx & App.css: root component & global styles
– components/: reusable UI components (Header, Footer, DropdownMenu)
– pages/: route components (Home, About, Contact, Gallery, Services and sub-pages)
– assets/: static images or fonts
- public/: static files served as-is at build time
- Configuration and declaration files for TypeScript and ESLint

##### README for additional insights
- Confirms use of Vite’s React plugin (Babel or SWC) for fast refresh
- Encourages TypeScript linting (already using .tsx)
- No backend or API layers defined in this template

##### Main components & interactions
a. Dev/Build Toolchain
– Vite dev server: serves index.html + hot module reloading
– Build pipeline: compiles TSX → JS, processes Tailwind CSS → output bundle
b. Client Application
– index.html: single HTML shell
– React root (main.tsx) mounts App component
– App component orchestrates Router → Pages
– Pages import and render Components
– Global styles (App.css, Tailwind CSS utilities)
– Assets (images, fonts) loaded via import or public/
c. External Dependencies
– NPM registry: React, React-Router (if used), Tailwind, Vite plugins
d. Runtime Environment
– Browser: executes the bundled JS, applies CSS

##### Architectural patterns & design principles
- Component-based UI design (React)
- Client-side routing (React Router implied by pages folder structure)
- Utility-first CSS (Tailwind) for style separation
- Module bundling & HMR via Vite for developer experience

##### Detail
- How Vite plugins integrate with the build.
- CSS processing (Tailwind + PostCSS) as a step in the pipeline.
- Keep relationships explicit—don’t just group everything under “frontend.”
- Use consistent naming that matches your file tree.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Dev / Build Toolchain
    subgraph "Dev / Build Toolchain"
        VITE["vite.config.js"]:::tools
        ESLINT["eslint.config.js"]:::tools
        PACKAGE["package.json"]:::tools
        LOCK["package-lock.json"]:::tools
        POSTCSS["postcss.config.cjs"]:::tools
        TAILWIND["tailwind.config.js"]:::tools
        DECLS["declarations.d.ts"]:::tools
        SRCDECL["src/declaration.d.ts"]:::tools
    end

    %% Source Code Modules
    subgraph "Source Code"
        subgraph "React Bootstrap"
            MAIN["src/main.tsx"]:::modules
        end
        subgraph "Application Shell"
            APP["src/App.tsx"]:::modules
            APPCSS["src/App.css"]:::styles
            INDEXCSS["src/index.css"]:::styles
        end
        subgraph "Pages"
            HOME["src/pages/Home.tsx"]:::modules
            ABOUT["src/pages/About.tsx"]:::modules
            CONTACT["src/pages/Contact.tsx"]:::modules
            GALLERY["src/pages/Gallery.tsx"]:::modules
            SERVICES["src/pages/Services.tsx"]:::modules
            subgraph "Services Sub-pages"
                EYES["src/pages/Services/Eyes.tsx"]:::modules
                MAKEUP["src/pages/Services/Makeup.tsx"]:::modules
                MASSAGE["src/pages/Services/Massage.tsx"]:::modules
                NAILS["src/pages/Services/Nails.tsx"]:::modules
                WAXING["src/pages/Services/Waxing.tsx"]:::modules
            end
        end
        subgraph "UI Components"
            HEADER["src/components/Header.tsx"]:::modules
            FOOTER["src/components/Footer.tsx"]:::modules
            DROPDOWN["src/components/DropdownMenu.tsx"]:::modules
        end
        subgraph "Assets & Fonts"
            ASSETS["src/assets/"]:::styles
            FONTS["src/fonts/"]:::styles
        end
    end

    %% Public & Bundle
    PUBLIC["public/"]:::static
    INDEXHTML["index.html"]:::static
    subgraph "Production Bundle"
        BUNDLE["Bundle (JS + CSS)"]:::static
    end

    %% Build Toolchain Flow
    VITE -->|configures| POSTCSS
    VITE -->|configures| TAILWIND
    VITE -->|uses| ESLINT
    PACKAGE -->|defines deps| VITE
    LOCK -->|locks deps| PACKAGE
    DECLS -->|provides types| MAIN
    SRCDECL -->|provides types| MAIN

    POSTCSS -->|processes CSS| BUNDLE
    TAILWIND -->|generates CSS| BUNDLE
    VITE -->|bundles| BUNDLE

    %% Serving
    BUNDLE -->|serves bundle| INDEXHTML
    PUBLIC -->|served as-is| BUNDLE
    INDEXHTML -->|loads| MAIN

    %% Runtime Flow
    MAIN -->|mounts| APP
    APP -->|imports| APPCSS
    APP -->|imports| INDEXCSS
    APP -->|uses Router| HOME
    APP -->|uses Router| ABOUT
    APP -->|uses Router| CONTACT
    APP -->|uses Router| GALLERY
    APP -->|uses Router| SERVICES
    SERVICES -->|renders| EYES
    SERVICES -->|renders| MAKEUP
    SERVICES -->|renders| MASSAGE
    SERVICES -->|renders| NAILS
    SERVICES -->|renders| WAXING
    APP -->|renders| HEADER
    APP -->|renders| FOOTER
    APP -->|renders| DROPDOWN
    MAIN -->|imports assets| ASSETS
    MAIN -->|imports fonts| FONTS

    %% Click Events
    click VITE "https://github.com/marieg56/strega/blob/main/vite.config.js"
    click ESLINT "https://github.com/marieg56/strega/blob/main/eslint.config.js"
    click PACKAGE "https://github.com/marieg56/strega/blob/main/package.json"
    click LOCK "https://github.com/marieg56/strega/blob/main/package-lock.json"
    click POSTCSS "https://github.com/marieg56/strega/blob/main/postcss.config.cjs"
    click TAILWIND "https://github.com/marieg56/strega/blob/main/tailwind.config.js"
    click DECLS "https://github.com/marieg56/strega/blob/main/declarations.d.ts"
    click SRCDECL "https://github.com/marieg56/strega/blob/main/src/declaration.d.ts"
    click INDEXHTML "https://github.com/marieg56/strega/blob/main/index.html"
    click MAIN "https://github.com/marieg56/strega/blob/main/src/main.tsx"
    click APP "https://github.com/marieg56/strega/blob/main/src/App.tsx"
    click APPCSS "https://github.com/marieg56/strega/blob/main/src/App.css"
    click INDEXCSS "https://github.com/marieg56/strega/blob/main/src/index.css"
    click HEADER "https://github.com/marieg56/strega/blob/main/src/components/Header.tsx"
    click FOOTER "https://github.com/marieg56/strega/blob/main/src/components/Footer.tsx"
    click DROPDOWN "https://github.com/marieg56/strega/blob/main/src/components/DropdownMenu.tsx"
    click HOME "https://github.com/marieg56/strega/blob/main/src/pages/Home.tsx"
    click ABOUT "https://github.com/marieg56/strega/blob/main/src/pages/About.tsx"
    click CONTACT "https://github.com/marieg56/strega/blob/main/src/pages/Contact.tsx"
    click GALLERY "https://github.com/marieg56/strega/blob/main/src/pages/Gallery.tsx"
    click SERVICES "https://github.com/marieg56/strega/blob/main/src/pages/Services.tsx"
    click EYES "https://github.com/marieg56/strega/blob/main/src/pages/Services/Eyes.tsx"
    click MAKEUP "https://github.com/marieg56/strega/blob/main/src/pages/Services/Makeup.tsx"
    click MASSAGE "https://github.com/marieg56/strega/blob/main/src/pages/Services/Massage.tsx"
    click NAILS "https://github.com/marieg56/strega/blob/main/src/pages/Services/Nails.tsx"
    click WAXING "https://github.com/marieg56/strega/blob/main/src/pages/Services/Waxing.tsx"
    click ASSETS "https://github.com/marieg56/strega/tree/main/src/assets/"
    click FONTS "https://github.com/marieg56/strega/tree/main/src/fonts/"
    click PUBLIC "https://github.com/marieg56/strega/tree/main/public/"

    %% Styles
    classDef tools fill:#AED6F1,stroke:#3498DB,color:#1B2631
    classDef modules fill:#A9DFBF,stroke:#27AE60,color:#1B2631
    classDef styles fill:#F5B041,stroke:#D68910,color:#1B2631
    classDef static fill:#D5DBDB,stroke:#808B96,color:#1B2631
```
