# mdarwish228/ui-skill-testing architecture

> Architecture diagram of the GitHub repository mdarwish228/ui-skill-testing, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-08-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mdarwish228/ui-skill-testing
- Repository: https://github.com/mdarwish228/ui-skill-testing

## Overview

#### Repository Purpose

This repository contains two standalone TypeScript/Vite frontend implementations of a CloudCam fleet-monitoring UI: a baseline (`before-skill`) and a more structured successor (`after-skill`). Both render mock camera telemetry and simulated camera feeds; neither shows a backend, API client, or deployment service.

#### Application Entry Points

Each application boots a React tree from its Vite HTML entry point:

- Baseline: `before-skill/index.html` → `before-skill/src/main.tsx` → `before-skill/src/ui/App.tsx`
- Successor: `after-skill/index.html` → `after-skill/src/main.tsx` → `after-skill/src/App.tsx`

Vite configuration and package manifests are isolated per application at `before-skill/vite.config.ts`, `before-skill/package.json`, `after-skill/vite.config.ts`, and `after-skill/package.json`.

#### Baseline Fleet Dashboard

The baseline implementation keeps the UI and its data contracts close together under `before-skill/src/ui/`.

- `before-skill/src/ui/App.tsx` owns screen composition and selected-camera state.
- `before-skill/src/ui/CameraList.tsx` presents fleet-level camera selection.
- `before-skill/src/ui/CameraDetails.tsx` renders information for the active camera.
- `before-skill/src/ui/MockVideoFeed.tsx` simulates the camera stream.
- `before-skill/src/mock/cameras.ts` provides the static/mock fleet data consumed by the UI.

Control flow is primarily selection-driven: fleet records populate the list, a user selects a camera, and the selected record drives detail and feed rendering.

#### Structured Successor

The successor separates domain modeling, mock telemetry generation, presentation, and formatting.

- `after-skill/src/App.tsx` is the application composition and state boundary.
- `after-skill/src/components/CameraSidebar.tsx` provides fleet navigation and camera selection.
- `after-skill/src/components/CameraView.tsx` presents the selected camera’s main telemetry/detail surface.
- `after-skill/src/components/MockCameraPlayer.tsx` simulates video playback.
- `after-skill/src/domain/types.ts` defines shared camera and telemetry contracts.

This division makes UI components depend on a common domain layer rather than embedding data shapes in individual views.

#### Mock Telemetry Pipeline

The successor models changing operational data as a client-side stream:

- `after-skill/src/mock/seed.ts` defines initial mock fleet/telemetry state.
- `after-skill/src/mock/useMockTelemetry.ts` exposes telemetry updates through a React hook.
- `after-skill/src/mock/util/rng.ts` supplies randomized state evolution.
- `after-skill/src/domain/types.ts` constrains data exchanged between the mock layer and components.

The expected flow is seed data → randomized periodic telemetry hook → `App.tsx` state/composition → sidebar and camera view. This is the primary seam for replacing mock behavior with a live telemetry transport.

#### Presentation and Design Boundaries

The successor’s page-level and component styling is split between `after-skill/src/App.css` and `after-skill/src/index.css`; display-oriented transformations are centralized in `after-skill/src/lib/format.ts`. The baseline instead uses a consolidated stylesheet at `before-skill/src/ui/styles.css` and status display metadata in `before-skill/src/ui/statusMeta.ts`.

The design reference is external to application runtime code at `design-system/cloudcam-fleet/MASTER.md`.

#### Runtime and Infrastructure

Both applications are browser-only React applications built and served with Vite, using TypeScript. Dependencies are lockfile-managed independently in each subproject. `before-skill/dist/` contains a prebuilt static bundle, while `after-skill` appears source-oriented. There is no indicated server runtime, database, authentication provider, live video platform, or telemetry backend; all operational integration boundaries currently terminate at mock modules.

