# vizushu/ca-x-2 architecture

> Architecture diagram of the GitHub repository vizushu/ca-x-2, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/vizushu/ca-x-2
- Repository: https://github.com/vizushu/ca-x-2

## Overview

Lineup Live is a browser-based surf, snow, and California Double planning app. Users choose a break or mountain, inspect condition ratings and camera feeds, and scrub forecast time; the Double view combines surf and snow conditions with a drive plan. The app shell coordinates live data, forecast calculations, and view-model generation before rendering its screens. Live providers and desktop presentation are included as documented capabilities, though their full wiring is not shown in the excerpts.

Main entry points: [`app/src/App.jsx`](https://github.com/vizushu/ca-x-2/blob/main/app/src/App.jsx) (App shell), [`app/src/components/ui.jsx`](https://github.com/vizushu/ca-x-2/blob/main/app/src/components/ui.jsx) (Shared UI), [`app/src/forecast/live.js`](https://github.com/vizushu/ca-x-2/blob/main/app/src/forecast/live.js) (Live data layer), [`app/src/forecast/view.js`](https://github.com/vizushu/ca-x-2/blob/main/app/src/forecast/view.js) (Forecast view model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App experience"]
  node_shell["App shell<br/>[App.jsx]"]
  node_entry["Browser entry<br/>[main.jsx]"]
  node_icons["Icon assets<br/>[icons.js]"]
end

subgraph group_forecast["Forecast and data"]
  node_viewmodel["Forecast view model<br/>[view.js]"]
  node_engine["Forecast engine<br/>[engine.js]"]
  node_live["Live data layer<br/>[live.js]"]
end

subgraph group_screens["Views and controls"]
  node_surf["Surf view<br/>[SurfView.jsx]"]
  node_snow["Snow view<br/>[SnowView.jsx]"]
  node_double["Double view<br/>[DoubleView.jsx]"]
  node_camera["Camera player<br/>[Cam.jsx]"]
  node_dock["Time and mode dock<br/>[Dock.jsx]"]
  node_sheets["Picker and settings<br/>[Sheets.jsx]"]
  node_install["Install prompt<br/>[InstallBanner.jsx]"]
  node_presentation["Desktop presentation<br/>[Presentation.jsx]"]
  node_shared["Shared UI<br/>[ui.jsx]"]
end

subgraph group_external["External services"]
  node_feeds{{"Forecast feeds"}}
  node_traffic{{"Traffic routing"}}
  node_camerafeeds{{"Camera feeds"}}
end

node_user(("User"))

node_user -->|"opens app"| node_entry
node_entry -->|"renders"| node_shell
node_shell -->|"checks and updates"| node_live
node_shell -->|"builds screen data"| node_viewmodel
node_viewmodel -->|"calculates conditions"| node_engine
node_viewmodel -->|"reads live state"| node_live
node_live -->|"overrides inputs"| node_engine
node_engine -->|"gets icon URLs"| node_icons
node_shell -->|"renders"| node_surf
node_shell -->|"renders"| node_snow
node_shell -->|"renders"| node_double
node_shell -->|"renders"| node_camera
node_shell -->|"renders"| node_dock
node_shell -->|"renders"| node_sheets
node_shell -->|"renders"| node_install
node_live -->|"fetches conditions"| node_feeds
node_live -->|"requests routes"| node_traffic
node_camera -.->|"plays streams"| node_camerafeeds
node_presentation -->|"uses components"| node_shared
node_surf -.->|"uses components"| node_shared
node_snow -->|"uses components"| node_shared
node_double -->|"uses components"| node_shared
node_camera -->|"uses components"| node_shared
node_dock -->|"uses components"| node_shared
node_sheets -->|"uses components"| node_shared
node_install -->|"uses components"| node_shared

click node_shell "https://github.com/vizushu/ca-x-2/blob/main/app/src/App.jsx"
click node_entry "https://github.com/vizushu/ca-x-2/blob/main/app/src/main.jsx"
click node_viewmodel "https://github.com/vizushu/ca-x-2/blob/main/app/src/forecast/view.js"
click node_engine "https://github.com/vizushu/ca-x-2/blob/main/app/src/forecast/engine.js"
click node_live "https://github.com/vizushu/ca-x-2/blob/main/app/src/forecast/live.js"
click node_icons "https://github.com/vizushu/ca-x-2/blob/main/app/src/icons.js"
click node_surf "https://github.com/vizushu/ca-x-2/blob/main/app/src/components/SurfView.jsx"
click node_snow "https://github.com/vizushu/ca-x-2/blob/main/app/src/components/SnowView.jsx"
click node_double "https://github.com/vizushu/ca-x-2/blob/main/app/src/components/DoubleView.jsx"
click node_camera "https://github.com/vizushu/ca-x-2/blob/main/app/src/components/Cam.jsx"
click node_dock "https://github.com/vizushu/ca-x-2/blob/main/app/src/components/Dock.jsx"
click node_sheets "https://github.com/vizushu/ca-x-2/blob/main/app/src/components/Sheets.jsx"
click node_install "https://github.com/vizushu/ca-x-2/blob/main/app/src/components/InstallBanner.jsx"
click node_presentation "https://github.com/vizushu/ca-x-2/blob/main/app/src/components/Presentation.jsx"
click node_shared "https://github.com/vizushu/ca-x-2/blob/main/app/src/components/ui.jsx"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_shell,node_entry,node_icons,node_user toneBlue
class node_viewmodel,node_engine,node_live toneAmber
class node_surf,node_snow,node_double,node_camera,node_dock,node_sheets,node_install,node_presentation,node_shared toneMint
class node_feeds,node_traffic,node_camerafeeds toneRose
```

## Components

### App experience

- [App shell](https://github.com/vizushu/ca-x-2/blob/main/app/src/App.jsx): `app/src/App.jsx`
- [Browser entry](https://github.com/vizushu/ca-x-2/blob/main/app/src/main.jsx): `app/src/main.jsx`
- [Icon assets](https://github.com/vizushu/ca-x-2/blob/main/app/src/icons.js): `app/src/icons.js`

### Forecast and data

- [Forecast view model](https://github.com/vizushu/ca-x-2/blob/main/app/src/forecast/view.js): `app/src/forecast/view.js`
- [Forecast engine](https://github.com/vizushu/ca-x-2/blob/main/app/src/forecast/engine.js): `app/src/forecast/engine.js`
- [Live data layer](https://github.com/vizushu/ca-x-2/blob/main/app/src/forecast/live.js): `app/src/forecast/live.js`

### Views and controls

- [Surf view](https://github.com/vizushu/ca-x-2/blob/main/app/src/components/SurfView.jsx): `app/src/components/SurfView.jsx`
- [Snow view](https://github.com/vizushu/ca-x-2/blob/main/app/src/components/SnowView.jsx): `app/src/components/SnowView.jsx`
- [Double view](https://github.com/vizushu/ca-x-2/blob/main/app/src/components/DoubleView.jsx): `app/src/components/DoubleView.jsx`
- [Camera player](https://github.com/vizushu/ca-x-2/blob/main/app/src/components/Cam.jsx): `app/src/components/Cam.jsx`
- [Time and mode dock](https://github.com/vizushu/ca-x-2/blob/main/app/src/components/Dock.jsx): `app/src/components/Dock.jsx`
- [Picker and settings](https://github.com/vizushu/ca-x-2/blob/main/app/src/components/Sheets.jsx): `app/src/components/Sheets.jsx`
- [Install prompt](https://github.com/vizushu/ca-x-2/blob/main/app/src/components/InstallBanner.jsx): `app/src/components/InstallBanner.jsx`
- [Desktop presentation](https://github.com/vizushu/ca-x-2/blob/main/app/src/components/Presentation.jsx): `app/src/components/Presentation.jsx`
- [Shared UI](https://github.com/vizushu/ca-x-2/blob/main/app/src/components/ui.jsx): `app/src/components/ui.jsx`

### External services

- **Forecast feeds**
- **Traffic routing**
- **Camera feeds**

### Other components

- **User**

## Connections

- User → Browser entry: opens app (evidence: `app/src/main.jsx`)
- Browser entry → App shell: renders (evidence: `app/src/main.jsx`)
- App shell → Live data layer: checks and updates (evidence: `app/src/App.jsx`)
- App shell → Forecast view model: builds screen data (evidence: `app/src/App.jsx`)
- Forecast view model → Forecast engine: calculates conditions (evidence: `app/src/forecast/view.js`)
- Forecast view model → Live data layer: reads live state (evidence: `app/src/forecast/view.js`)
- Live data layer → Forecast engine: overrides inputs (evidence: `app/src/forecast/live.js`)
- Forecast engine → Icon assets: gets icon URLs (evidence: `app/src/forecast/engine.js`)
- App shell → Surf view: renders (evidence: `app/src/App.jsx`)
- App shell → Snow view: renders (evidence: `app/src/App.jsx`)
- App shell → Double view: renders (evidence: `app/src/App.jsx`)
- App shell → Camera player: renders (evidence: `app/src/App.jsx`)
- App shell → Time and mode dock: renders (evidence: `app/src/App.jsx`)
- App shell → Picker and settings: renders (evidence: `app/src/App.jsx`)
- App shell → Install prompt: renders (evidence: `app/src/App.jsx`)
- Live data layer → Forecast feeds: fetches conditions (evidence: `app/src/forecast/live.js`)
- Live data layer → Traffic routing: requests routes (evidence: `app/src/forecast/live.js`)
- Camera player → Camera feeds: plays streams
- Desktop presentation → Shared UI: uses components (evidence: `app/src/components/Presentation.jsx`)
- Surf view → Shared UI: uses components (evidence: `app/src/components/SurfView.jsx`)
- Snow view → Shared UI: uses components (evidence: `app/src/components/SnowView.jsx`)
- Double view → Shared UI: uses components (evidence: `app/src/components/DoubleView.jsx`)
- Camera player → Shared UI: uses components (evidence: `app/src/components/Cam.jsx`)
- Time and mode dock → Shared UI: uses components (evidence: `app/src/components/Dock.jsx`)
- Picker and settings → Shared UI: uses components (evidence: `app/src/components/Sheets.jsx`)
- Install prompt → Shared UI: uses components (evidence: `app/src/components/InstallBanner.jsx`)
