# joechipjoechip/lyc architecture

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

- Interactive diagram: https://gitdiagram.com/joechipjoechip/lyc
- Repository: https://github.com/joechipjoechip/lyc

## Overview

##### Project type and purpose
- This is a front-end web application built with Nuxt 3 (Vue 3 + Vite), optimized for interactive 3D scenes, audio/video playback and dynamic page content.
- The README calls it “Nuxt 3 Minimal Starter,” but the file tree shows heavy use of 3D assets (GLB models, envMaps), custom composition-API utilities, and a store for state. It’s effectively a single-page/SSR hybrid site with rich media.

##### File structure
Top‐level directories & files:
- nuxt.config.ts – core Nuxt configuration (SSR/SSG, modules)
- app.vue, layouts/default.vue – root layout and shell
- pages/ – route-based Vue components
- components/ – reusable UI (hero, footer, navigation, shaders)
- composables/ – Composition API utilities (scene management, gyro, benchmarking)
- stores/ – Pinia (or Vue Reactive) stores for global state
- plugins/ – client-only plugin for an event bus (mitt.client.js)
- server/ – TypeScript config for potential server routes/endpoints
- assets/ – SCSS, fonts, base styles, code modules
- package.json / tsconfig.json – dependencies, TypeScript settings

##### README for additional insights
- The README is generic Nuxt 3 starter docs. It does not specify custom architecture.
- No custom API routes or database integrations are listed.

##### Detail & coverage
- Break the project into at least these components: Nuxt Server, Client/UI layers, Logic modules, State store, Plugins, Asset server, Build pipeline, External libs.
- Data flows (SSR vs client nav), asset loading, event bus usage, store updates.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Infrastructure"
        NuxtCore["Nuxt 3 Core (SSR/Build/Dev)"]:::infra
        BuildPipeline["Build Pipeline (Vite & Nuxt Build)"]:::infra
        Deployment["Deployment (dist/)"]:::infra
    end

    subgraph "Client Browser"
        Browser["Browser"]:::external
    end

    subgraph "UI Layer"
        VueShell["Vue Application Shell"]:::runtime
        Layout["Layout Layer"]:::runtime
        PagesIndex["Page: index.vue"]:::runtime
        PagesSignin["Page: signin.vue"]:::runtime
        ComponentLib["UI Component Library"]:::runtime
    end

    subgraph "Logic Modules"
        Composables["Composition API Utilities"]:::logic
        Stores["State Store"]:::logic
        PluginBus["Plugin (mitt Event Bus)"]:::logic
    end

    subgraph "Assets & Data"
        AssetsPublic["Static Asset Server"]:::assets
        Styles["Styling & Fonts"]:::assets
        DataModules["Data Modules (nav/footer)"]:::assets
    end

    subgraph "Config & Metadata"
        ServerConfig["Server TS Config"]:::infra
        BuildConfig["Build & Deployment Config"]:::infra
    end

    %% Connections
    Browser -->|"request page"| NuxtCore
    NuxtCore -->|"SSR/SPA shell"| VueShell
    Browser -->|"load static"| AssetsPublic

    VueShell --> Layout
    Layout --> PagesIndex
    Layout --> PagesSignin

    PagesIndex --> ComponentLib
    PagesSignin --> ComponentLib

    ComponentLib --> Composables
    ComponentLib --> Stores
    ComponentLib --> PluginBus
    Composables --> Stores
    PluginBus --> ComponentLib

    ComponentLib -->|"fetch models/textures/media"| AssetsPublic
    VueShell --> Styles
    VueShell --> DataModules

    BuildPipeline --> Deployment
    Deployment --> NuxtCore

    BuildConfig --> BuildPipeline
    NuxtCore --> BuildPipeline
    ServerConfig --> NuxtCore

    %% Click Events
    click NuxtCore "https://github.com/joechipjoechip/lyc/blob/master/nuxt.config.ts"
    click VueShell "https://github.com/joechipjoechip/lyc/blob/master/app.vue"
    click Layout "https://github.com/joechipjoechip/lyc/blob/master/layouts/default.vue"
    click PagesIndex "https://github.com/joechipjoechip/lyc/blob/master/pages/index.vue"
    click PagesSignin "https://github.com/joechipjoechip/lyc/blob/master/pages/signin.vue"
    click ComponentLib "https://github.com/joechipjoechip/lyc/tree/master/components/"
    click Composables "https://github.com/joechipjoechip/lyc/tree/master/composables/"
    click Stores "https://github.com/joechipjoechip/lyc/tree/master/stores/"
    click PluginBus "https://github.com/joechipjoechip/lyc/blob/master/plugins/mitt.client.js"
    click AssetsPublic "https://github.com/joechipjoechip/lyc/tree/master/public/"
    click Styles "https://github.com/joechipjoechip/lyc/tree/master/assets/styles/"
    click DataModules "https://github.com/joechipjoechip/lyc/tree/master/assets/data/"
    click ServerConfig "https://github.com/joechipjoechip/lyc/blob/master/server/tsconfig.json"
    click BuildConfig "https://github.com/joechipjoechip/lyc/blob/master/package.json"

    %% Styles
    classDef infra fill:#cccccc,stroke:#333,stroke-width:1px,color:#000
    classDef external fill:#e0f7fa,stroke:#006064,stroke-width:1px,color:#006064
    classDef runtime fill:#bbdefb,stroke:#0d47a1,stroke-width:1px,color:#0d47a1
    classDef logic fill:#c8e6c9,stroke:#2e7d32,stroke-width:1px,color:#2e7d32
    classDef assets fill:#ffe0b2,stroke:#ef6c00,stroke-width:1px,color:#ef6c00
```