Main entry points: [`before-skill/src/ui/App.tsx`](https://github.com/mdarwish228/ui-skill-testing/blob/main/before-skill/src/ui/App.tsx) (Dashboard composition), [`after-skill/src/App.tsx`](https://github.com/mdarwish228/ui-skill-testing/blob/main/after-skill/src/App.tsx) (App composition), [`after-skill/src/components/CameraView.tsx`](https://github.com/mdarwish228/ui-skill-testing/blob/main/after-skill/src/components/CameraView.tsx) (Camera view), [`after-skill/src/mock/useMockTelemetry.ts`](https://github.com/mdarwish228/ui-skill-testing/blob/main/after-skill/src/mock/useMockTelemetry.ts) (Mock telemetry stream)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_baseline["Baseline UI"]
  node_baseline_html["Vite HTML entry<br/>[index.html]"]
  node_baseline_main["React bootstrap<br/>TypeScript entry<br/>[main.tsx]"]
  node_baseline_app["Dashboard composition<br/>React state boundary<br/>[App.tsx]"]
  node_baseline_list["Camera list<br/>React component<br/>[CameraList.tsx]"]
  node_baseline_details["Camera details<br/>React component<br/>[CameraDetails.tsx]"]
  node_baseline_feed["Mock video feed<br/>React component<br/>[MockVideoFeed.tsx]"]
  node_baseline_data[("Static fleet data<br/>mock data<br/>[cameras.ts]")]
  node_baseline_display["Status display metadata<br/>presentation metadata<br/>[statusMeta.ts]"]
  node_baseline_styles["Dashboard styles<br/>stylesheet<br/>[styles.css]"]
end

subgraph group_successor["Structured successor"]
  node_successor_html["Vite HTML entry<br/>[index.html]"]
  node_successor_main["React bootstrap<br/>TypeScript entry<br/>[main.tsx]"]
  node_successor_app["App composition<br/>React state boundary<br/>[App.tsx]"]
  node_sidebar["Camera sidebar<br/>React component<br/>[CameraSidebar.tsx]"]
  node_camera_view["Camera view<br/>React component<br/>[CameraView.tsx]"]
  node_player["Mock camera player<br/>React component"]
  node_domain["Camera domain contracts<br/>TypeScript domain model<br/>[types.ts]"]
  node_seed[("Seed fleet state<br/>mock data<br/>[seed.ts]")]
  node_telemetry_hook["Mock telemetry stream<br/>React hook"]
  node_rng["State randomizer<br/>mock utility<br/>[rng.ts]"]
  node_format["Display formatting<br/>presentation utility<br/>[format.ts]"]
  node_successor_styles["Page and global styles<br/>stylesheets<br/>[App.css]"]
end

node_design_reference["Design system reference<br/>design documentation<br/>[MASTER.md]"]

node_baseline_html -->|"loads"| node_baseline_main
node_baseline_main -->|"mounts"| node_baseline_app
node_baseline_data -->|"provides fleet"| node_baseline_app
node_baseline_app -->|"renders"| node_baseline_list
node_baseline_list -->|"selection"| node_baseline_app
node_baseline_app -->|"selected camera"| node_baseline_details
node_baseline_app -->|"selected camera"| node_baseline_feed
node_baseline_display -->|"status presentation"| node_baseline_details
node_baseline_styles -.->|"styles"| node_baseline_app
node_successor_html -->|"loads"| node_successor_main
node_successor_main -->|"mounts"| node_successor_app
node_seed -->|"initial state"| node_telemetry_hook
node_rng -->|"evolves state"| node_telemetry_hook
node_domain -->|"telemetry contracts"| node_telemetry_hook
node_telemetry_hook -->|"periodic updates"| node_successor_app
node_successor_app -->|"fleet and selection"| node_sidebar
node_sidebar -->|"selection"| node_successor_app
node_successor_app -->|"selected telemetry"| node_camera_view
node_camera_view -->|"camera feed"| node_player
node_domain -->|"camera contracts"| node_sidebar
node_domain -->|"telemetry contracts"| node_camera_view
node_format -->|"formats display"| node_camera_view
node_successor_styles -.->|"styles"| node_successor_app
node_design_reference -.->|"guides design"| node_successor_styles

click node_baseline_html "https://github.com/mdarwish228/ui-skill-testing/blob/main/before-skill/index.html"
click node_baseline_main "https://github.com/mdarwish228/ui-skill-testing/blob/main/before-skill/src/main.tsx"
click node_baseline_app "https://github.com/mdarwish228/ui-skill-testing/blob/main/before-skill/src/ui/App.tsx"
click node_baseline_list "https://github.com/mdarwish228/ui-skill-testing/blob/main/before-skill/src/ui/CameraList.tsx"
click node_baseline_details "https://github.com/mdarwish228/ui-skill-testing/blob/main/before-skill/src/ui/CameraDetails.tsx"
click node_baseline_feed "https://github.com/mdarwish228/ui-skill-testing/blob/main/before-skill/src/ui/MockVideoFeed.tsx"
click node_baseline_data "https://github.com/mdarwish228/ui-skill-testing/blob/main/before-skill/src/mock/cameras.ts"
click node_baseline_display "https://github.com/mdarwish228/ui-skill-testing/blob/main/before-skill/src/ui/statusMeta.ts"
click node_baseline_styles "https://github.com/mdarwish228/ui-skill-testing/blob/main/before-skill/src/ui/styles.css"
click node_successor_html "https://github.com/mdarwish228/ui-skill-testing/blob/main/after-skill/index.html"
click node_successor_main "https://github.com/mdarwish228/ui-skill-testing/blob/main/after-skill/src/main.tsx"
click node_successor_app "https://github.com/mdarwish228/ui-skill-testing/blob/main/after-skill/src/App.tsx"
click node_sidebar "https://github.com/mdarwish228/ui-skill-testing/blob/main/after-skill/src/components/CameraSidebar.tsx"
click node_camera_view "https://github.com/mdarwish228/ui-skill-testing/blob/main/after-skill/src/components/CameraView.tsx"
click node_player "https://github.com/mdarwish228/ui-skill-testing/blob/main/after-skill/src/components/MockCameraPlayer.tsx"
click node_domain "https://github.com/mdarwish228/ui-skill-testing/blob/main/after-skill/src/domain/types.ts"
click node_seed "https://github.com/mdarwish228/ui-skill-testing/blob/main/after-skill/src/mock/seed.ts"
click node_telemetry_hook "https://github.com/mdarwish228/ui-skill-testing/blob/main/after-skill/src/mock/useMockTelemetry.ts"
click node_rng "https://github.com/mdarwish228/ui-skill-testing/blob/main/after-skill/src/mock/util/rng.ts"
click node_format "https://github.com/mdarwish228/ui-skill-testing/blob/main/after-skill/src/lib/format.ts"
click node_successor_styles "https://github.com/mdarwish228/ui-skill-testing/blob/main/after-skill/src/App.css"
click node_design_reference "https://github.com/mdarwish228/ui-skill-testing/blob/main/design-system/cloudcam-fleet/MASTER.md"

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_baseline_html,node_baseline_main,node_baseline_app,node_baseline_list,node_baseline_details,node_baseline_feed,node_baseline_data,node_baseline_display,node_baseline_styles toneBlue
class node_successor_html,node_successor_main,node_successor_app,node_sidebar,node_camera_view,node_player,node_domain,node_seed,node_telemetry_hook,node_rng,node_format,node_successor_styles toneAmber
class node_design_reference toneNeutral
```

## Components

### Baseline UI

- [Vite HTML entry](https://github.com/mdarwish228/ui-skill-testing/blob/main/before-skill/index.html): HTML entry · `before-skill/index.html`
- [React bootstrap](https://github.com/mdarwish228/ui-skill-testing/blob/main/before-skill/src/main.tsx): TypeScript entry · `before-skill/src/main.tsx`
- [Dashboard composition](https://github.com/mdarwish228/ui-skill-testing/blob/main/before-skill/src/ui/App.tsx): React state boundary · Owns selected-camera state. · `before-skill/src/ui/App.tsx`
- [Camera list](https://github.com/mdarwish228/ui-skill-testing/blob/main/before-skill/src/ui/CameraList.tsx): React component · `before-skill/src/ui/CameraList.tsx`
- [Camera details](https://github.com/mdarwish228/ui-skill-testing/blob/main/before-skill/src/ui/CameraDetails.tsx): React component · `before-skill/src/ui/CameraDetails.tsx`
- [Mock video feed](https://github.com/mdarwish228/ui-skill-testing/blob/main/before-skill/src/ui/MockVideoFeed.tsx): React component · Simulates the camera stream. · `before-skill/src/ui/MockVideoFeed.tsx`
- [Static fleet data](https://github.com/mdarwish228/ui-skill-testing/blob/main/before-skill/src/mock/cameras.ts): mock data · `before-skill/src/mock/cameras.ts`
- [Status display metadata](https://github.com/mdarwish228/ui-skill-testing/blob/main/before-skill/src/ui/statusMeta.ts): presentation metadata · `before-skill/src/ui/statusMeta.ts`
- [Dashboard styles](https://github.com/mdarwish228/ui-skill-testing/blob/main/before-skill/src/ui/styles.css): stylesheet · `before-skill/src/ui/styles.css`

### Structured successor

- [Vite HTML entry](https://github.com/mdarwish228/ui-skill-testing/blob/main/after-skill/index.html): HTML entry · `after-skill/index.html`
- [React bootstrap](https://github.com/mdarwish228/ui-skill-testing/blob/main/after-skill/src/main.tsx): TypeScript entry · `after-skill/src/main.tsx`
- [App composition](https://github.com/mdarwish228/ui-skill-testing/blob/main/after-skill/src/App.tsx): React state boundary · Consumes telemetry and coordinates the selected camera. · `after-skill/src/App.tsx`
- [Camera sidebar](https://github.com/mdarwish228/ui-skill-testing/blob/main/after-skill/src/components/CameraSidebar.tsx): React component · Fleet navigation and selection. · `after-skill/src/components/CameraSidebar.tsx`
- [Camera view](https://github.com/mdarwish228/ui-skill-testing/blob/main/after-skill/src/components/CameraView.tsx): React component · Selected-camera telemetry and detail surface. · `after-skill/src/components/CameraView.tsx`
- [Mock camera player](https://github.com/mdarwish228/ui-skill-testing/blob/main/after-skill/src/components/MockCameraPlayer.tsx): React component · Simulates video playback. · `after-skill/src/components/MockCameraPlayer.tsx`
- [Camera domain contracts](https://github.com/mdarwish228/ui-skill-testing/blob/main/after-skill/src/domain/types.ts): TypeScript domain model · Shared camera and telemetry types. · `after-skill/src/domain/types.ts`
- [Seed fleet state](https://github.com/mdarwish228/ui-skill-testing/blob/main/after-skill/src/mock/seed.ts): mock data · Initial fleet and telemetry state. · `after-skill/src/mock/seed.ts`
- [Mock telemetry stream](https://github.com/mdarwish228/ui-skill-testing/blob/main/after-skill/src/mock/useMockTelemetry.ts): React hook · Produces periodic client-side telemetry updates. · `after-skill/src/mock/useMockTelemetry.ts`
- [State randomizer](https://github.com/mdarwish228/ui-skill-testing/blob/main/after-skill/src/mock/util/rng.ts): mock utility · `after-skill/src/mock/util/rng.ts`
- [Display formatting](https://github.com/mdarwish228/ui-skill-testing/blob/main/after-skill/src/lib/format.ts): presentation utility · `after-skill/src/lib/format.ts`
- [Page and global styles](https://github.com/mdarwish228/ui-skill-testing/blob/main/after-skill/src/App.css): stylesheets · `after-skill/src/App.css`

### Other components

- [Design system reference](https://github.com/mdarwish228/ui-skill-testing/blob/main/design-system/cloudcam-fleet/MASTER.md): design documentation · External to runtime code. · `design-system/cloudcam-fleet/MASTER.md`

## Connections

- Vite HTML entry → React bootstrap: loads
- React bootstrap → Dashboard composition: mounts
- Static fleet data → Dashboard composition: provides fleet
- Dashboard composition → Camera list: renders
- Camera list → Dashboard composition: selection
- Dashboard composition → Camera details: selected camera
- Dashboard composition → Mock video feed: selected camera
- Status display metadata → Camera details: status presentation
- Dashboard styles → Dashboard composition: styles
- Vite HTML entry → React bootstrap: loads
- React bootstrap → App composition: mounts
- Seed fleet state → Mock telemetry stream: initial state
- State randomizer → Mock telemetry stream: evolves state
- Camera domain contracts → Mock telemetry stream: telemetry contracts
- Mock telemetry stream → App composition: periodic updates
- App composition → Camera sidebar: fleet and selection
- Camera sidebar → App composition: selection
- App composition → Camera view: selected telemetry
- Camera view → Mock camera player: camera feed
- Camera domain contracts → Camera sidebar: camera contracts
- Camera domain contracts → Camera view: telemetry contracts
- Display formatting → Camera view: formats display
- Page and global styles → App composition: styles
- Design system reference → Page and global styles: guides design
