# youngvision-ev/website architecture

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

- Interactive diagram: https://gitdiagram.com/youngvision-ev/website
- Repository: https://github.com/youngvision-ev/website

## Overview

##### Main System Components

a. Frontend Architecture (Primary Focus)
- Static Site Generation Layer (Astro)
- Interactive Components Layer (Svelte)
- Asset Management
- Routing System

b. Build & Development Infrastructure
- Development Environment
- Production Build Pipeline
- Static Asset Pipeline

##### Component Organization

Top Layer (Page Layer):
- Main pages from src/pages (index, about-us, events, members, support-us)
- Dynamic routing for events ([slug].astro)

Middle Layer (Components):
- Shared Components (Navbar, Footer, Button, etc.)
- Feature-specific Components (organized by section)
- Layout Components
- Store Management (newsletter signup)

Bottom Layer (Assets & Data):
- Static Assets (public directory)
- Data Layer (src/data with real and test data)

##### Key Relationships to Highlight

- Page composition flow
- Component inheritance
- Data flow between components
- Asset loading paths
- Build process flow

##### Specific Implementation Details

- Astro Components (*.astro files)
- Svelte Components (*.svelte files)
- Static Assets
- Data Sources
- Build Configuration

##### Technical Stack Indicators

Technology badges for:
- Astro
- Svelte
- TailwindCSS
- TypeScript
- Playwright (Testing)

Create distinct sections for:
a. Runtime Architecture
- How pages are served
- Client-side interactivity points
- Static vs. Dynamic components

