# versedcamel153/visor-studio architecture

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

- Interactive diagram: https://gitdiagram.com/versedcamel153/visor-studio
- Repository: https://github.com/versedcamel153/visor-studio

## Overview

Visor Studio is a browser-based editor and preview tool for Visor BootManager configuration—not the bootloader. The main workflow is to edit or create entries, use schema-driven controls, inspect diagnostics and a live menu preview, then generate and export a config bundle. An optional local mode can read, save, back up, and validate paths in an installed Visor directory. The graph preserves the documented editor, preview, asset, and export branches; source excerpts do not expose every frontend event or backend implementation detail, so those connections are limited to shown imports, calls, and README statements.

Main entry points: [`frontend/src/main.tsx`](https://github.com/versedcamel153/visor-studio/blob/master/frontend/src/main.tsx) (Studio app), [`main.py`](https://github.com/versedcamel153/visor-studio/blob/master/main.py) (FastAPI service), [`core/parser.py`](https://github.com/versedcamel153/visor-studio/blob/master/core/parser.py) (Config parser), [`frontend/src/components/BootPreview.tsx`](https://github.com/versedcamel153/visor-studio/blob/master/frontend/src/components/BootPreview.tsx) (Boot preview)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Studio interface"]
  node_app["Studio app<br/>[main.tsx]"]
  node_controls["Config controls<br/>[ConfigControls.tsx]"]
  node_wizard["Entry wizard<br/>[EntryWizard.tsx]"]
  node_diagnostics["Diagnostics<br/>[Diagnostics.tsx]"]
  node_preview["Boot preview<br/>[BootPreview.tsx]"]
  node_layout["Preview layout<br/>[previewLayout.ts]"]
  node_codeviews["Config views"]
end

subgraph group_config["Config services"]
  node_api_client["API client<br/>[api.ts]"]
  node_api["FastAPI service<br/>[main.py]"]
  node_parser["Config parser<br/>[parser.py]"]
  node_schema["Schema metadata<br/>[schema_metadata.py]"]
  node_models["API models<br/>[visor_models.py]"]
end

subgraph group_local["Installed Visor"]
  node_local_mode["Local install mode<br/>[local_mode.py]"]
  node_installed_files[("Installed Visor files")]
end

subgraph group_assets["Assets and export"]
  node_staged_assets[("Staged asset store<br/>[uploadedAssets.ts]")]
  node_visor_assets["Asset resolver<br/>[visorAssets.ts]"]
  node_export["Export bundle<br/>[exportBundle.ts]"]
  node_bundled_defaults["Bundled defaults<br/>[boot.conf.example]"]
end

node_user(("Studio user"))

node_user -->|"edits config"| node_app
node_app -->|"configures"| node_controls
node_app -->|"creates entries"| node_wizard
node_app -->|"shows diagnostics"| node_diagnostics
node_app -->|"renders preview"| node_preview
node_app -->|"shows config"| node_codeviews
node_preview -->|"uses layout"| node_layout
node_app -->|"requests services"| node_api_client
node_api_client -->|"calls endpoints"| node_api
node_api -->|"parses and generates"| node_parser
node_api -->|"serves schema"| node_schema
node_parser -->|"loads schema"| node_schema
node_api -->|"handles local requests"| node_local_mode
node_local_mode -->|"parses local config"| node_parser
node_api -->|"uses request models"| node_models
node_parser -->|"builds typed results"| node_models
node_local_mode -->|"reads and writes"| node_installed_files
node_app -->|"loads starter config"| node_bundled_defaults
node_app -->|"persists uploads"| node_staged_assets
node_visor_assets -->|"resolves staged assets"| node_staged_assets
node_preview -->|"resolves preview assets"| node_visor_assets
node_app -->|"enables local previews"| node_visor_assets
node_app -->|"builds download"| node_export
node_export -->|"includes staged files"| node_staged_assets
node_user -.->|"installs exported files"| node_installed_files

click node_app "https://github.com/versedcamel153/visor-studio/blob/master/frontend/src/main.tsx"
click node_controls "https://github.com/versedcamel153/visor-studio/blob/master/frontend/src/components/ConfigControls.tsx"
click node_wizard "https://github.com/versedcamel153/visor-studio/blob/master/frontend/src/components/EntryWizard.tsx"
click node_diagnostics "https://github.com/versedcamel153/visor-studio/blob/master/frontend/src/components/Diagnostics.tsx"
click node_preview "https://github.com/versedcamel153/visor-studio/blob/master/frontend/src/components/BootPreview.tsx"
click node_layout "https://github.com/versedcamel153/visor-studio/blob/master/frontend/src/lib/previewLayout.ts"
click node_codeviews "https://github.com/versedcamel153/visor-studio/blob/master/frontend/src/components/HighlightedCode.tsx"
click node_api_client "https://github.com/versedcamel153/visor-studio/blob/master/frontend/src/lib/api.ts"
click node_api "https://github.com/versedcamel153/visor-studio/blob/master/main.py"
click node_parser "https://github.com/versedcamel153/visor-studio/blob/master/core/parser.py"
click node_schema "https://github.com/versedcamel153/visor-studio/blob/master/core/schema_metadata.py"
click node_models "https://github.com/versedcamel153/visor-studio/blob/master/schemas/visor_models.py"
click node_local_mode "https://github.com/versedcamel153/visor-studio/blob/master/core/local_mode.py"
click node_staged_assets "https://github.com/versedcamel153/visor-studio/blob/master/frontend/src/lib/uploadedAssets.ts"
click node_visor_assets "https://github.com/versedcamel153/visor-studio/blob/master/frontend/src/lib/visorAssets.ts"
click node_export "https://github.com/versedcamel153/visor-studio/blob/master/frontend/src/lib/exportBundle.ts"
click node_bundled_defaults "https://github.com/versedcamel153/visor-studio/blob/master/frontend/public/defaults/boot.conf.example"

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_app,node_controls,node_wizard,node_diagnostics,node_preview,node_layout,node_codeviews,node_user toneBlue
class node_api_client,node_api,node_parser,node_schema,node_models toneAmber
class node_local_mode,node_installed_files toneMint
class node_staged_assets,node_visor_assets,node_export,node_bundled_defaults toneRose
```

## Components

### Studio interface

- [Studio app](https://github.com/versedcamel153/visor-studio/blob/master/frontend/src/main.tsx): `frontend/src/main.tsx`
- [Config controls](https://github.com/versedcamel153/visor-studio/blob/master/frontend/src/components/ConfigControls.tsx): `frontend/src/components/ConfigControls.tsx`
- [Entry wizard](https://github.com/versedcamel153/visor-studio/blob/master/frontend/src/components/EntryWizard.tsx): `frontend/src/components/EntryWizard.tsx`
- [Diagnostics](https://github.com/versedcamel153/visor-studio/blob/master/frontend/src/components/Diagnostics.tsx): `frontend/src/components/Diagnostics.tsx`
- [Boot preview](https://github.com/versedcamel153/visor-studio/blob/master/frontend/src/components/BootPreview.tsx): `frontend/src/components/BootPreview.tsx`
- [Preview layout](https://github.com/versedcamel153/visor-studio/blob/master/frontend/src/lib/previewLayout.ts): `frontend/src/lib/previewLayout.ts`
- [Config views](https://github.com/versedcamel153/visor-studio/blob/master/frontend/src/components/HighlightedCode.tsx): `frontend/src/components/HighlightedCode.tsx`

### Config services

- [API client](https://github.com/versedcamel153/visor-studio/blob/master/frontend/src/lib/api.ts): `frontend/src/lib/api.ts`
- [FastAPI service](https://github.com/versedcamel153/visor-studio/blob/master/main.py): `main.py`
- [Config parser](https://github.com/versedcamel153/visor-studio/blob/master/core/parser.py): `core/parser.py`
- [Schema metadata](https://github.com/versedcamel153/visor-studio/blob/master/core/schema_metadata.py): `core/schema_metadata.py`
- [API models](https://github.com/versedcamel153/visor-studio/blob/master/schemas/visor_models.py): `schemas/visor_models.py`

### Installed Visor

- [Local install mode](https://github.com/versedcamel153/visor-studio/blob/master/core/local_mode.py): `core/local_mode.py`
- **Installed Visor files**

### Assets and export

- [Staged asset store](https://github.com/versedcamel153/visor-studio/blob/master/frontend/src/lib/uploadedAssets.ts): `frontend/src/lib/uploadedAssets.ts`
- [Asset resolver](https://github.com/versedcamel153/visor-studio/blob/master/frontend/src/lib/visorAssets.ts): `frontend/src/lib/visorAssets.ts`
- [Export bundle](https://github.com/versedcamel153/visor-studio/blob/master/frontend/src/lib/exportBundle.ts): `frontend/src/lib/exportBundle.ts`
- [Bundled defaults](https://github.com/versedcamel153/visor-studio/blob/master/frontend/public/defaults/boot.conf.example): `frontend/public/defaults/boot.conf.example`

### Other components

- **Studio user**

## Connections

- Studio user → Studio app: edits config (evidence: `README.md`)
- Studio app → Config controls: configures (evidence: `frontend/src/main.tsx`)
- Studio app → Entry wizard: creates entries (evidence: `frontend/src/main.tsx`)
- Studio app → Diagnostics: shows diagnostics (evidence: `README.md`)
- Studio app → Boot preview: renders preview (evidence: `frontend/src/main.tsx`)
- Studio app → Config views: shows config (evidence: `frontend/src/main.tsx`)
- Boot preview → Preview layout: uses layout (evidence: `frontend/src/components/BootPreview.tsx`)
- Studio app → API client: requests services (evidence: `frontend/src/main.tsx`)
- API client → FastAPI service: calls endpoints (evidence: `README.md`)
- FastAPI service → Config parser: parses and generates (evidence: `main.py`)
- FastAPI service → Schema metadata: serves schema (evidence: `main.py`)
- Config parser → Schema metadata: loads schema (evidence: `core/parser.py`)
- FastAPI service → Local install mode: handles local requests (evidence: `main.py`)
- Local install mode → Config parser: parses local config (evidence: `core/local_mode.py`)
- FastAPI service → API models: uses request models (evidence: `main.py`)
- Config parser → API models: builds typed results (evidence: `core/parser.py`)
- Local install mode → Installed Visor files: reads and writes (evidence: `README.md`)
- Studio app → Bundled defaults: loads starter config (evidence: `frontend/src/main.tsx`)
- Studio app → Staged asset store: persists uploads (evidence: `frontend/src/main.tsx`)
- Asset resolver → Staged asset store: resolves staged assets (evidence: `frontend/src/lib/visorAssets.ts`)
- Boot preview → Asset resolver: resolves preview assets (evidence: `frontend/src/components/BootPreview.tsx`)
- Studio app → Asset resolver: enables local previews (evidence: `frontend/src/main.tsx`)
- Studio app → Export bundle: builds download (evidence: `frontend/src/main.tsx`)
- Export bundle → Staged asset store: includes staged files (evidence: `frontend/src/lib/exportBundle.ts`)
- Studio user → Installed Visor files: installs exported files (evidence: `README.md`)
