# varphi-online/website architecture

> Architecture diagram of the GitHub repository varphi-online/website, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/varphi-online/website
- Repository: https://github.com/varphi-online/website

## Overview

##### Main Components

a. Core System Layer
- Taskbar system as a central component
- Application management system
- Shared resources (fonts, CSS, libraries)

b. Application Layer
- Various applications/pages as modular components
- Music player as a featured application
- Related pages (math, music, blog) into logical clusters

c. Interface Components
- Window management system
- Taskbar and its subcomponents
- Start menu system

##### Core Infrastructure (Bottom Layer)
- Static Assets (fonts, images)
- Core CSS (primary.css)
- External Libraries (p5.js related)

##### Application Management (Middle Layer)
- It to applicationManager.ts/js

##### User Interface (Top Layer)
- Taskbar System (persistent component)
- Window Management
- Start Menu
- Application Windows

Use these visual elements:

- Blue containers for core system components
- Green containers for applications
- Orange containers for UI elements

Key Relationships to Show:

##### Sitewide Resources → All Components

Special Considerations:

##### TypeScript Integration
- .ts files feeding into .js files
- Typed components with a special border

##### Page Organization
- Pages by category (math, music, internal)
- How they integrate with the window system

##### Resource Management
- Shared resource access
- How the sitewide components are available to all pages

##### Development Tools
- Sitemap generation tools
- Internal tools section

- Component types (system, application, UI)
- Special indicators (TypeScript, internal tools)

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Core_System
        AppManager["Application Manager"]:::system
        WinManager["Window Management"]:::system
        TaskbarSys["Taskbar System"]:::system
        StartMenu["Start Menu"]:::ui
    end

    subgraph Resources
        SharedRes["Shared Libraries"]:::resource
        StaticAssets["Static Assets"]:::resource
        CoreCSS["Core CSS"]:::resource
        Typography["Typography"]:::resource
        IconRes["Icon Resources"]:::resource
    end

    subgraph Applications
        MusicPlayer["Music Player"]:::app
        Calculator["Math Calculator"]:::app
        Blog["Blog System"]:::planned
        DevTools["Development Tools"]:::internal
    end

    subgraph UI_Components
        WinStyle["Window Styling"]:::ui
        AppStyle["Application Styling"]:::ui
    end

    %% Relationships
    AppManager --> WinManager
    TaskbarSys <--> AppManager
    WinManager --> Applications
    SharedRes --> Core_System
    SharedRes --> Applications
    StaticAssets --> Applications
    CoreCSS --> UI_Components
    StartMenu --> AppManager
    WinStyle --> WinManager
    AppStyle --> Applications

    %% Click Events
    click AppManager "https://github.com/varphi-online/website/blob/main/sitewide/apps/applicationManager.ts"
    click TaskbarSys "https://github.com/varphi-online/website/blob/main/sitewide/taskbar/taskbar.ts"
    click WinManager "https://github.com/varphi-online/website/blob/main/sitewide/taskbar/window.js"
    click MusicPlayer "https://github.com/varphi-online/website/blob/main/sitewide/apps/musicPlayer/musicPlayer.ts"
    click CoreCSS "https://github.com/varphi-online/website/blob/main/sitewide/primary.css"
    click SharedRes "https://github.com/varphi-online/website/tree/main/sitewide/libs/"
    click StaticAssets "https://github.com/varphi-online/website/tree/main/sitewide/images/"
    click Calculator "https://github.com/varphi-online/website/tree/main/pages/math/text_calc/"
    click Blog "https://github.com/varphi-online/website/tree/main/pages/blog/"
    click Typography "https://github.com/varphi-online/website/blob/main/sitewide/W95FA.otf"
    click DevTools "https://github.com/varphi-online/website/tree/main/pages/internal/sitemap/"
    click IconRes "https://github.com/varphi-online/website/tree/main/pages/internal/icons/"
    click WinStyle "https://github.com/varphi-online/website/blob/main/sitewide/taskbar/taskbar.css"
    click AppStyle "https://github.com/varphi-online/website/blob/main/sitewide/apps/application.css"

    %% Styles
    classDef system fill:#a8d1f0,stroke:#000
    classDef resource fill:#ffd7a8,stroke:#000
    classDef app fill:#b8e6b8,stroke:#000
    classDef ui fill:#ffb366,stroke:#000
    classDef internal fill:#e6e6e6,stroke:#000
    classDef planned fill:none,stroke:#666,stroke-dasharray: 5 5

    %% Legend
    subgraph Legend
        L1["System Component"]:::system
        L2["Resource"]:::resource
        L3["Application"]:::app
        L4["UI Component"]:::ui
        L5["Internal Tool"]:::internal
        L6["Planned Feature"]:::planned
    end
```