b. Development Architecture
- Development workflow
- Testing infrastructure
- Build pipeline

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph "Page Layer"
        Pages["Pages"]
        Index["Home Page"]:::page
        About["About Us"]:::page
        Events["Events"]:::page
        Members["Members"]:::page
        Support["Support Us"]:::page
        DynamicEvents["Dynamic Event Pages"]:::page
    end

    subgraph "Component Layer"
        direction TB
        SharedComponents["Shared Components"]
        Navbar["Navbar"]:::svelte
        Button["Button"]:::svelte
        Calendar["Calendar"]:::svelte
        Testimonials["Testimonials"]:::svelte

        FeatureComponents["Feature Components"]
        AboutComponents["About Components"]:::component
        EventComponents["Event Components"]:::component
        MemberComponents["Member Components"]:::component
        SupportComponents["Support Components"]:::component

        LayoutComponents["Layout Components"]
        MainLayout["Main Layout"]:::astro
        MeltPortal["Melt Portalled"]:::svelte
        NewsletterDialog["Newsletter Dialog"]:::svelte
    end

    subgraph "Infrastructure Layer"
        direction TB
        SSG["Static Site Generation"]:::infra
        AstroConfig["Astro Config"]:::config
        
        BuildTools["Build Tools"]
        TailwindConfig["Tailwind Config"]:::config
        TSConfig["TypeScript Config"]:::config
        ESLintConfig["ESLint Config"]:::config
        PrettierConfig["Prettier Config"]:::config
        
        Testing["Testing Infrastructure"]
        PlaywrightConfig["Playwright Config"]:::testing
    end

    subgraph "Data & Assets Layer"
        direction TB
        Store["Store Management"]:::store
        NewsletterStore["Newsletter Store"]:::store
        
        Data["Data Layer"]
        RealData["Real Data"]:::data
        TestData["Test Data"]:::data
        
        Assets["Asset Management"]
        StaticAssets["Static Assets"]:::assets
        Fonts["Fonts"]:::assets
        Downloads["Downloads"]:::assets
    end

    %% Relationships
    Pages --> SharedComponents
    Pages --> FeatureComponents
    Pages --> LayoutComponents
    SharedComponents --> Store
    FeatureComponents --> Data
    LayoutComponents --> Assets

    %% Click Events
    click Index "https://github.com/YoungVision-eV/website/blob/main/src/pages/index.astro"
    click About "https://github.com/YoungVision-eV/website/blob/main/src/pages/about-us.astro"
    click Events "https://github.com/YoungVision-eV/website/blob/main/src/pages/events.astro"
    click Members "https://github.com/YoungVision-eV/website/blob/main/src/pages/members.astro"
    click Support "https://github.com/YoungVision-eV/website/blob/main/src/pages/support-us.astro"
    click DynamicEvents "https://github.com/YoungVision-eV/website/blob/main/src/pages/events/[slug].astro"
    
    click Navbar "https://github.com/YoungVision-eV/website/blob/main/src/components/Navbar.svelte"
    click Button "https://github.com/YoungVision-eV/website/blob/main/src/components/Button.svelte"
    click Calendar "https://github.com/YoungVision-eV/website/blob/main/src/components/Calendar.svelte"
    click Testimonials "https://github.com/YoungVision-eV/website/blob/main/src/components/Testimonials.svelte"
    
    click AboutComponents "https://github.com/YoungVision-eV/website/tree/main/src/components/about-us"
    click EventComponents "https://github.com/YoungVision-eV/website/tree/main/src/components/events"
    click MemberComponents "https://github.com/YoungVision-eV/website/tree/main/src/components/members"
    click SupportComponents "https://github.com/YoungVision-eV/website/tree/main/src/components/support-us"
    
    click MainLayout "https://github.com/YoungVision-eV/website/blob/main/src/layouts/Layout.astro"
    click MeltPortal "https://github.com/YoungVision-eV/website/blob/main/src/layouts/MeltPortalled.svelte"
    click NewsletterDialog "https://github.com/YoungVision-eV/website/blob/main/src/layouts/NewsletterDialog.svelte"
    
    click NewsletterStore "https://github.com/YoungVision-eV/website/blob/main/src/components/stores/newsletterSignup.ts"
    
    click RealData "https://github.com/YoungVision-eV/website/tree/main/src/data/real"
    click TestData "https://github.com/YoungVision-eV/website/tree/main/src/data/test"
    click Data "https://github.com/YoungVision-eV/website/blob/main/src/data/index.ts"
    
    click StaticAssets "https://github.com/YoungVision-eV/website/tree/main/src/assets"
    click Fonts "https://github.com/YoungVision-eV/website/tree/main/public/fonts"
    click Downloads "https://github.com/YoungVision-eV/website/tree/main/public/downloads"
    
    click PlaywrightConfig "https://github.com/YoungVision-eV/website/blob/main/playwright.config.ts"
    click AstroConfig "https://github.com/YoungVision-eV/website/blob/main/astro.config.mjs"
    click TailwindConfig "https://github.com/YoungVision-eV/website/blob/main/tailwind.config.mjs"
    click TSConfig "https://github.com/YoungVision-eV/website/blob/main/tsconfig.json"
    click ESLintConfig "https://github.com/YoungVision-eV/website/blob/main/eslint.config.mjs"
    click PrettierConfig "https://github.com/YoungVision-eV/website/blob/main/prettier.config.mjs"

    %% Styling
    classDef page fill:#f9f,stroke:#333,stroke-width:2px
    classDef svelte fill:#ff3e00,stroke:#333,stroke-width:2px,color:white
    classDef astro fill:#5f27cd,stroke:#333,stroke-width:2px,color:white
    classDef component fill:#a8e6cf,stroke:#333,stroke-width:2px
    classDef config fill:#ffd3b6,stroke:#333,stroke-width:2px
    classDef store fill:#ffaaa5,stroke:#333,stroke-width:2px
    classDef data fill:#ff8b94,stroke:#333,stroke-width:2px
    classDef assets fill:#dcedc1,stroke:#333,stroke-width:2px
    classDef testing fill:#a8e6cf,stroke:#333,stroke-width:2px
    classDef infra fill:#b8f2e6,stroke:#333,stroke-width:2px
```
