# louh/lcars architecture

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

- Interactive diagram: https://gitdiagram.com/louh/lcars
- Repository: https://github.com/louh/lcars

## Overview

##### Project type and purpose
- This is a single‐page frontend web application (SPA) built with Vue (via Vite).
- Its sole purpose is to render a responsive LCARS UI in the browser, loading static assets (fonts, images, sounds) and structured data (star-systems.json).

##### File structure
- Top‐level directories:
- src/           ← all Vue components, stores (state), utilities, and styles
- public/        ← static assets (fonts, planets maps, sounds, manifest)
- docs/          ← documentation
- Key files:
- src/App.vue & src/index.js ← application entry point
- src/components/*  ← reusable UI parts (WarpField, etc.)
- src/stores/*      ← global state (Vuex or Pinia)
- src/utils/*       ← helper functions (sound loader, resize observer)
- vite.config.js, postcss.config.cjs, tsconfig.json ← build and language configuration
- Dockerfile        ← containerized build & serve

##### Readme insights
- Confirms: responsive LCARS UI built entirely in modern web tech.
- Provides Docker build/ run commands, indicating a containerized deployment.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Developer Environment
    subgraph "Developer Environment" 
        direction TB
        GitHub["GitHub Repo"]:::external
        NodeNPM["Node.js & npm/yarn"]:::external
        DevTools["Vite Build Tool"]:::infra
    end

    %% Build & CI Layer
    subgraph "Build & CI" 
        direction TB
        ViteBuild["Vite Build (npm install & vite build)"]:::infra
        DockerBuild["Docker Build Stage"]:::infra
    end

    %% Container Runtime Layer
    subgraph "Container Runtime" 
        direction TB
        StaticServer["Static HTTP Server"]:::infra
        IndexHTML["index.html"]:::infra
        PublicAssets["public/"]:::data
    end

    %% Client Layer
    subgraph "Browser / Client" 
        direction TB
        Browser["Browser"]:::external
        subgraph "Vue App" 
            direction TB
            AppVue["App.vue"]:::app
            Store["Global Store"]:::app
            Presentation["Presentation Layer"]:::app
            DataLayer["Data Layer"]:::data
            UtilsLayer["Utility Layer"]:::app
            StylesLayer["Styles Pipeline"]:::app
        end
    end

    %% Interactions
    GitHub -->|push code| ViteBuild
    NodeNPM -->|runs| ViteBuild
    DevTools -->|bundles| ViteBuild
    ViteBuild -->|docker build| DockerBuild
    DockerBuild -->|produces image| StaticServer
    StaticServer -->|serves| Browser
    StaticServer -->|serves| IndexHTML
    StaticServer -->|serves| PublicAssets
    Browser -->|GET /| IndexHTML
    Browser -->|loads| AppVue
    AppVue -->|dispatch actions| Store
    AppVue -->|renders| Presentation
    AppVue -->|imports styles| StylesLayer
    Store -->|provides state| Presentation
    Presentation -->|loads data| DataLayer
    Presentation -->|uses utils| UtilsLayer
    Presentation -->|applies styles| StylesLayer
    DataLayer -->|contains| starjson["star-systems.json"]:::data
    UtilsLayer -->|modules| UtilsIndex["src/utils/index.ts"]:::app
    UtilsLayer -->|modules| UtilsSounds["src/utils/sounds.ts"]:::app
    UtilsLayer -->|modules| ResizeObs["src/utils/resize-observer.js"]:::app

    %% Component group
    Presentation --> ComponentsDir["src/components/"]:::app
    ComponentsDir -->|examples| LCARSBar["LCARSBar.vue"]:::app
    ComponentsDir --> Planet3d["PlanetView3d.vue"]:::app
    ComponentsDir --> StarChart["StarChart.vue"]:::app
    ComponentsDir --> WarpFieldDir["src/components/"]:::app

    %% Styles
    StylesLayer --> StylesIndex["src/styles/index.css"]:::app
    StylesLayer --> StylesTypo["src/styles/typography.css"]:::app

    %% Static Assets
    PublicAssets --> FontsDir["public/fonts/"]:::data
    PublicAssets --> PlanetsDir["public/planets/"]:::data
    PublicAssets --> SoundsDir["public/sounds/"]:::data
    PublicAssets --> Manifest["public/site.webmanifest"]:::data
    PublicAssets --> Redirects["public/_redirects"]:::data

    %% Documentation
    GitHub --> DocsReadme["docs/README.md"]:::doc
    GitHub --> RootReadme["README.md"]:::doc

    %% Click Events
    click DockerBuild "https://github.com/louh/lcars/tree/main/Dockerfile"
    click DevTools "https://github.com/louh/lcars/blob/main/vite.config.js"
    click DevTools "https://github.com/louh/lcars/blob/main/postcss.config.cjs"
    click IndexHTML "https://github.com/louh/lcars/blob/main/index.html"
    click PublicAssets "https://github.com/louh/lcars/tree/main/public/"
    click AppVue "https://github.com/louh/lcars/blob/main/src/App.vue"
    click Starjson "https://github.com/louh/lcars/blob/main/src/star-systems.json"
    click UtilsIndex "https://github.com/louh/lcars/blob/main/src/utils/index.ts"
    click UtilsSounds "https://github.com/louh/lcars/blob/main/src/utils/sounds.ts"
    click ResizeObs "https://github.com/louh/lcars/blob/main/src/utils/resize-observer.js"
    click StylesIndex "https://github.com/louh/lcars/blob/main/src/styles/index.css"
    click StylesTypo "https://github.com/louh/lcars/blob/main/src/styles/typography.css"
    click FontsDir "https://github.com/louh/lcars/blob/main/public/fonts/HelveticaLTStd-UltraComp.otf"
    click PlanetsDir "https://github.com/louh/lcars/tree/main/public/planets/"
    click SoundsDir "https://github.com/louh/lcars/tree/main/public/sounds/"
    click DocsReadme "https://github.com/louh/lcars/blob/main/docs/README.md"
    click RootReadme "https://github.com/louh/lcars/blob/main/README.md"
    click ComponentsDir "https://github.com/louh/lcars/tree/main/src/components/"
    click Store "https://github.com/louh/lcars/blob/main/src/stores/main.js"
    click GitHub "https://github.com/louh/lcars/tree/main/Dockerfile"

    %% Styles
    classDef infra fill:#D0E8FF,stroke:#0366d6,color:#0366d6,stroke-width:1px;
    classDef app fill:#E6FFEA,stroke:#28a745,color:#28a745,stroke-width:1px;
    classDef data fill:#FFF4E5,stroke:#d9730d,color:#d9730d,stroke-width:1px;
    classDef external fill:#F0F0F0,stroke:#888888,color:#555555,stroke-width:1px;
    classDef doc fill:#FFF0F5,stroke:#c0567d,color:#c0567d,stroke-width:1px;
```
